Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9116AC7618E for ; Tue, 14 Mar 2023 18:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229494AbjCNSl4 (ORCPT ); Tue, 14 Mar 2023 14:41:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjCNSlx (ORCPT ); Tue, 14 Mar 2023 14:41:53 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2463E1166D; Tue, 14 Mar 2023 11:41:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678819312; x=1710355312; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=cCLbIes7UXT3DAC9eDK/G+6dQMpfpn9vtj5PUMV+0Io=; b=Af2FD7pGJgxJcLSxK8hjVc+o6A7GaUbywJetD8mVZokYCesM4St4G2+P O+V1+0aKwa0Yzi+Sbtc6pB2xmemvXRipZl1A81YOqPufcp67dXsDyRoyJ C8OOIVmDCmut9u1ReD7/cnejnOE9KkjR+3V0pngqPKIHkNn3TaSxUhx6T NORONl6r5VpSkiC/4jLLRcE0sqdvmvbNpd8VUV/hHiO6UCaWBXjUNP6vE ld6x2i4XU2yE594c3uS9XV1NEXXPju8e7nB+1MQhrnbjjwF8x1zEpXceL GJrGNeuHRjquhV7Mujh52muOyXZde6YLQfvoxxW3ZMpOIgtWFBXkSb79C g==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="365184272" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="365184272" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 11:40:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="768214212" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="768214212" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP; 14 Mar 2023 11:40:01 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pc9Yy-003NFt-2t; Tue, 14 Mar 2023 20:39:56 +0200 Date: Tue, 14 Mar 2023 20:39:56 +0200 From: Andy Shevchenko To: Keith Busch Cc: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Michael Ellerman , Randy Dunlap , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , Niklas Schnelle , Pali =?iso-8859-1?Q?Roh=E1r?= , "Maciej W. Rozycki" , Juergen Gross , Dominik Brodowski , linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , Anatolij Gustschin , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Bjorn Helgaas , Stefano Stabellini , Oleksandr Tyshchenko Subject: Re: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource() Message-ID: References: <20230310171416.23356-1-andriy.shevchenko@linux.intel.com> <20230310171416.23356-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 10, 2023 at 03:15:38PM -0700, Keith Busch wrote: > On Fri, Mar 10, 2023 at 07:14:13PM +0200, Andy Shevchenko wrote: ... > > +#define pci_dev_for_each_resource_p(dev, res) \ > > + __pci_dev_for_each_resource(dev, res, i, unsigned int) > > It looks dangerous to have a macro declare a variable when starting a new > scope. How do you know the name 'i' won't clash with something defined above? I'll rename. Thank you. -- With Best Regards, Andy Shevchenko