[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161286043568.5645.13230167254226736235@kwain.local>
Date: Tue, 09 Feb 2021 09:47:15 +0100
From: Antoine Tenart <atenart@...nel.org>
To: Alexander Duyck <alexander.duyck@...il.com>
Cc: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 07/12] net: remove the xps possible_mask
Quoting Alexander Duyck (2021-02-08 22:43:39)
> On Mon, Feb 8, 2021 at 9:19 AM Antoine Tenart <atenart@...nel.org> wrote:
> >
> > -static void clean_xps_maps(struct net_device *dev, const unsigned long *mask,
> > +static void clean_xps_maps(struct net_device *dev,
> > struct xps_dev_maps *dev_maps, u16 offset, u16 count,
> > bool is_rxqs_map)
> > {
> > - unsigned int nr_ids = dev_maps->nr_ids;
> > bool active = false;
> > int i, j;
> >
> > - for (j = -1; j = netif_attrmask_next(j, mask, nr_ids), j < nr_ids;)
> > - active |= remove_xps_queue_cpu(dev, dev_maps, j, offset,
> > - count);
> > + for (j = 0; j < dev_maps->nr_ids; j++)
> > + active |= remove_xps_queue_cpu(dev, dev_maps, j, offset, count);
> > if (!active)
> > reset_xps_maps(dev, dev_maps, is_rxqs_map);
> >
> > - if (!is_rxqs_map) {
> > - for (i = offset + (count - 1); count--; i--) {
> > + if (!is_rxqs_map)
> > + for (i = offset + (count - 1); count--; i--)
> > netdev_queue_numa_node_write(
> > - netdev_get_tx_queue(dev, i),
> > - NUMA_NO_NODE);
> > - }
> > - }
> > + netdev_get_tx_queue(dev, i), NUMA_NO_NODE);
> > }
>
> This violates the coding-style guide for the kernel. The if statement
> should still have braces as the for loop and
> netdev_queue_numa_node_write are more than a single statement. I'd be
> curious to see if checkpatch also complains about this because it
> probably should.
You're right, I'll remove that change to comply with the coding style.
I reran checkpatch, even with --strict, and it did not complain. Maybe
because it's a rework, not strictly new code.
Thanks,
Antoine
Powered by blists - more mailing lists