Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp44541pxb; Wed, 25 Aug 2021 19:30:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg0ci0VIUIdSjLUAoqPuQg3oZCcEvQ8KrLKSbdJ6XtY9DMVqV1rfL+jfhQryxw3tbZtq3+ X-Received: by 2002:a05:6402:4406:: with SMTP id y6mr1675693eda.242.1629945000998; Wed, 25 Aug 2021 19:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629945000; cv=none; d=google.com; s=arc-20160816; b=X6T55fjShlV6med4hWnXrsvqyC3+fixcRaOWmglSXcDZryuqDraIYFAWCiwWj1w0Am q7rZxWn1gmf6KqWI4VMIcb0oGrF5lYuVv/acNRRwQRITkjfnRwjf9dGoFfzMMWT5nBXe Kja2/7cfX7wjR27DnUMGYKm2qsC23O25pat8pXB5L7aHpQxh6oM7wqhVbqnE5GfJ7Qrx 9XmkTTYQPj4BcE91MWxs4sXf1q6xiPxHSqDl8TYhDPdMSbLO6ceyoayo5FsZWUc2QmjY nkZuuYE5T12PtfCLoNp2HoknDPDx8o7zvCGfe7rvjsION8D9i1f5mSUM56Egag9Zmsy+ hBGw== 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:dkim-signature:dkim-filter; bh=d+AhyAERcvxh7BiYq2ElJkN7iLAXCwUv6UgSMsPKu74=; b=0r5EgqUaHj+7EstWZ1sn4bZVeF/yZ+yZd//VF+Nan3vxHwUHqeVHngQ+YGadbync6X VwGup3w4LpcYh+CPcwRjnXxiWj8XzUyOOyX/x4bChGct6b3UzAjYT5xjEfyCAutmJW4G cAvaqWLvyEdD5aAIFvBio19aKVaNT/stsEtHoUR5xsY8m3xeRSae9x8LnNNl3+sTt+t8 HodlHJhQeQ/W1CoSr/Hwungyp1AyyOE+cK3eMCYtra8vZIXKzwatlth95MPP8ODIeXtB sHubc6dGPuUEa4i7TrkTOprBp7KrT2jhXt5/+dL+1u1fXBQHUILuLMJa0vNCOHNS4KH4 xHXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CNgzwNhG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si1841610ejo.47.2021.08.25.19.29.23; Wed, 25 Aug 2021 19:30:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CNgzwNhG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S237641AbhHZC0J (ORCPT + 99 others); Wed, 25 Aug 2021 22:26:09 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:27592 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237584AbhHZC0I (ORCPT ); Wed, 25 Aug 2021 22:26:08 -0400 X-Greylist: delayed 79598 seconds by postgrey-1.27 at vger.kernel.org; Wed, 25 Aug 2021 22:26:07 EDT Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 17Q2OrdX005266; Thu, 26 Aug 2021 11:24:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 17Q2OrdX005266 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1629944693; bh=d+AhyAERcvxh7BiYq2ElJkN7iLAXCwUv6UgSMsPKu74=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CNgzwNhGDlLum2EBrBPzXzIdyjpIas0Y+NGmekx/BDBP1E7B39hjx6NP8GxxzN8dc jxUGzqsab/nL5UXGq7eyHvnQLst1jqoH2G5HU2Z7uAqahoIiumWZL60vtzOA84ybQm Uh7MHhofTbhUAgfPNROwLJsKcUGdea4vVad0tZRjN1wBEMlJHjnF7WTcEiuktq5eyk ft80RzSYGRxTEeKtazr9OBbZ7buOkh/CMexm490CU+0JiQlxbZBTsQ1i5EUXbwZroa Q6NEhp6o1PtbnyOkcLONBqoQt2z6Lwr84DxJcnqTUiL2jjBcNXTLAyupBjah3P3tan Njey37RG80jsw== X-Nifty-SrcIP: [209.85.216.53] Received: by mail-pj1-f53.google.com with SMTP id j1so1137976pjv.3; Wed, 25 Aug 2021 19:24:53 -0700 (PDT) X-Gm-Message-State: AOAM532MFFhPHKVuJzSVjf2J14BZSXa/b725jm2lCSagUYgRP6ywpB1E jUjnsS8RlcWMZwzygyEsr4Gn3LjyIpfPLh7veQI= X-Received: by 2002:a17:90a:a581:: with SMTP id b1mr1441813pjq.153.1629944692537; Wed, 25 Aug 2021 19:24:52 -0700 (PDT) MIME-Version: 1.0 References: <20210825041637.365171-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Thu, 26 Aug 2021 11:24:15 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: forbid symbols that end with '_MODULE' To: Boris Kolpackov Cc: Linux Kbuild mailing list , "David S. Miller" , Jakub Kicinski , Jaroslav Kysela , Kalle Valo , Liam Girdwood , Luca Coelho , Mark Brown , Peter Ujfalusi , Takashi Iwai , ALSA Development Mailing List , Linux Kernel Mailing List , linux-wireless@vger.kernel.org, Networking Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, Aug 26, 2021 at 12:42 AM Boris Kolpackov wrote: > > Masahiro Yamada writes: > > > Kconfig (syncconfig) generates include/generated/autoconf.h to make > > CONFIG options available to the pre-processor. > > > > The macros are suffixed with '_MODULE' for symbols with the value 'm'. > > > > Here is a conflict; CONFIG_FOO=m results in '#define CONFIG_FOO_MODULE 1', > > but CONFIG_FOO_MODULE=y also results in the same define. > > > > fixdep always assumes CONFIG_FOO_MODULE comes from CONFIG_FOO=m, so the > > dependency is not properly tracked for symbols that end with '_MODULE'. > > It seem to me the problem is in autoconf.h/fixdep, not in the Kconfig > language. Partly a Kconfig problem since autoconf.h is generated by Kconfig. So, what is your suggestion for doing this correctly? (of course without breaking the compatibility because this is how the kernel is configured/built for more than 20 years) > > > This commit makes Kconfig error out if it finds a symbol suffixed with > > '_MODULE'. > > I know you don't care, but I will voice my objection, for the record: > Kconfig is used by projects other than the Linux kernel and some of > them do not use the autoconf.h functionality. For such projects this > restriction seems arbitrary and potentially backwards-incompatible. I am not sure what your worry is, but this check resides in "if (modules_sym)" conditional, so projects using Kconfig but not module functionality (e.g. buildroot) will not be affected. -- Best Regards Masahiro Yamada