From: Matthew Wilcox <willy@infradead.org>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Doug Ledford <dledford@redhat.com>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the xarray tree
Date: Mon, 11 Mar 2019 05:31:05 -0700 [thread overview]
Message-ID: <20190311123105.GC19508@bombadil.infradead.org> (raw)
In-Reply-To: <20190311121348.GD22862@mellanox.com>
On Mon, Mar 11, 2019 at 12:13:54PM +0000, Jason Gunthorpe wrote:
> > @@ -1059,14 +1050,14 @@ static int assign_client_id(struct ib_client *client)
> > * to get the LIFO order. The extra linked list can go away if xarray
> > * learns to reverse iterate.
> > */
> > - if (list_empty(&client_list))
> > + if (list_empty(&client_list)) {
> > client->client_id = 0;
> > - else
> > - client->client_id =
> > - list_last_entry(&client_list, struct ib_client, list)
> > - ->client_id;
> > - ret = xa_alloc(&clients, &client->client_id, INT_MAX, client,
> > - GFP_KERNEL);
> > + } else {
> > + struct ib_client *last = list_last_entry(&client_list,
> > + struct ib_client, list);
> > + client->client_id = last->client_id + 1;
>
> blank line after locals, but other wise these all looks fine..
Would you rather see this rendered as:
if (list_empty(&client_list)) {
client->client_id = 0;
} else {
struct ib_client *last;
last = list_last_entry(&client_list, struct ib_client, list);
client->client_id = last->client_id + 1;
}
or move the declaration of 'last' up to the top of the function?
> Should have started out with the xa_insert version above..
I didn't spot it until last night either ...
next prev parent reply other threads:[~2019-03-11 12:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 6:13 linux-next: build failure after merge of the xarray tree Stephen Rothwell
2019-02-21 12:34 ` Leon Romanovsky
2019-02-21 12:48 ` Stephen Rothwell
2019-02-21 13:16 ` Leon Romanovsky
2019-02-21 13:23 ` Stephen Rothwell
2019-03-11 2:44 ` Matthew Wilcox
2019-03-11 12:13 ` Jason Gunthorpe
2019-03-11 12:31 ` Matthew Wilcox [this message]
2019-03-11 14:12 ` Jason Gunthorpe
2019-03-11 12:46 ` Leon Romanovsky
-- strict thread matches above, loose matches on Subject: below --
2020-10-08 6:55 Stephen Rothwell
2020-10-08 14:09 ` Matthew Wilcox
2020-10-08 6:50 Stephen Rothwell
2019-02-12 5:20 Stephen Rothwell
2019-02-12 16:15 ` Matthew Wilcox
2019-02-12 16:23 ` Jason Gunthorpe
2019-02-13 21:26 ` Matthew Wilcox
2019-02-13 22:09 ` Jason Gunthorpe
2019-02-21 12:47 ` Stephen Rothwell
2019-02-21 17:40 ` Jason Gunthorpe
2018-06-18 3:27 Stephen Rothwell
2018-06-18 16:50 ` Dan Williams
2018-06-18 17:09 ` Matthew Wilcox
2018-06-27 3:09 ` Stephen Rothwell
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=20190311123105.GC19508@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).