Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp846936rdb; Wed, 6 Dec 2023 01:19:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHoEp23LhqCNqFnRtIv1zeDb8ebNUqvYYJn8vRAj7Ji7lPcJDA+IqGIFThZhNBQj+6II2U X-Received: by 2002:a9d:7b48:0:b0:6b9:ed64:1423 with SMTP id f8-20020a9d7b48000000b006b9ed641423mr761625oto.2.1701854342999; Wed, 06 Dec 2023 01:19:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701854342; cv=none; d=google.com; s=arc-20160816; b=XG7rXnjCU8ZEKuDZzygvGHh3DIMZv/bKWK7ADSJLlmbOU2G5jQ8ZtVXc3KvkCsoKbH 8De4dW+nGoU0RtY5ZWNWqyS/QxAFnSuWrawuo48NeQ4JtyGEdABZexjzeAaBuTzbJh2e 75RXZD7HPcxttA0z6XNzfQIwcuC/bI8bDG7EX4NoNwQ/liCcm0PmUEXk/Frha4jNri3/ rb6XLdJ8+mXAS4Xw/wg863zrLHnfrA7UhX4xLyg9Dy0mGK9EngqO2jU0szMaTA7FN3To 0kjCdAwUZKgkF8KkDP6IkKqzlmJ2GJ4x82G7qDQI3hSSBLpGT6mN7TtKM8Gi6z4Ef7+8 pmgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=P9lSWpOp6eD4vFfrQS2Y2YjfaTXwURzlWW7M44DRXCI=; fh=4J3WP3tjWk0tax9NnLcxn94LjD6onP5qgIwgZrflSZ8=; b=B+VW9mOAKM2Goyh33har9IwM1wNJtGLfkLhuGPVhW5T9KGAu4vgjemEaOdnNJ3W2DE Ldwz5kcA3mGl2uXA4p772VMRvLrHQy/dP+iQXZbyhuEJGo4U+BtFXA5RvmDWU/GLVPPs /CSqdIzJZoRWrF9j1RehOVnSC1vVCGtRxAobHsX8zNu/uZMn1xg3Sk++Wj7S1vjVrJlF xyU8bpc/Wj5NEUlb0IhqFLdoV6YW3GYq6SGCz92s+YWDve4xvG7v61gIpfJBgovg2CHp DPGt1BuykBC2dL3uJjJ7kGSPPsy5Y+aVp038Sgjq2v2vbmHe4hchE8pMwEPpLe7pWuJ3 rn/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id be10-20020a656e4a000000b005be1ee5bea2si11608676pgb.374.2023.12.06.01.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 01:19:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9B63782D74DE; Wed, 6 Dec 2023 01:18:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232278AbjLFJSk (ORCPT + 99 others); Wed, 6 Dec 2023 04:18:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjLFJSj (ORCPT ); Wed, 6 Dec 2023 04:18:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BE33A4 for ; Wed, 6 Dec 2023 01:18:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EB55C433C8; Wed, 6 Dec 2023 09:18:42 +0000 (UTC) Message-ID: <959f7620-c489-4864-8e2a-3d4cb1125d16@xs4all.nl> Date: Wed, 6 Dec 2023 10:18:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] media: pci: mgb4: remove bogus 'select' statements Content-Language: en-US, nl From: Hans Verkuil To: Arnd Bergmann , =?UTF-8?Q?Martin_T=C5=AFma?= , Arnd Bergmann , Martin Tuma , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231023160539.1537355-1-arnd@kernel.org> <20231023160539.1537355-2-arnd@kernel.org> <25173a48-529c-463b-88aa-2ee75dd604ff@gpxsee.org> <75a110d5-c544-44b3-8155-ddfadbe1bd88@app.fastmail.com> <49c002db-fb3e-4e2c-adb4-0be05d4b27e6@gpxsee.org> <2c56410f-2762-4b3c-b37e-e8db75d30560@app.fastmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 01:18:59 -0800 (PST) Arnd, Can you post a v2 for this? Note that patch 1/1 is in v6.7 already. Regards, Hans On 13/11/2023 15:57, Hans Verkuil wrote: > On 10/11/2023 15:37, Arnd Bergmann wrote: >> On Wed, Nov 8, 2023, at 19:33, Martin Tůma wrote: >>> On 08. 11. 23 17:13, Arnd Bergmann wrote: >>>> On Fri, Oct 27, 2023, at 16:17, Martin Tůma wrote: >>>>> On 23. 10. 23 18:05, Arnd Bergmann wrote: >>>>>> From: Arnd Bergmann >>> >>> On SoCs you probably get a kernel configuration that is missing some >>> feature but still boots up when you do not select/depend on the exact >>> controller, but in the case of the mgb4 PCIe card you get a driver that >>> does not work at all (The SPI_XILINX dependency could theoretically be >>> made configurable, but you would lose the ability to flash the correct >>> FW for the current HW module and the access to the card's serial number. >>> I2C and XDMA are crucial.). >> >> My point was that we do this all the time for things that are >> essential: if your clock controller or the irqchip have >> no driver, then the camera device won't work, but neither >> would anything else. >> >> So in a SoC setting, you really just need to enable all >> the drivers for devices on that chip through the .config. >> >>>> Since this is a PCI device, it's a bit different, so maybe >>>> something like this would work to correctly document which >>>> dependencies are required at build time vs run time: >>>> >>>> --- a/drivers/media/pci/mgb4/Kconfig >>>> +++ b/drivers/media/pci/mgb4/Kconfig >>>> @@ -1,15 +1,13 @@ >>>> # SPDX-License-Identifier: GPL-2.0-only >>>> config VIDEO_MGB4 >>>> tristate "Digiteq Automotive MGB4 support" >>>> - depends on VIDEO_DEV && PCI && I2C && DMADEVICES && SPI && MTD && IIO >>>> + depends on VIDEO_DEV && PCI && I2C && SPI && MTD && IIO >>>> depends on COMMON_CLK >>>> + depends on XILINX_XDMA >>>> + depends on (I2C_XILINX && SPI_XILINX) || COMPILE_TEST >>>> select VIDEOBUF2_DMA_SG >>>> select IIO_BUFFER >>>> select IIO_TRIGGERED_BUFFER >>>> - select I2C_XILINX >>>> - select SPI_XILINX >>>> - select MTD_SPI_NOR >>>> - select XILINX_XDMA >>>> help >>>> This is a video4linux driver for Digiteq Automotive MGB4 grabber >>>> cards. >>>> >>> >>> My motivation when using "select" was to help people using "make >>> menuconfig" to get the module selected/configured as they will usually >>> not know that there are some Xilinx IP cores used that need separate >>> drivers and the menuconfig GUI simply hides the mgb4 option making it >>> almost impossible just from the menus to find out what has to be selected. >>> >>> But when there are reasons, why to chose "depends on" (like various >>> configurations, tests or the "readability" of the dependencies) than I'm >>> ok with your patch proposal. >> >> The main reason to use 'depends on' over 'select' here is that >> mixing the two is a common source of dependency loops that end >> up breaking the build. As a rule of thumb, I would use 'select' >> only for symbols that others already select, or that are hidden >> from visibility. >> >> Arnd >> > > Arnd, can you post a v2? I think this should go to v6.7 as a fix. > > Regards, > > Hans >