Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1051994imc; Mon, 11 Mar 2019 05:32:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/sr+a/M48Pa5mb+YkJJBKIxKFR2SNmqy0qttPcgADR1YvwIoMOpeTfPsLVsD1XBS24HHm X-Received: by 2002:a63:d453:: with SMTP id i19mr29699718pgj.237.1552307544009; Mon, 11 Mar 2019 05:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552307544; cv=none; d=google.com; s=arc-20160816; b=ZcGDDHYFSepXKfMzpeaDrrssZZNGrCkR3YjbDBVmReZZFc3WKKZ4BmULB0zhPA9dbS c/YCHiv3KaiQ8pcRYXeDyZaaOxFdq2yci6MxaA9iHW4FoYmyzlJvAKVQziuToLTb7C6+ c4FcDk5C/JypwSYrg/O3i8XDlk/88uZ6la0ynVmE9V9/z0cBhyqT7gKRmQYAKu5VXpb6 7O3iOOB7HtY/XGpIwhBa1vT3nTsY/hBMBrBLWCcgL4zWZ8RUG67B6UM7DWKoajbf75kd s/WBSRd30ESBbXtjzRQO2fdPgqP94qKjE7dYYYwZUJEycHI9ZbK2MdktJAOPU8pkh8LP eKwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QsSpmeL1Hebpss+Jx+6ZW6eF36y7Do9dQfeCjpXu2tI=; b=b1As0/dSwjugaJC7k8DkwvznjoSjHv9j5canudTpxS9sO6RfqtZKTQT3U6i4YXHxTM n+phpGa/v++DLOcaSmxFtehdnoNhWtJ8UjNkcKde3GWcTKQ4xBE2rBFmfyQDtnamD9uJ ma/3IpfDLdF1ZBNJ/I2R1Er/UCT7pc60zfUMdqAUmw1cHppINyr7d2aDdz6X5z1/u50R nFswydzHsllbZDFmew4jpjGnkF5k12Lu2AwNJh0AwSOnz3Jooyi125FACJqWauGXiwnT lCf3GKQoUNPOMIvh+edUqA8y4mis/d0jRV3X/6WSQnPHCXUn+Yx1Ihbu7beJ7t5OKy3L V+7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PrOLTmBE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y33si4820026pga.134.2019.03.11.05.32.07; Mon, 11 Mar 2019 05:32:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PrOLTmBE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbfCKMbO (ORCPT + 99 others); Mon, 11 Mar 2019 08:31:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57556 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfCKMbO (ORCPT ); Mon, 11 Mar 2019 08:31:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QsSpmeL1Hebpss+Jx+6ZW6eF36y7Do9dQfeCjpXu2tI=; b=PrOLTmBEAevTLPW6LjdHDF9fW /aS2Wh60tz4Bry20qwFbeDomF9MBnKa1RhIap2JYIwNm7UETZJQ91KECbRlVOAVFxjfAe2yQDrgG1 ktErv/+H5bj5ZjNZoZoP94BOP7NcwW+LbOCAOrtC+mST1DmGFNX9fzpoP7X+N16ue8CbuYrh93Gpq fd5nbr8MuoOlrl8HxRQBRfGO6/HHmRprtM4oDzHoSdG3ze+D9fNKlzLTQ53XbN2fP/0fA/m74AlGr 7A+IgZ5/C8TV5kh40MP7kIuvXcL3gYVSn8kg5I3dDBfx5GWCI4L5Ce8yvB53CmcgOoxLl010Mf8k4 cylcfpQQA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3K5B-0006Fi-V6; Mon, 11 Mar 2019 12:31:05 +0000 Date: Mon, 11 Mar 2019 05:31:05 -0700 From: Matthew Wilcox To: Jason Gunthorpe Cc: Leon Romanovsky , Stephen Rothwell , Doug Ledford , Linux Next Mailing List , Linux Kernel Mailing List Subject: Re: linux-next: build failure after merge of the xarray tree Message-ID: <20190311123105.GC19508@bombadil.infradead.org> References: <20190221171332.262cf619@canb.auug.org.au> <20190221123440.GD17501@mtr-leonro.mtl.com> <20190311024434.GA19508@bombadil.infradead.org> <20190311121348.GD22862@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311121348.GD22862@mellanox.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ...