Re: [PATCH V2 1/2] net: Fixup netif_attrmask_next_and warning
From: Jakub Kicinski
Date: Thu Oct 13 2022 - 23:35:58 EST
On Thu, 13 Oct 2022 23:04:58 -0400 guoren@xxxxxxxxxx wrote:
> - for (j = -1; j = netif_attrmask_next_and(j, online_mask, mask, nr_ids),
> - j < nr_ids;) {
> + for (j = -1; j < nr_ids;
> + j = netif_attrmask_next_and(j, online_mask, mask, nr_ids)) {
This does not look equivalent, have you tested it?
nr_ids is unsigned, doesn't it mean we'll never enter the loop?
Can we instead revert 854701ba4c and take the larger rework Yury
has posted a week ago into net-next?