Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1279301iof; Tue, 7 Jun 2022 02:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo+n2kmekuTGsN2M//sBEUcl2USwHdWbLhRsiWeSeLkMWoVPUj36Etu+kK3tqp/Pu31D+m X-Received: by 2002:a17:907:7f9e:b0:711:d84d:408 with SMTP id qk30-20020a1709077f9e00b00711d84d0408mr6102699ejc.17.1654593648467; Tue, 07 Jun 2022 02:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654593648; cv=none; d=google.com; s=arc-20160816; b=HQE1RhdJ6t95xSYVViLZ6KQRcvh+rnM+DQnfDLwTcoEQWBRqwM3RfBbK1/5xYpvC8Q MouqsXqEfmNiZ1VqDoALVk6X7KcAx/1JOX2xHF21wdZDM6NlRF75RFqQMEd9hRJXg6p4 JJzuQ8GkWDPVPHQaUYdhjMjdO832OhECizKZhlHuiE2vCnsj63w1/Oz835mgw+FtOP9B YD9UsSZEDqw5MyAaHrGneAfUpIGtBYDqYKdk3/x7A1ijg38Q0CLMImfcfVNEEv1FBfOa tlaXdsc8ls9aagT8/sJcc63fab7i85xtkhq6y/3myHA9nTFw7U3HSlMD7LvjQMs0CMqk eJjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=sJxQMksecDKglx5IwxZWQS0gRj5Vm1zWxH4skk0OcUQ=; b=dZO6w0+0EISAQ2Mt15oeFwjFquB9i4WV9y3QFlcvQxeImEIIJebklZZNo5peX9JTcJ g9O753b2U7ez/5mjiKOdlcDd49rSsftuSNHqlnbF3lbMpQgc+le3bfo7+6rJrmkgZ66i 0A6PKtaDgqrRTZ9IUmTu+X7+VZquSjsU78JZPaMIH37Tup1Jjrl/3OT+N2Q3baN6Uod/ 6cMG2mkA9v81JbsjtVpZyPPTx+fu3VJOiOJJSWEqs5IQXrKEuqux6dRnTSdSvk1vALfI 2Pd4ELaqvgMtpjwJdYy6qw7OkpY//V7OLZYHVz/fAQRfJTxp54mSdSf/JJyaW7E6bLq0 ilRw== 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 qa20-20020a170907869400b006fefda62689si11282436ejc.224.2022.06.07.02.20.21; Tue, 07 Jun 2022 02:20:48 -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 S236086AbiFGCtp convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Jun 2022 22:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236045AbiFGCtn (ORCPT ); Mon, 6 Jun 2022 22:49:43 -0400 Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC41E9FC2; Mon, 6 Jun 2022 19:49:42 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id r82so28833115ybc.13; Mon, 06 Jun 2022 19:49:42 -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:content-transfer-encoding; bh=PpYh+QobaxTbaxOtO/UmMKh1nTqN4dPLt32NZJXUymI=; b=W0ojr3N2Zqce9e3aKtyFOzENSecZhvSUEDn0K5NtalpBcWtUJlpL5RZPc5MMR2bsWV QPX8yHysAaSn8+yrY66Md+yHYgR+rCY7qUdr90eIUCMI6T/NtE8VWOuUNX3Sxkpdbbof dsy/gVfLmEht754McwrdSzWHIapxAmBeVZCLz/9ewcBT8yjJfwkn7Yv5DDITAyRUwpnM PysMMRkK1uX3BRdAqEF9DMnNEwj8OOwcNnfDwYPaRtxTS6552MmtDnulSsal2G23ToOI RgSBX56V58R03jq6ywjOvNlo6OrhYgk7WK9FFvzQboDCfi+L5ukpisSkf4FKWbQszck4 JT9A== X-Gm-Message-State: AOAM531l3tyHpzotfrvPwi3V7G1yxHINk73F0R16W3xPml822YGW6jKA ZPbUTjqXTAX1ZiSOFleHhIKx+0rVr7wKs70FNglU1VWLCJM= X-Received: by 2002:a25:55d7:0:b0:663:3850:e85f with SMTP id j206-20020a2555d7000000b006633850e85fmr16032131ybb.500.1654570182089; Mon, 06 Jun 2022 19:49:42 -0700 (PDT) MIME-Version: 1.0 References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220604163000.211077-1-mailhol.vincent@wanadoo.fr> <2e8666f3-1bd9-8610-6b72-e56e669d3484@hartkopp.net> In-Reply-To: <2e8666f3-1bd9-8610-6b72-e56e669d3484@hartkopp.net> From: Vincent MAILHOL Date: Tue, 7 Jun 2022 11:49:30 +0900 Message-ID: Subject: Re: [PATCH v5 0/7] can: refactoring of can-dev module and of Kbuild To: Oliver Hartkopp Cc: Marc Kleine-Budde , linux-can , open list , Max Staudt , netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 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, 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 Tue. 7 Jun. 2022 at 04:43, Oliver Hartkopp wrote: > > Hi Vincent, > > great work! Thanks! > On 04.06.22 18:29, Vincent Mailhol wrote: > > > * menu after this series * > > > > Network device support > > symbol: CONFIG_NETDEVICES > > | > > +-> CAN Device Drivers > > symbol: CONFIG_CAN_DEV > > | > > +-> software/virtual CAN device drivers > > | (at time of writing: slcan, vcan, vxcan) > > | > > +-> CAN device drivers with Netlink support > > symbol: CONFIG_CAN_NETLINK (matches previous CONFIG_CAN_DEV) > > | > > +-> CAN bit-timing calculation (optional for all drivers) > > | symbol: CONFIG_CAN_BITTIMING ^^^^^^^^^^^^^^^^^^^^ Typo: the symbol is CONFIG_CAN_*CALC*_BITTIMING. I made that typo twice in the cover letter (once in each diagram). The patches and their comments remain correct. > > | > > +-> All other CAN devices not relying on RX offload > > | > > +-> CAN rx offload > > symbol: CONFIG_CAN_RX_OFFLOAD > > Is this still true in patch series 5? > > If I understood it correctly CONFIG_CAN_BITTIMING and > CONFIG_CAN_RX_OFFLOAD can be enabled by the user and > (alternatively/additionally) the selection of "flexcan, m_can, mcp251xfd > and ti_hecc" enables CONFIG_CAN_RX_OFFLOAD too. > > Right? Yes, this is correct. Maybe what troubles you is the meaning of the "x --> y" arrow in the graph. I said it denotes that "y depends on x". Here "depends on" has a loose meaning. It translates to either: * Feature Y is encapsulated in Kbuild by some "if X/endif" and won't show up unless X is selected. * Feature Y has a "selects X" tag and will forcibly enable X if selected. CONFIG_CAN_*CALC*_BITTIMING is on the left side of an arrow starting from CONFIG_CAN_NETLINK so it "depends" on CONFIG_CAN_NETLINK. On the other hand, CONFIG_CAN_*CALC*_BITTIMING does not have any arrow starting from it so indeed, it can be enabled by the user independently of the other features as long as CONFIG_CAN_NETLINK is selected. CONFIG_CAN_RX_OFFLOAD is also on the left side of an arrow starting from CONFIG_CAN_NETLINK. Furthermore, there is an arrow starting from CONFIG_CAN_RX_OFFLOAD going to the "rx offload drivers". So those drivers need CONFIG_CAN_RX_OFFLOAD (which is implemented using the "selects CONFIG_CAN_RX_OFFLOAD"). However, CONFIG_CAN_RX_OFFLOAD can be selected independently of the "rx offload drivers" as long as its CONFIG_CAN_NETLINK dependency is met. So I think that the diagram is correct. Maybe rephrasing the cover letter as below would address your concerns? | Below diagrams illustrate the changes made. The arrow symbol "X --> Y" | denotes that "Y needs X". Most of the time, it is implemented using "if X" | and "endif" predicates in X’s Kbuild to encapsulate Y so that Y | does not show up unless X is selected. The exception is rx | offload which is implemented by adding a "selects | CONFIG_CAN_RX_OFFLOAD" tag in Y’s Kbuild. > > | > > +-> CAN devices relying on rx offload > > (at time of writing: flexcan, m_can, mcp251xfd and ti_hecc) Yours sincerely, Vincent Mailhol