Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2058307rwi; Thu, 3 Nov 2022 12:07:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70IgSuahFcugYyrBsnYTy84xYiV+7lJ41zr4dNuOud+27S/uuHSTdT9VppraQXz52Jr4EE X-Received: by 2002:a05:6402:249b:b0:460:cb11:27d4 with SMTP id q27-20020a056402249b00b00460cb1127d4mr31674235eda.410.1667502473725; Thu, 03 Nov 2022 12:07:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667502473; cv=none; d=google.com; s=arc-20160816; b=FIujU3vhXFQ+eOucFk4g+zrpAlMEeT82ay/QSwCNPrXyuUgDl3BZnCWctgU5cOI9vl 9fAroRB5l1IoHTWkcyfEMJ96gKcmrRnNQ0fZBUL3z10rjjJsW+I6YpM1ixMrLSygcO79 vxU8LrzwTAM8XhTPQVbeuLG78S0wMzkvzQCYrSMHYRjPRWRZ4QAGzAshwpoDZPNAww1H 9f94xD849loh/6k5cnfwwD/+24Md/RRQrJFpIsh0hk5lzpNfQIU52e4MpnM712y6LNzY jaLzlnvPGI3BUStwQwXrv4wpj1mgvhgSriogu9zqNNIXV1UPshq94zsKQP8vJepgoFmN cswg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=pZjEyPGh7N/ck24vh/VKMs5s50UIlOa2pgI4ml3dqpA=; b=sFk8+6b6d4fiXIwJLpSNN0aviBpOwSv8kV+UDziIDM9miBKB7PN/xBmi5/HletZtpW 0EbNrBM3/fv4KoOVPhuoF5rRDRWV1yt9jxy/JtFKZH6Wwcn7OFGmfWhMVhuldzRiCLJ9 +L3XdgMl+iPbZYk1p6Qd8FiauLdNjPnQ+j8xm6PSD8Mts1gY2zkNLxlSUWLuuPSJqe4T Dst+fa0g9WL/PiHCbxvwDJ9XpRfH0VI68P9x/Ucl2dNY5D7inswB8NDC/84Psudnw/kg rk3N6P487NyJo7dyiCALUv41byZfbrw0BHs90wCURdi7A8kxu0JKqVQ2SsSYxKd6sAnz b7Ww== 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 l22-20020a170906795600b0078de4629958si2600310ejo.248.2022.11.03.12.07.29; Thu, 03 Nov 2022 12:07:53 -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 S230402AbiKCSbA (ORCPT + 97 others); Thu, 3 Nov 2022 14:31:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231395AbiKCSaq (ORCPT ); Thu, 3 Nov 2022 14:30:46 -0400 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A492AE42; Thu, 3 Nov 2022 11:29:53 -0700 (PDT) Received: by mail-pf1-f171.google.com with SMTP id b185so2400986pfb.9; 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=wBIG6peM6DO5VkovFmK5TgeyvBa7jO8i95AVxC7AtHb7w6gbuyIVitJya39P0iaTJu 0sT6wJ6o5hrKmNgXieS+gzsrfy5btgpKT6RZ2nSrQgaYhFueAGWUyUmm4pYpUFvbsiPn 7oY6sqqszRlqiSokONWdNzFxaCSIc2FNrRUGQ7cCDsbMzfsGB791jzVb+LyoHWF36yoK 2TrOYBVCI2uJxj7oZe3gEUTXw/Rl59c8yO59nawy3Xsh/YPXHqATxcpUZtOmF5C2qQIm d3+Ra3gi/m/RggvdOLbYJ/bpD4AHpoa2ao5th4mbUqIqD3J+HACVkCz5DRhVVTeNcERI z7qQ== X-Gm-Message-State: ACrzQf3EhY2IWYhRFKNYyvinf1CSPHo9OLMWzdjT9rya749d8zsmYHdq YaY05A38KU+b5JFp2N8rNLs= 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 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