[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1612151036340.3470@nanos>
Date: Thu, 15 Dec 2016 10:36:52 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Gavin Shan <gwshan@...ux.vnet.ibm.com>
cc: "Guilherme G. Piccoli" <gpiccoli@...ux.vnet.ibm.com>,
LKML <linux-kernel@...r.kernel.org>, linux-pci@...r.kernel.org,
Christoph Hellwig <hch@....de>, linuxppc-dev@...ts.ozlabs.org,
gabriel@...sman.be
Subject: Re: [PATCH] genirq/affinity: fix node generation from cpumask
On Thu, 15 Dec 2016, Gavin Shan wrote:
> > static int get_nodes_in_cpumask(const struct cpumask *mask, nodemask_t *nodemsk)
> > {
> >- int n, nodes;
> >+ int n, nodes = 0;
> >
> > /* Calculate the number of nodes in the supplied affinity mask */
> >- for (n = 0, nodes = 0; n < num_online_nodes(); n++) {
> >+ for_each_online_node(n)
> > if (cpumask_intersects(mask, cpumask_of_node(n))) {
> > node_set(n, *nodemsk);
> > nodes++;
> > }
> >- }
> >+
>
> It'd better to keep the brackets so that we needn't add them when adding
> more code into the block next time.
Removing the brackets is outright wrong. See:
https://marc.info/?l=linux-kernel&m=147351236615103
I'll fix that up when applying the patch.
Thanks,
tglx
Powered by blists - more mailing lists