Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp941985ybl; Fri, 16 Aug 2019 06:33:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqytA+7syYC7DdPBE/alZ7UnOCIJ3hGftskxbMQkQV7IPMJNXsGAWDQvXbcB5Qt00ZlETOHC X-Received: by 2002:a65:5a8c:: with SMTP id c12mr7634896pgt.73.1565962383984; Fri, 16 Aug 2019 06:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565962383; cv=none; d=google.com; s=arc-20160816; b=p8AkWlh8ClTF5GcMoDvZvqp7aWecp6zW6YKiuAd/n1kgDYuWlm1pNrfGgD8CqC4Dee euAU6rlHsW9efq3KZvDM+tbhjwy6SYr3nXX7//Z5Q9udVgdrI7d2vPDxEZYm39ikc8vT H1g2zyns0Dx4ucANASBLzf1EHqJoWBCGKFCJl3ZXn88FTfT1JDXJoNG5id2r5rx+6W57 cVUYqLNvkTlpdlAU4vlHxl787glzGnfevn5f7a/w1Zo54g9AZk4c3U/oNNvikspyHGlG pFFoTJDKILk2fYFWfH6GUezCzmEy9LXVkKTMug9/k6ykFNqwchb1pDQLsZXZ1VJZee+/ dS/g== 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=oRnEPR2XPBkLhEvTg5P+oWLpVR7y7TB3SUMFe7csdPg=; b=syjAo+Q0oIkk94YmV62DUQHO9lqmEAARcWA0X/6pCDH45icTmULWsipOAAtiTSu43q 6CPoHCmpZkW6z8YgYxIhz09pZk99Su7RNvAWxDywW+gcOSvjW58IShaHWkF/KeSpr/T9 zsv9pun4UHRmIsFiWeOuPreOFzMbBjgrhDOG8p/lJFs975Cy0yEfNzylpxF7R/87Zs7J Lchc0WX7CFOEVYyLuWbJiJKTUE2RdrBsLYiQLo08lCsv0yCfXJsosJNXBgq3QwnkOxDh hZRL4uUe5ursO1NwkWKxXkrHATEeRm90i/hIzJmgB10xTG3/4gS6qvVdj9m90Qo67ry5 VHVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kn7n9FRw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si4139547pla.243.2019.08.16.06.32.47; Fri, 16 Aug 2019 06:33:03 -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=pass header.i=@kernel.org header.s=default header.b=kn7n9FRw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727304AbfHPNbu (ORCPT + 99 others); Fri, 16 Aug 2019 09:31:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:32872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727263AbfHPNbu (ORCPT ); Fri, 16 Aug 2019 09:31:50 -0400 Received: from localhost (173-25-83-245.client.mchsi.com [173.25.83.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E28922086C; Fri, 16 Aug 2019 13:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565962309; bh=MttKe0yp/T1sDIDthL7yI1Dis6PQYbgmffNkmTOfatI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kn7n9FRwaRPPoxR93SNO+a6ImoR7ukr/jjPj2drzk1PO+MAH4mSmWrIYpr9zCdCMJ gBbHLMuNBh6E/dJX8HsEfCwm638l6iPKD43eSe2lvChzbpJG1kUX3j7LoITJvpGgy/ 1b74thu+9+ZXv/oaViO3vx7QPtztw1SHc3QqaPN4= Date: Fri, 16 Aug 2019 08:31:47 -0500 From: Bjorn Helgaas To: Thomas Gleixner Cc: Denis Efremov , "H. Peter Anvin" , x86@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/10] x86/PCI: Loop using PCI_STD_NUM_BARS Message-ID: <20190816133147.GM253360@google.com> References: <20190816092437.31846-1-efremov@linux.com> <20190816092437.31846-4-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 16, 2019 at 11:32:41AM +0200, Thomas Gleixner wrote: > On Fri, 16 Aug 2019, Denis Efremov wrote: > > > Refactor loops to use 'i < PCI_STD_NUM_BARS' instead of > > 'i <= PCI_STD_RESOURCE_END'. > > Please describe the WHY not the WHAT. I can see the WHAT from the patch > itself, but I can't figure out WHY. Good point; the WHY is to use idiomatic C style and avoid the fencepost error of using "i < PCI_STD_RESOURCE_END" when "i <= PCI_STD_RESOURCE_END" is required, e.g., 2f686f1d9bee ("PCI: Correct PCI_STD_RESOURCE_END usage") Denis, can you include something along those lines in the next version?