From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F6ECC4332F for ; Thu, 3 Nov 2022 17:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NXbo9cIVHV3aAUvoE5PuBQl60MpqmWqFUcXv26Q81JM=; b=Z/1wpz09vpun7y /yTqCnH1OZWQzUhRxH4eoPnY/xGaoBS5YqbsQRdusFV0q4wk1f75/JtBs3P6GegEzlyDhmQoHJwyl Lmgw9sjyuYWHcVz2OdyiWpF0hIAnlwOA5GB3fJC6ywD5gB3Ft4b/0fbp6ITqLMJnyi6+j2O3ZNwwv nzXGd4z7irZp1IoTefVklLQ9gF8IMCKX/CwYPDSdmI7gwjHA08ofImqTjtYhZjo1dJQ42ZYPH7TT9 9xD8Bc7pyVagSHZiOJVdmvPYDhKeAnOjeHLmIJxl6vsiXPbHC2NcitdZmqYIRCLX4joGxH04IBTDs Pdh88jKVmUE4fjIAuXaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqdtK-0011gL-2M; Thu, 03 Nov 2022 17:20:37 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqdm6-000yry-TS for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 17:13:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667495586; x=1699031586; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7YpyRAArYVbF9WNy66xCFId6MSUjEg0Z+IBgztnk6pE=; b=GJP5NXnkQx1n7qdX1Yxjg15WV/SYYYyLy+C9ZWoOfGGhcbqzhxUwqVef G3O3wnhfEDylvo28oNQKdBuGZtDDlvtUtTS0FLZU9vdC2kllnA17YKz+a PKzsvF+WZwK5GDmYH6Lwy7m3mBUTgGbC9bDPmUNZGonjjX34oEPj3iCOl 8I6i5px1HTexUQB7WsJUO7of6PONEm/UR57GLyz35b9KxFs94qdACovyW wgXDh+vb78x35DxnaVQBazxT7AJtx8SGdk9MLh4e1fPzVieTR8ZmE/qPe 3aXEH/+/E7pBodquSbVX2nsS+Gotv9MKPTywJyowHaK/p8ZKgGviLM/KW g==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="311480555" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="311480555" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 10:12:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="666046647" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="666046647" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 03 Nov 2022 10:12:50 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oqdlm-006wiw-0o; Thu, 03 Nov 2022 19:12:46 +0200 Date: Thu, 3 Nov 2022 19:12:45 +0200 From: Andy Shevchenko To: Dominik Brodowski Cc: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , Michael Ellerman , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , Juergen Gross , 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, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , "David S. Miller" , Bjorn Helgaas , Stefano Stabellini , Oleksandr Tyshchenko Subject: Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p() Message-ID: References: <20221103164644.70554-1-andriy.shevchenko@linux.intel.com> <20221103164644.70554-5-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_101307_233017_B84D9EB1 X-CRM114-Status: GOOD ( 15.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 03, 2022 at 06:03:24PM +0100, Dominik Brodowski wrote: > Am Thu, Nov 03, 2022 at 06:46:44PM +0200 schrieb Andy Shevchenko: ... > > - > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > - res = s->cb_dev->bus->resource[i]; > > -#else > > - pci_bus_for_each_resource(s->cb_dev->bus, res, i) { > > #endif > > + > > + pci_bus_for_each_resource_p(s->cb_dev->bus, res) { > > if (!res) > > continue; > > Doesn't this remove the proper iterator for X86? Even if that is the right > thing to do, it needs an explict explanation. I dunno what was in 2010, but reading code now I have found no differences in the logic on how resources are being iterated in these two pieces of code. But fine, I will add a line to a commit message about this change. Considering this is done, can you issue your conditional tag so I will incorporate it in v3? -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel