Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp76453iof; Sun, 5 Jun 2022 21:37:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkxpBKOwAWScm6J0sT7aUuUpVnQSFjsB3LLYa35cAfAV1NmV5q/RBD8tOpO6h3LqHxca2M X-Received: by 2002:a17:90a:191a:b0:1dc:a3d3:f579 with SMTP id 26-20020a17090a191a00b001dca3d3f579mr59992073pjg.30.1654490250091; Sun, 05 Jun 2022 21:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654490250; cv=none; d=google.com; s=arc-20160816; b=HDpt3KqRlCmUM713mCmlc3lhyvEpYxrl3zv4WI17BKILxzoDRYhNEy7IvGZGy2/wWn 414i8yk6wh1q2nftFlx2G9rxHkxU+d++tO3w1ogiWfhV+LOb9G+CT66W/ZHzeMki1nyZ 6XxqILJAYpDpU3q/tiDp/1V8rTqqp7n89/POBrgbgNTgdtk+jDsLgLPN+YjG2N6HlDSJ vNRU4HUNzzD88linxtBXQyx9iv1H+v2Ws5lFPXR6dTYQEvTS8U74LW7n5e79Fqfh8sIf FQL3mVBLrgxqcAhNXcoM6kftyNmAZU+b0gcC8XWM6KzNjcywqfCBY/yinT+7USMfEePk 1tYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=d/g5lCDspNEJNwMa9vfrlOAoLRDCzZro+20EzHFIRrs=; b=opJJEkuhw+HODPYyisZI/HWkvlXh01AMTuKA480npw4b5g+xjPwfV7y6j2uOpQmkuA BsQqqHsfYeaYZpomeTaem6ab6sAdaDyuMobtHnzJ9Mzqk+2uOiYKqqJJBGdth//aunrK tPKZSx4nofVBfuqT52Y77LIWW1CZYoLosus3usTO7ofTNtUP0lVLnFamLQnvX1er/JA4 pixwn5IwRUJfQmEs7wogIDdPtLR/pYuZk6cLHAThIDhHdoxVQVQYgtTXUTCHwYgIr+0R nj0aYKpgdBdnzwzkzYBjfQUgTsaoMq9tPW0LPa0MDGaCmOMjfO6MFGGwPMN+/y+7ASEl 1FXg== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b13-20020a6541cd000000b003c2163cb9d1si23154375pgq.493.2022.06.05.21.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:37:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 28A1399826; Sun, 5 Jun 2022 21:01:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236074AbiFDMbN (ORCPT + 99 others); Sat, 4 Jun 2022 08:31:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbiFDMbK (ORCPT ); Sat, 4 Jun 2022 08:31:10 -0400 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E16C1D0F3; Sat, 4 Jun 2022 05:31:09 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id t31so18112378ybi.2; Sat, 04 Jun 2022 05:31:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d/g5lCDspNEJNwMa9vfrlOAoLRDCzZro+20EzHFIRrs=; b=VdrgQFqRNsafn5SeUv4fg9FUvI/ctbDh2ur1uLBD38NLcobVi2NZ76HU35EsBz/D95 X3wMwXoGC20JDw2813wvcoT61+R/Tz+XW8gvwJZo8kPctm20rnGWYDcv7Lp6jnRCOf34 gH756xBQGJ5lZed+IxvOWZXAIItxAZr1wNusWZW8DKxW4c/gypDlak7Mqm6lVduTotA9 uqDQbxSxHPFNGwu84bEEa9cCkphuYD9EjkJMVmzqc3aFitcBxQ4BYPUvTRqbfxNOcejA ShMjxa23ZNjE1nvX1Cae8kwQMHlN6fSuVSQApey11PW4SJwbnCCvxZ+D0NN9jc1c5Zrt 74VA== X-Gm-Message-State: AOAM531Z61LMGqpA0rRZAIGHiUJSDXZ6UXDxZUkgkS2AZpL8oo3qjq3e qG5IkD5L6YwsuFI3+AZbQNPkCxWe4M4mmxNtUAgEdCj0oYWSUQ== X-Received: by 2002:a25:4542:0:b0:660:6b9e:62b8 with SMTP id s63-20020a254542000000b006606b9e62b8mr11616534yba.423.1654345868578; Sat, 04 Jun 2022 05:31:08 -0700 (PDT) MIME-Version: 1.0 References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220603102848.17907-1-mailhol.vincent@wanadoo.fr> <20220603102848.17907-3-mailhol.vincent@wanadoo.fr> <20220604112707.z4zjdjydqy5rkyfe@pengutronix.de> In-Reply-To: <20220604112707.z4zjdjydqy5rkyfe@pengutronix.de> From: Vincent MAILHOL Date: Sat, 4 Jun 2022 21:30:57 +0900 Message-ID: Subject: Re: [PATCH v4 2/7] can: Kconfig: turn menu "CAN Device Drivers" into a menuconfig using CAN_DEV To: Marc Kleine-Budde Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt , Oliver Hartkopp , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Sat. 4 juin 2022 at 20:27, Marc Kleine-Budde wrote: > On 03.06.2022 19:28:43, Vincent Mailhol wrote: > > In the next patches, the software/virtual drivers (slcan, v(x)can) > > will depend on drivers/net/can/dev/skb.o. > > > > This patch changes the scope of the can-dev module to include the > > above mentioned drivers. > > > > To do so, we reuse the menu "CAN Device Drivers" and turn it into a > > configmenu using the config symbol CAN_DEV (which we released in > > previous patch). Also, add a description to this new CAN_DEV > > menuconfig. > > > > The symbol CAN_DEV now only triggers the build of skb.o. For this > > reasons, all the macros from linux/module.h are deported from > > drivers/net/can/dev/dev.c to drivers/net/can/dev/skb.c. > > > > Finally, drivers/net/can/dev/Makefile is adjusted accordingly. > > > > Suggested-by: Oliver Hartkopp > > Signed-off-by: Vincent Mailhol > > --- > > drivers/net/can/Kconfig | 29 ++++++++++++++++++++++++++--- > > drivers/net/can/dev/Makefile | 16 +++++++++------- > > drivers/net/can/dev/dev.c | 9 +-------- > > drivers/net/can/dev/skb.c | 7 +++++++ > > 4 files changed, 43 insertions(+), 18 deletions(-) > > > > > diff --git a/drivers/net/can/dev/Makefile b/drivers/net/can/dev/Makefile > > index 5b4c813c6222..919f87e36eed 100644 > > --- a/drivers/net/can/dev/Makefile > > +++ b/drivers/net/can/dev/Makefile > > @@ -1,9 +1,11 @@ > > # SPDX-License-Identifier: GPL-2.0 > > > > -obj-$(CONFIG_CAN_NETLINK) += can-dev.o > > +obj-$(CONFIG_CAN_DEV) += can-dev.o > ^^^^^^^^^^^^^^^^^^^^^ > > Nitpick: I think you can directly use "y" here. I see. So the idea would be that if we deselect CONFIG_CAN_DEV, then despite of can-dev.o being always "yes", it would be empty and thus ignored. I just didn't know this trick. I will do as suggested.