Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7395126rwb; Tue, 15 Nov 2022 11:36:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7tLyG72D15hu4J8YbG7P5VotHKfBO70rjhF6aDa1EvISu/NBw8QG/gcc18jxzw/ZPzKli9 X-Received: by 2002:a05:6402:653:b0:458:7758:7ed1 with SMTP id u19-20020a056402065300b0045877587ed1mr15853011edx.315.1668540966244; Tue, 15 Nov 2022 11:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668540966; cv=none; d=google.com; s=arc-20160816; b=s+e/fsBlTh4ebwQEZ4OhowgOuVx8+0kzvlUnzJUKcHuLztSg6aMXCb5H5nds6HC/+n luVw1aBR0KG0ItcL9FE85RY45r7i2NlRW62n3F8MVWcIjVhPngwEnFwjIfRAOPgO+CSE SM4Of7SKdoeXZCqlgXhWDTRmc6qcfiYil16edJvT3Youxt73HFlLHsmLHANWt8xv8Wmj AW2YlVVcWycQP8IaCGMGAF6dZkg8YHregPC6GKwE7I+4mNjBP//yLSKJry4Aw6dZoHKp kIzCEMpGJ4RrsuzR7yGMVHE+VcygvHRSIDSQ9T/be830WiKms1kA2X96r4jyJBJmlhtW r4yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1TxUm/dP/yFRuh1JfB356msoGE5Xx0hOSCI/LVtUGeA=; b=qPrsDEVSfSJtuX4AYKSEewDRu6aBpCIpv2MUexuw/pOvd0y1ULIR1PDNLMw0EVkc1F 6CTmz5oYBh9NoRboUWrZ61FMzsamBrXYUmSX93Y2zUMz6g8gv+T+GZw0h1fPBspRai57 OTnPdFXkAsUot3HXSTWpNsNuUlLudBbwg0M6IXHLaUwrd5Km38gya+Z8qa3y0mhS0QjF /UPZ12az9wyWzv7CDOtBz3BIp1Lpvv414oAhQuMLrYs0M8rK/Jq6OBaI93ms5MzJarzm PbbuXV2ECulmbGot9ZoJ5A6+KsxIvhjVJNT+p04rB7I2NLCCWUqsdLJMJBJSjd2TAUq5 v/jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YgVgJdAf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd10-20020a170907968a00b007ae199ea55asi7076076ejc.817.2022.11.15.11.35.43; Tue, 15 Nov 2022 11:36:06 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YgVgJdAf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230516AbiKOTcG (ORCPT + 90 others); Tue, 15 Nov 2022 14:32:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbiKOTcB (ORCPT ); Tue, 15 Nov 2022 14:32:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51599CE0E; Tue, 15 Nov 2022 11:32:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA7B9619E5; Tue, 15 Nov 2022 19:31:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31373C433D6; Tue, 15 Nov 2022 19:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668540719; bh=zkYCEiloeC0jrC/doDCxREldDQFPChzoKY0oT/AmWNA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YgVgJdAfwFz/rOfKkYrHzYehxkLe03kVZiQmUl0D14eFx7G3bDVpKibuahS/1pBHJ oGaeIgpi3LnkcuwZ7d2p33+pq8yXCkKqynGy9/dvee5GLtyjoTVpinWxWEUK2UMMvs mzEHcsZqU2s6pYqhFRZe8VyRxYXKIqO+g2HNsm+CLN0dtVK1AHz7InijfF7dthMeWx vuUUAYJdE9Arjn8AcJGq7mmPm2LqWb8taMjEvRwDpXUlQUbej92ZkXIaRUC3uUus/L sMaWmctwoY89Buisk9L6Ka1Iw2xPAlxHZ9nWpD3f+2rPh3cIM1v3nTgB4PO5XJuMNy D22TJpkm5Oh6w== Received: by pali.im (Postfix) id 1BBD2805; Tue, 15 Nov 2022 20:31:56 +0100 (CET) Date: Tue, 15 Nov 2022 20:31:55 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Bjorn Helgaas Cc: Geert Uytterhoeven , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH 2/2] PCI: Drop controller CONFIG_OF dependencies Message-ID: <20221115193155.mqdh6pzhiba4v4pa@pali> References: <20221115180734.GA999206@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221115180734.GA999206@bhelgaas> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Tuesday 15 November 2022 12:07:34 Bjorn Helgaas wrote: > On Tue, Nov 15, 2022 at 04:56:10PM +0100, Geert Uytterhoeven wrote: > > On Tue, Oct 25, 2022 at 9:16 PM Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > Many drivers depend on OF interfaces, so they won't be functional if > > > CONFIG_OF is not set. But OF provides stub functions in that case, so drop > > > the OF dependencies so we can at least compile-test the drivers. > > > > --- a/drivers/pci/controller/Kconfig > > > +++ b/drivers/pci/controller/Kconfig > > > @@ -8,7 +8,6 @@ config PCI_MVEBU > > > depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST > > > depends on MVEBU_MBUS > > > depends on ARM > > > - depends on OF > > > > This is exactly why we have the COMPILE_TEST symbol. > > There is no point in bothering all users who configure kernels with > > questions about drivers that won't function anyway due to missing > > dependencies, unless the user explicitly wants to do compile-testing. > > > > So all of these should become: > > > > depends on OF || COMPILE_TEST > > Oh, yes, thanks for pointing this out, I totally blew it here. I > dropped this while we figure it out. I agree too, it really makes sense to not provide pci-mvebu driver to end users without OF - it would not work. Anyway, it is needed to declare "depends on ARM" for pci-mvebu? Both supported architectures (mvebu and dove) are ARM. > Do you have a preference between this: > > depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST > depends on OF || COMPILE_TEST > > and this: > > depends on ((ARCH_MVEBU || ARCH_DOVE) && OF) || COMPILE_TEST > > The latter seems more common and doesn't repeat "COMPILE_TEST", but I > can see advantages to the former. > > Bjorn First one looks to be more readable as it does not contain parenthesis. And if one day there would be support also for other Marvell SoCs currently missing in pci-mvebu.c then diff for new ARCH_ in Kconfig would be smaller.