From: Thomas Gleixner <tglx@linutronix.de>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-pci@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
linuxppc-dev@lists.ozlabs.org, gabriel@krisman.be
Subject: Re: [PATCH] genirq/affinity: fix node generation from cpumask
Date: Thu, 15 Dec 2016 10:36:52 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1612151036340.3470@nanos> (raw)
In-Reply-To: <20161214232425.GA13182@gwshan>
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
next prev parent reply other threads:[~2016-12-15 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 18:01 Guilherme G. Piccoli
2016-12-14 23:24 ` Gavin Shan
2016-12-15 9:36 ` Thomas Gleixner [this message]
2016-12-15 12:38 ` Guilherme G. Piccoli
2016-12-15 1:05 ` Gabriel Krisman Bertazi
2016-12-15 8:54 ` Christoph Hellwig
2016-12-15 11:37 ` [tip:irq/urgent] genirq/affinity: Fix " tip-bot for Guilherme G. Piccoli
2016-12-15 12:34 ` [PATCH] genirq/affinity: fix " Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1612151036340.3470@nanos \
--to=tglx@linutronix.de \
--cc=gabriel@krisman.be \
--cc=gpiccoli@linux.vnet.ibm.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®