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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7F91C4332F for ; Thu, 3 Nov 2022 17:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbiKCRNv (ORCPT ); Thu, 3 Nov 2022 13:13:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231482AbiKCRNe (ORCPT ); Thu, 3 Nov 2022 13:13:34 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F8981EEC6; Thu, 3 Nov 2022 10:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667495577; x=1699031577; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7YpyRAArYVbF9WNy66xCFId6MSUjEg0Z+IBgztnk6pE=; b=OP2WWRVrzCQUsW25oYzoM1bPLb/DH5cvAgGftZdTKFTf38AY12WbVody 0ur29kF0xe53bTfiA+U6YrXxetSRAv7QmOe/mockPigLckHzLV+LkPaXy M4m0uGtvBGYT/F2KdB/18qFP1MRSrquyBKUvQVPtDoAXgmButYnQUoDS3 HAgb5jTUu7aXbTx/DM3e1DciDXThbxAC6/fzsz6dyqNVCDvREoN6OdQr7 7n8hILlG0oKlLFiHSPkArh70Ut8mxDmke1f+woq8JLBKzz263i0YsMBe7 s5BmSbrcuI2y+rPgaGkzVufEdrYxPlNSISVSm9cqIhBgslMfcKr8qOX92 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="311480553" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="311480553" 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-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-mips@vger.kernel.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