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 CCEF5C433FE for ; Thu, 3 Nov 2022 17:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231736AbiKCRNx (ORCPT ); Thu, 3 Nov 2022 13:13:53 -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-kernel@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 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 A2091C4332F for ; Thu, 3 Nov 2022 17:14:01 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4N39Mq74mMz3cJ2 for ; Fri, 4 Nov 2022 04:13:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Hlb6Zeul; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Hlb6Zeul; dkim-atps=neutral Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4N39Ll1zbBz3bqt for ; Fri, 4 Nov 2022 04:13:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667495583; x=1699031583; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7YpyRAArYVbF9WNy66xCFId6MSUjEg0Z+IBgztnk6pE=; b=Hlb6ZeulMNX84C8TzIaZhHQn6gv37m+rlTiiG7xUDZa5z5AqG6LAKBxd F1i4/4LUYkTcYIKFQzg7ittzY02I7oK1toTCbcKcKepKj3NJhDQY3OsqT H7s0qunnFJ3qSAW6utqhozubObK3Zg0nquAtt6LnPDgUHNFvgEVWK2iey EB+l4FaOmmN+SRiXuYNPjRZtfLDle8dewhZjZJuamv7nE+Todemy/Rdue y8o6n1l3bT89kIMvx9Gl2P8jp30mnjOd5PDTkI6E/605Nl8fX2XKNgod9 YRi4oVIb2NK5/biG9yMcqCQ3L4oI8yZG2L0nDTAOv6oy7tDIXA7ylWfpL g==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="307364180" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="307364180" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 10:12:57 -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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, linux-mips@vger.kernel.org, Bjorn Helgaas , sparclinux@vger.kernel.org, Stefano Stabellini , "Rafael J. Wysocki" , Russell King , Bjorn Helgaas , Miguel Ojeda , xen-devel@lists.xenproject.org, Matt Turner , Arnd Bergmann , Richard Henderson , Nicholas Piggin , Ivan Kokshaysky , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , linux-arm-kernel@lists.infradead.org, Juergen Gross , Thomas Bogendoerfer , linux-kernel@vger.kernel.org, Oleksandr Tyshchenko , linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p() Date: Thu, 3 Nov 2022 19:12:45 +0200 Message-ID: References: <20221103164644.70554-1-andriy.shevchenko@linux.intel.com> <20221103164644.70554-5-andriy.shevchenko@linux.intel.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667495583; x=1699031583; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7YpyRAArYVbF9WNy66xCFId6MSUjEg0Z+IBgztnk6pE=; b=Hlb6ZeulMNX84C8TzIaZhHQn6gv37m+rlTiiG7xUDZa5z5AqG6LAKBxd F1i4/4LUYkTcYIKFQzg7ittzY02I7oK1toTCbcKcKepKj3NJhDQY3OsqT H7s0qunnFJ3qSAW6utqhozubObK3Zg0nquAtt6LnPDgUHNFvgEVWK2iey EB+l4FaOmmN+SRiXuYNPjRZtfLDle8dewhZjZJuamv7nE+Todemy/Rdue y8o6n1l3bT89kIMvx9Gl2P8jp30mnjOd5PDTkI6E/605Nl8fX2XKNgod9 YRi4oVIb2NK5/biG9yMcqCQ3L4oI8yZG2L0nDTAOv6oy7tDIXA7ylWfpL g==; Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane-mx.org@lists.ozlabs.org Sender: "Linuxppc-dev" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dominik Brodowski Cc: linux-pci@vger.kernel.org, linux-mips@vger.kernel.org, Bjorn Helgaas , sparclinux@vger.kernel.org, Stefano Stabellini , "Rafael J. Wysocki" , Russell King , Bjorn Helgaas , Miguel Ojeda , xen-devel@lists.xenproject.org, Matt Turner , Arnd Bergmann , Richard Henderson , Nicholas Piggin , Ivan Kokshaysky , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , linux-arm-kernel@lists.infradead.org, Juergen Gross , Thomas Bogendoerfer , linux-kernel@vger.ke, rnel.org, Oleksandr Tyshchenko , linux-alpha@vger.kernel.org, linux 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