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 2EAD0C4332F for ; Thu, 3 Nov 2022 18:31:29 +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=B655A2G58fePrt88XKSxk7Jmh24mo45wW++5/mh4mek=; b=GN8xFd9KD4xMC1 Kqs5+oKs0Tf6H8c9gH8333/90VH3EZdkiJsrhpT5+IXqrwZF+Ol/zwVOoIZ9/Pdw6limy6lpNCoo9 MquY2K6qm1JrnlgAzWw1NwdyvnO6NYqdPFkAM3daefYqWZ9k4Yd7n9ceUOVRQhijcu/VHXeRAlY/x lXKjdSvStEPL42siWCai1J7a3MiNN1w0fB85OBWJU0n/oWyVf1C70tMXbSmtti4laOoe0whouAzAU zA46AskDkmrkg+yiTAoXjXFq6/o4iH9F+JR7Go0LGjZDGWAg+Dr2l4pqesta/qDWtAf2DIMJvxDDM H2MrdnNKYdAq/8U9Bo7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqeyW-001HbW-SN; Thu, 03 Nov 2022 18:30:13 +0000 Received: from mail-pf1-f173.google.com ([209.85.210.173]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqeyR-001HXN-DQ for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 18:29:57 +0000 Received: by mail-pf1-f173.google.com with SMTP id k22so2412939pfd.3 for ; Thu, 03 Nov 2022 11:29:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pZjEyPGh7N/ck24vh/VKMs5s50UIlOa2pgI4ml3dqpA=; b=hGMV6j6kPr58vGqgYAEfPdP9qCOBLIY1Fa8DIRjDug+uDA8ZkC3u7mXT0kKD3dRnO+ iOzptDgd4EeuCUZYYrMBqbncwmCWKbuEW9Oep+HEQy/c2BTjKBr4t8iHA0HdFX0q03v1 2SaLvxZ5iV6bRMQXWw873wNU4BnDO803+Qbh/kuga7taA/9CLrNNw469LSCvVWXdjUQ9 GwR0gcXCq2S0Lzm/fkV3BfLkaryBQTggjhiGHlfvFVZT7osIY9OqeamWoaP/QpDe7clB 6HSzjXmB75VhXb9gcpKBYVcX9IEzeV3uPs+pgfpwJ/v8kqMSGt87HdtspkNROAI7jSJY 6c9w== X-Gm-Message-State: ACrzQf3K8wEyk9+MB8uLMk22LEysWFurqWldl9rNk+WCnXn7ygPK0vGG xqMg5TiYmCBilrrl0DrzV2A= X-Google-Smtp-Source: AMsMyM4MMb94EAGz1kO2Q0DRDyjidkdmznJiyzQZ8JfQK1Y1FbZfy+aOFpE2yYDeDmYpBxRHuxCHKQ== X-Received: by 2002:aa7:8c15:0:b0:56b:ead2:3950 with SMTP id c21-20020aa78c15000000b0056bead23950mr32086578pfd.77.1667500192405; Thu, 03 Nov 2022 11:29:52 -0700 (PDT) Received: from rocinante (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id o14-20020a170902d4ce00b0018157b415dbsm1034089plg.63.2022.11.03.11.29.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 11:29:51 -0700 (PDT) Date: Fri, 4 Nov 2022 03:29:44 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Andy Shevchenko Cc: Dominik Brodowski , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_112955_524225_90CB9054 X-CRM114-Status: GOOD ( 17.78 ) 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 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. Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel