Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2097638rwi; Thu, 3 Nov 2022 12:36:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vMwiiln6j4cXCskS5Odda41XG5ILwu3aSiVls315YrowF6FRC60IE7vX9TO9Ddtvc/Twy X-Received: by 2002:a17:90b:1b01:b0:213:ccc6:87ea with SMTP id nu1-20020a17090b1b0100b00213ccc687eamr27299232pjb.135.1667504200648; Thu, 03 Nov 2022 12:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667504200; cv=none; d=google.com; s=arc-20160816; b=kJojMEFxTBVGlR8lK4XkiIkV/lNXJKQGDXwDdBHTQtxhBUm93oWLmdSdNeXxolqTKw bqrZzAovPuTYsofPNlnRaZpwQU1E3oXxIxQkMZ3B+PB1amjB2ol9zKmhAJUsNnfUQQa2 UitQ+VfyxxsVWeZbBZQm/9Wykf3Eyzg9LHpfP7QCBpW24uMJddkca4n0qts8I67S4oYf 6ykAJq2FWQLeXjNBNN5tms6roahdZyAWmNsFErdgjlz9DSjSamM8t614x7W90HjkvAO8 Pao5JlV3FgFOX/Z4WTF190SZwOyjNa0yVWHmgHaULYcCp/XiZzEzQhtgCHC7w3TAAzJd l/sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a7kFZ8bIDZq+VYGGPTQYoKIaY/HkYNfsmSnTnekTO14=; b=ttrHKhU2tFlrfvAB+rlCxtv3T4r0TIxH+hkeRai8Jqb1OtIkA80U3eUpvieKX3QdFR gQDZf4hdzSeFDUrc4lXNGN/L4YLjAxl/XvW1mqht6R+UvkAaS5KRHvmcNZ8EYrRBEFFH /IT5c0DA6LYeWaOoPFxbSlcVk4jcogw5C8isqjRSsVs+/RqgcFGHI62Q8+EpuAUG7x5I Dg6B4rOLQaUH9Ly/Vw0uTV0le3TT7sfZuBs1JrLsMmUlYne00ZVX7ukjSOsqhw1QJTDb 0TVcfJGFwxTQIP2jUhPhTD7V7/dfpqXvaJF7bFLMq9QlOcsNqO+/TUmTdlZsjWteDsEk KnWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a62380d000000b00563653bc151si1821484pfa.110.2022.11.03.12.36.24; Thu, 03 Nov 2022 12:36:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbiKCSuO (ORCPT + 98 others); Thu, 3 Nov 2022 14:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiKCSuM (ORCPT ); Thu, 3 Nov 2022 14:50:12 -0400 Received: from isilmar-4.linta.de (isilmar-4.linta.de [136.243.71.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9523F7E; Thu, 3 Nov 2022 11:50:10 -0700 (PDT) X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES Received: from owl.dominikbrodowski.net (owl.brodo.linta [10.2.0.111]) by isilmar-4.linta.de (Postfix) with ESMTPSA id A7E69201457; Thu, 3 Nov 2022 18:50:07 +0000 (UTC) Received: by owl.dominikbrodowski.net (Postfix, from userid 1000) id 564FF801F1; Thu, 3 Nov 2022 19:38:07 +0100 (CET) Date: Thu, 3 Nov 2022 19:38:07 +0100 From: Dominik Brodowski To: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Cc: Andy Shevchenko , =?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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Fri, Nov 04, 2022 at 03:29:44AM +0900 schrieb Krzysztof WilczyƄski: > Hello, > > [...] > > > > - > > > > - 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. > > This code is over a decade old (13 years old to be precise) and there was > something odd between Bjorn's and Jesse's patches, as per: > > 89a74ecccd1f ("PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs") > cf26e8dc4194 ("pcmcia: do not autoadd root PCI bus resources") > > > But fine, I will add a line to a commit message about this change. > > I wouldn't, personally. The change you are proposing is self-explanatory > and somewhat in-line with what is there already - unless I am also reading > the current implementation wrong. > > That said, Dominik is the maintainer of PCMCIA driver, so his is the last > word, so to speak. :) > > > Considering this is done, can you issue your conditional tag so I will > > incorporate it in v3? > > No need, really. Again, unless Dominik thinks otherwise. Ah, thanks for the correction. Then v2 is perfectly fine. Thanks, Dominik