Message ID | 20231228070941.3611649-1-tfiga@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-12475-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1846505dyb; Wed, 27 Dec 2023 23:10:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxksjuvkVSiGrx4kO7S9kZK3i+TDC8mKHFg2CcoBrcYbkt45VDnRtk9T1TaNY7XqbyYkxL X-Received: by 2002:aa7:8dd7:0:b0:6d9:8ab2:c853 with SMTP id j23-20020aa78dd7000000b006d98ab2c853mr9782302pfr.12.1703747415000; Wed, 27 Dec 2023 23:10:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703747414; cv=none; d=google.com; s=arc-20160816; b=dRmY5zM0men7Xtsbu47Hq2tD4hlSoOCPCoQUncKCnvxj66mc5K8ASlC08sdBXd9joc 5G5+uCaeqxHIQgHodGl58R/5Xp9HUWh/BfWcHBWy2XvfLqMceEUIcusJns+IsnXiazGg ZgDsEKVhxyucvGVMmXCClq1UN7koR4jjc8U3li5KutgpyvHhVAu1xoGV/JvPPyN4nrc6 eJA95yY7MiLzhnRx559PNRWWxMhLbI/ywbfoEZNoMB5rXHPVXyfDRKGJCovAInz4ESjK slRSmpBgxaCBe1qWy3W0fILD1l/f88PUkqi2ZxWoqPbdIwU7g/pWXxGSA/s36QSpKG8b Wzkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=EoqhO26zK6349/cY+3ITh8QstYG5iPWC2+7Y4ulVjaM=; fh=nDNkEcXibsdCPsVE8pFPVe48yJgl70QyP0VIzzepAhE=; b=h5ss+K1UEvEuIfm+vx7O8RxKx/amPIV8cqQd5+HFP7Sk2KcLlluDRC2Kp8r83Y5fY5 cKQKmitVr1KFYwTzxaCm64UYecrEPt10VohWiRvwdzBxlCkRURZMW06b7pFknAv7OknH FpIVD8+LE6Q/CwLatuQMy2LHM+ylnJUITMPtmynaMAGxIxmwLtn8QddmnjZtK9YNn1zR fYJIJsATP+D+rKngiBCLO+rMQdOsSa7KMjuBdGS/gsRgfGdaNI9F6lx5PeUYRejyKIo4 GrsZLzZ0Ov5tyQJ29y5nRD2WRps/s21WFwIs8KrLYFhzJXHDjhu2VVkag0TF5BvsSVe3 /tlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=INrGEv+i; spf=pass (google.com: domain of linux-kernel+bounces-12475-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12475-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v23-20020a63f857000000b005cdfc01dcc9si9780208pgj.245.2023.12.27.23.10.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 23:10:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12475-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=INrGEv+i; spf=pass (google.com: domain of linux-kernel+bounces-12475-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12475-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D4DD2281E40 for <ouuuleilei@gmail.com>; Thu, 28 Dec 2023 07:10:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4A6B63DC; Thu, 28 Dec 2023 07:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="INrGEv+i" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC5F06109 for <linux-kernel@vger.kernel.org>; Thu, 28 Dec 2023 07:09:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-28c075ad8e7so3840959a91.2 for <linux-kernel@vger.kernel.org>; Wed, 27 Dec 2023 23:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703747388; x=1704352188; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EoqhO26zK6349/cY+3ITh8QstYG5iPWC2+7Y4ulVjaM=; b=INrGEv+i3X4P5sBtW7GZWQPkcyoc4ZKPbJm8+LhgPsuiZLCCrzl4uo1IPJlfNd07T6 q/cQk6gQkoc6nt/ckh+Ghh+0XNKrlcLEAYprBmusEK3rJ96KdGY+b1Skc4LayZPvd1sZ uyXabYoDfucPwstRTxmg5gIR7sEazwhBFXLq8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703747388; x=1704352188; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EoqhO26zK6349/cY+3ITh8QstYG5iPWC2+7Y4ulVjaM=; b=l48XXdW7d3Pup8apph/2KLdJV8cwaAgCofcxy99zPxWxDE5f7Br/p+Iju0f09upexy EyHd4sQEmi548BHevChZy5oooJ3LMvhzjisN5dqDcotMcgyG6hPzOoQ4g+WIBn6mn5Nm UU5Xle+2EZHK0qonGPxwOGA1JH11XKHr9Ed06P04iHZm1AJMtEjQagkSRslW0zgruzYl +KWVOIaASE5OoO9cRNDn2Vfv42mhPFK2yCQz+GDmMhk5adHpvMRbeApx97pfMIIfq1RG 6eWoKRZUaGRUdC/7q2PuxcEoQk58Lue9Yq+VwP5n0h8XGG17LVgwVPzYAexS+jsrWvAC AYqg== X-Gm-Message-State: AOJu0Yy0WBY0HTDSUJvRhPn1hSY1yj7LBaMq4Gmlq4X2GJWZck2z/xA4 xIXsboQfw+1PTaCj+jXZAQFnQ28L7s6F X-Received: by 2002:a17:90b:b83:b0:28b:e124:1afb with SMTP id bd3-20020a17090b0b8300b0028be1241afbmr5169012pjb.37.1703747388048; Wed, 27 Dec 2023 23:09:48 -0800 (PST) Received: from basement.c.googlers.com.com (112.157.221.35.bc.googleusercontent.com. [35.221.157.112]) by smtp.gmail.com with ESMTPSA id 28-20020a17090a019c00b0028b2262e0cdsm19068454pjc.56.2023.12.27.23.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 23:09:47 -0800 (PST) From: Tomasz Figa <tfiga@chromium.org> To: Masahiro Yamada <masahiroy@kernel.org> Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky <senozhatsky@chromium.org>, Tomasz Figa <tfiga@chromium.org> Subject: [PATCH] kconfig: Add a build target for checking current config for issues Date: Thu, 28 Dec 2023 16:09:41 +0900 Message-ID: <20231228070941.3611649-1-tfiga@chromium.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786508648938488028 X-GMAIL-MSGID: 1786508648938488028 |
Series |
kconfig: Add a build target for checking current config for issues
|
|
Commit Message
Tomasz Figa
Dec. 28, 2023, 7:09 a.m. UTC
The new target is called 'checkconfig' and currently is basically an
alias for `listnewconfig` with KCONFIG_WARN_UNKNOWN_SYMBOLS set to true.
It can be used to validate if the current config is directly compatible
with the current kernel version or needs some manual adjustment.
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
---
scripts/kconfig/Makefile | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Thu, Dec 28, 2023 at 4:09 PM Tomasz Figa <tfiga@chromium.org> wrote: > > The new target is called 'checkconfig' and currently is basically an > alias for `listnewconfig` with KCONFIG_WARN_UNKNOWN_SYMBOLS set to true. > It can be used to validate if the current config is directly compatible > with the current kernel version or needs some manual adjustment. > > Signed-off-by: Tomasz Figa <tfiga@chromium.org> I rejected a new target in the past. https://lore.kernel.org/all/20230817012007.131868-1-senozhatsky@chromium.org/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a Instead, you can run KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig or make W=c listnewconfig > --- > scripts/kconfig/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile > index 4eee155121a8..501cb9b76414 100644 > --- a/scripts/kconfig/Makefile > +++ b/scripts/kconfig/Makefile > @@ -81,6 +81,9 @@ PHONY += savedefconfig defconfig > savedefconfig: $(obj)/conf > $(Q)$< $(silent) --$@=defconfig $(Kconfig) > > +checkconfig: $(obj)/conf > + $(Q)KCONFIG_WARN_UNKNOWN_SYMBOLS=true $< --listnewconfig $(Kconfig) > + > defconfig: $(obj)/conf > ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" > @@ -144,6 +147,7 @@ help: > @echo ' default value without prompting' > @echo ' tinyconfig - Configure the tiniest possible kernel' > @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' > + @echo ' checkconfig - Check current config for unrecognized and new symbols' > @echo '' > @echo 'Configuration topic targets:' > @$(foreach f, $(all-config-fragments), \ > -- > 2.43.0.472.g3155946c3a-goog > -- Best Regards Masahiro Yamada
On Fri, Dec 29, 2023 at 1:11 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > On Thu, Dec 28, 2023 at 4:09 PM Tomasz Figa <tfiga@chromium.org> wrote: > > > > The new target is called 'checkconfig' and currently is basically an > > alias for `listnewconfig` with KCONFIG_WARN_UNKNOWN_SYMBOLS set to true. > > It can be used to validate if the current config is directly compatible > > with the current kernel version or needs some manual adjustment. > > > > Signed-off-by: Tomasz Figa <tfiga@chromium.org> > > > I rejected a new target in the past. > > https://lore.kernel.org/all/20230817012007.131868-1-senozhatsky@chromium.org/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a > That was specifically for the unrecognized symbols warning. What I'm proposing is a universal target that would include any possible diagnostics. > > > Instead, you can run > > KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig > > or > > make W=c listnewconfig > > I can do so, because my team member implemented it and told me and other team members about it. But how would someone who hasn't heard about it be aware of the existence of this useful feature? Best regards, Tomasz
On Wed, Jan 10, 2024 at 10:15 PM Tomasz Figa <tfiga@chromium.org> wrote: > > On Fri, Dec 29, 2023 at 1:11 AM Masahiro Yamada <masahiroy@kernelorg> wrote: > > > > On Thu, Dec 28, 2023 at 4:09 PM Tomasz Figa <tfiga@chromium.org> wrote: > > > > > > The new target is called 'checkconfig' and currently is basically an > > > alias for `listnewconfig` with KCONFIG_WARN_UNKNOWN_SYMBOLS set to true. > > > It can be used to validate if the current config is directly compatible > > > with the current kernel version or needs some manual adjustment. > > > > > > Signed-off-by: Tomasz Figa <tfiga@chromium.org> > > > > > > I rejected a new target in the past. > > > > https://lore.kernel.org/all/20230817012007.131868-1-senozhatsky@chromium.org/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a > > > > That was specifically for the unrecognized symbols warning. What I'm > proposing is a universal target that would include any possible > diagnostics. > > > > > > > Instead, you can run > > > > KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig > > > > or > > > > make W=c listnewconfig > > > > > > I can do so, because my team member implemented it and told me and > other team members about it. But how would someone who hasn't heard > about it be aware of the existence of this useful feature? People are not aware of your 'checkconfig' until they run 'make help'. The same for W=c. 'make help' explains it. c: extra checks in the configuration stage (Kconfig)
On Sat, Jan 13, 2024 at 7:51 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > On Wed, Jan 10, 2024 at 10:15 PM Tomasz Figa <tfiga@chromium.org> wrote: > > > > On Fri, Dec 29, 2023 at 1:11 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > > > > > On Thu, Dec 28, 2023 at 4:09 PM Tomasz Figa <tfiga@chromium.org> wrote: > > > > > > > > The new target is called 'checkconfig' and currently is basically an > > > > alias for `listnewconfig` with KCONFIG_WARN_UNKNOWN_SYMBOLS set to true. > > > > It can be used to validate if the current config is directly compatible > > > > with the current kernel version or needs some manual adjustment. > > > > > > > > Signed-off-by: Tomasz Figa <tfiga@chromium.org> > > > > > > > > > I rejected a new target in the past. > > > > > > https://lore.kernel.org/all/20230817012007.131868-1-senozhatsky@chromium.org/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a > > > > > > > That was specifically for the unrecognized symbols warning. What I'm > > proposing is a universal target that would include any possible > > diagnostics. > > > > > > > > > > > Instead, you can run > > > > > > KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig > > > > > > or > > > > > > make W=c listnewconfig > > > > > > > > > > I can do so, because my team member implemented it and told me and > > other team members about it. But how would someone who hasn't heard > > about it be aware of the existence of this useful feature? > > > People are not aware of your 'checkconfig' until > they run 'make help'. > > The same for W=c. > > 'make help' explains it. > > > c: extra checks in the configuration stage (Kconfig) Okay, that wasn't something present in Linux 6.7-rc7 that I used as my base. I checked out the current linux-next and it's indeed there, which I guess resolves the original problem somewhat. I still don't think it would be very clear from the description for a new user, especially given that it's far below the config-related targets, but at least it's there. Thanks for adding it. Best regards, Tomasz
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 4eee155121a8..501cb9b76414 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -81,6 +81,9 @@ PHONY += savedefconfig defconfig savedefconfig: $(obj)/conf $(Q)$< $(silent) --$@=defconfig $(Kconfig) +checkconfig: $(obj)/conf + $(Q)KCONFIG_WARN_UNKNOWN_SYMBOLS=true $< --listnewconfig $(Kconfig) + defconfig: $(obj)/conf ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" @@ -144,6 +147,7 @@ help: @echo ' default value without prompting' @echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' + @echo ' checkconfig - Check current config for unrecognized and new symbols' @echo '' @echo 'Configuration topic targets:' @$(foreach f, $(all-config-fragments), \