From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8C7BC433FF for ; Tue, 30 Jul 2019 11:10:42 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6222420693 for ; Tue, 30 Jul 2019 11:10:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6222420693 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=crashcourse.ca Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92) (envelope-from ) id 1hsQ16-0000at-EX; Tue, 30 Jul 2019 07:10:04 -0400 Received: from cpanel4.indieserve.net ([199.212.143.9] helo=aisupplychain.ca) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hsQ14-0000ae-Uw for kernelnewbies@kernelnewbies.org; Tue, 30 Jul 2019 07:10:03 -0400 Received: from cpeac202e043973-cmac202e043970.sdns.net.rogers.com ([174.114.100.179]:40240 helo=localhost.localdomain) by cpanel4.indieserve.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hsQ11-003RkL-VN for kernelnewbies@kernelnewbies.org; Tue, 30 Jul 2019 07:10:00 -0400 Date: Tue, 30 Jul 2019 07:09:58 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: Kernel Newbies Subject: first of a few questions about kbuild system Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel4.indieserve.net X-AntiAbuse: Original Domain - kernelnewbies.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Get-Message-Sender-Via: cpanel4.indieserve.net: authenticated_id: rpjday+crashcourse.ca/only user confirmed/virtual account not confirmed X-Authenticated-Sender: cpanel4.indieserve.net: rpjday@crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org friend who is getting into kernel programming wants to submit a few patches just to get experience contributing to kernel, and i suggested there's always potential cleanup in the numerous Kconfig files, but i want to make *absolutely* sure i'm giving good advice so if i could clarify a couple things (and, yes, they look trivial, but i've been burned before thinking things are straightforward). first, the doc file kconfig-language.rst proposes the equivalence between a single "if M" conditional versus individually depending on the same Kconfig variable in each directive: In practice, this is achieved by using one of the next two constructs:: (1): menuconfig M if M config C1 config C2 endif (2): menuconfig M config C1 depends on M config C2 depends on M as an example, consider this from the current version of init/Kconfig: menuconfig MODULES bool "Enable loadable module support" option modules help ... snip ... if MODULES ... config MODULE_SIG bool "Module signature verification" depends on MODULES <--- ... config MODULE_COMPRESS bool "Compress modules on installation" depends on MODULES <--- ... etc etc ... endif # MODULES it *should* be obvious that, between "if MODULES" and the corresponding "endif", there should be no need for an explicit dependency on "MODULES", correct? i ask since i have vague memories of there being some subtleties if Kbuild symbols are tristate rather than simply bool but, in this case, since MODULES is bool, any such dependencies should be redundant, correct? am i overlooking any possible complications? as an associated (and much longer) example, in that same init/Kconfig file: menuconfig EXPERT bool "Configure standard kernel features (expert users)" # Unhide debug options, to make the on-by-default options visible select DEBUG_KERNEL ... snip ... after which there are *numerous* config options whose prompt string is qualified with conditional "if EXPERT": config UID16 bool "Enable 16-bit UID system calls" if EXPERT all the way down to: # end of the "standard kernel features (expert users)" menu # syscall, maps, verifier config BPF_SYSCALL assuming that, in the midst of all those config directives, there is not a single directive that does *not* in some way depend on EXPERT, could that entire section not simply be wrapped in "if EXPERT" and "endif" as well? i just want to verify that i'm not overlooking, perhaps, any changes to the Kbuild infrastructure that i'm unaware of. thanks. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies