From nobody Wed Feb 11 10:01:29 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC8F2134B1; Sun, 21 Apr 2024 12:08:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713701313; cv=none; b=g5JdBpeK0mFEDIrnfFQdioaMug8PtZaYPoEJCHAiQ7bXxKvx/+gcTEtjBkZgi/gF3xKYPqTWuWOoSsDy3VMiJt6hAgWkV/mvht7WksD9TgyfxY1+o8+Pu2YMACep4LV6xcETzAuPWNtk9+psiSr6/K+gE51UwuInR4iW+vURgIE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713701313; c=relaxed/simple; bh=5pdOG3fqB9EcBpM+IoDRFdTWt7Wc0FiNnfI3JC9igOQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MGFj1/a5dKonQ3t9M0EzSm9OhoOkGZYUOKG0ImhRMNEuJy6QwEzNx/PskMOKIwmtJ7FItLdr5GoW2YJtFVMWNp8VFILfwaPqnWpXrKWfPKWQPCYIg2D7UakO8Y0Ld+sZQT4gW8sBPVyLDuKc/sL4dr12o6Lw6+d/xayTq9QdC8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b0oOt+64; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b0oOt+64" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B71B1C2BD10; Sun, 21 Apr 2024 12:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713701312; bh=5pdOG3fqB9EcBpM+IoDRFdTWt7Wc0FiNnfI3JC9igOQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b0oOt+64fb2EielyhtFl7k7aANFhZT378KUu8c1XVSK5Mov4yr839kX5d9FqslIsd x9eBjUJk3V+49FP0NhD6kPhKM++38UzTC/TAIF/AirT772K94vSoMx4wIFL8c/Og7m apJ2QvqWSoAnWlieG5qeh9a176nRqkuEkOMZLQOCBN1Y6jOiGRGwhxIc5nsGNTblRA C2txMO/CZ2R9WferZtJU7WF7dU6Jl7EzdvxrcedXiCuhRcERus7wpWMu9oMCi4Uryf +41fnv8rrHVz9YXAtzyKdy7skhpu3ij+5cXLBTpsqXh8pYcFMOl6nnRWO3f5f7hj1V F+ds5v29PyEnw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, Masahiro Yamada Subject: [PATCH 1/2] sh: convert the last use of 'optional' property in Kconfig Date: Sun, 21 Apr 2024 21:08:23 +0900 Message-Id: <20240421120824.2713923-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240421120824.2713923-1-masahiroy@kernel.org> References: <20240421120824.2713923-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The 'choice' statement is primarily used to exclusively select one option, but the 'optional' property allows all entries to be disabled. This feature is only used in arch/sh/Kconfig because the equivalent outcome can be achieved by inserting one more entry as a place-holder. This approach is commonly used, for example, LTO_NONE, DEBUG_INFO_NONE, INITRAMFS_COMPRESSION_NONE, etc. The 'optional' property support will be removed from Kconfig. This commit converts the last user. Note: The 'default CMDLINE_OVERWRITE' statement does not work as intended in combination with 'optional'. If neither CONFIG_CMDLINE_OVERWRITE nor CONFIG_CMD_EXTEND is specified in a defconfig file, both of them are disabled. This is a bug. To maintain the current behavior, I added CONFIG_CMD_NO_MODIFY=3Dy to those defconfig files. Signed-off-by: Masahiro Yamada --- arch/sh/Kconfig | 6 +++++- arch/sh/configs/apsh4a3a_defconfig | 1 + arch/sh/configs/apsh4ad0a_defconfig | 1 + arch/sh/configs/edosk7705_defconfig | 1 + arch/sh/configs/hp6xx_defconfig | 1 + arch/sh/configs/landisk_defconfig | 1 + arch/sh/configs/magicpanelr2_defconfig | 1 + arch/sh/configs/rsk7264_defconfig | 1 + arch/sh/configs/rsk7269_defconfig | 1 + arch/sh/configs/se7619_defconfig | 1 + arch/sh/configs/se7705_defconfig | 1 + arch/sh/configs/se7722_defconfig | 1 + arch/sh/configs/se7750_defconfig | 1 + arch/sh/configs/secureedge5410_defconfig | 1 + arch/sh/configs/sh7710voipgw_defconfig | 1 + arch/sh/configs/sh7724_generic_defconfig | 1 + arch/sh/configs/sh7770_generic_defconfig | 1 + arch/sh/configs/sh7785lcr_32bit_defconfig | 1 + arch/sh/configs/sh7785lcr_defconfig | 1 + arch/sh/configs/urquell_defconfig | 1 + 20 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 2ad3e29f0ebe..bebc801c9619 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -709,7 +709,6 @@ config ROMIMAGE_MMCIF =20 choice prompt "Kernel command line" - optional default CMDLINE_OVERWRITE help Setting this option allows the kernel command line arguments @@ -727,6 +726,11 @@ config CMDLINE_EXTEND Given string will be concatenated with arguments passed in by a bootloader. =20 +config CMDLINE_NO_MODIFY + bool "Do not modify bootloader kernel arguments" + help + Given string will be used as-is. + endchoice =20 config CMDLINE diff --git a/arch/sh/configs/apsh4a3a_defconfig b/arch/sh/configs/apsh4a3a_= defconfig index cc909f347877..25ba2e55c546 100644 --- a/arch/sh/configs/apsh4a3a_defconfig +++ b/arch/sh/configs/apsh4a3a_defconfig @@ -15,6 +15,7 @@ CONFIG_MEMORY_START=3D0x0C000000 CONFIG_FLATMEM_MANUAL=3Dy CONFIG_SH_STORE_QUEUES=3Dy CONFIG_SH_APSH4A3A=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_HIGH_RES_TIMERS=3Dy CONFIG_KEXEC=3Dy CONFIG_PREEMPT=3Dy diff --git a/arch/sh/configs/apsh4ad0a_defconfig b/arch/sh/configs/apsh4ad0= a_defconfig index 64558bf60e10..36a6fbb71c0f 100644 --- a/arch/sh/configs/apsh4ad0a_defconfig +++ b/arch/sh/configs/apsh4ad0a_defconfig @@ -42,6 +42,7 @@ CONFIG_SECCOMP=3Dy CONFIG_PREEMPT=3Dy # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_BINFMT_MISC=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_PM=3Dy CONFIG_PM_DEBUG=3Dy CONFIG_PM=3Dy diff --git a/arch/sh/configs/edosk7705_defconfig b/arch/sh/configs/edosk770= 5_defconfig index 9ee35269bee2..9bb371ad4273 100644 --- a/arch/sh/configs/edosk7705_defconfig +++ b/arch/sh/configs/edosk7705_defconfig @@ -19,6 +19,7 @@ CONFIG_CPU_SUBTYPE_SH7705=3Dy CONFIG_SH_EDOSK7705=3Dy CONFIG_SH_PCLK_FREQ=3D31250000 +CONFIG_CMDLINE_NO_MODIFY=3Dy # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_INPUT is not set # CONFIG_SERIO is not set diff --git a/arch/sh/configs/hp6xx_defconfig b/arch/sh/configs/hp6xx_defcon= fig index 0c45f2a0f9bd..d0746e6ecfa9 100644 --- a/arch/sh/configs/hp6xx_defconfig +++ b/arch/sh/configs/hp6xx_defconfig @@ -15,6 +15,7 @@ CONFIG_SH_DMA_API=3Dy CONFIG_HD64461_ENABLER=3Dy CONFIG_PCCARD=3Dy CONFIG_PM=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_APM_EMULATION=3Dy # CONFIG_STANDALONE is not set CONFIG_BLK_DEV_SD=3Dy diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_de= fconfig index 541082090918..08e1e301b83b 100644 --- a/arch/sh/configs/landisk_defconfig +++ b/arch/sh/configs/landisk_defconfig @@ -15,6 +15,7 @@ CONFIG_KEXEC=3Dy CONFIG_PCI=3Dy CONFIG_PCCARD=3Dy CONFIG_YENTA=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy CONFIG_UNIX=3Dy diff --git a/arch/sh/configs/magicpanelr2_defconfig b/arch/sh/configs/magic= panelr2_defconfig index 52937f9cc2ab..fdb2f95b9c35 100644 --- a/arch/sh/configs/magicpanelr2_defconfig +++ b/arch/sh/configs/magicpanelr2_defconfig @@ -22,6 +22,7 @@ CONFIG_SH_PCLK_FREQ=3D24000000 CONFIG_SH_DMA=3Dy CONFIG_SH_DMA_API=3Dy CONFIG_HEARTBEAT=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy CONFIG_UNIX=3Dy diff --git a/arch/sh/configs/rsk7264_defconfig b/arch/sh/configs/rsk7264_de= fconfig index a88cb3b77957..6d1694e24634 100644 --- a/arch/sh/configs/rsk7264_defconfig +++ b/arch/sh/configs/rsk7264_defconfig @@ -21,6 +21,7 @@ CONFIG_MEMORY_START=3D0x0c000000 CONFIG_FLATMEM_MANUAL=3Dy CONFIG_CPU_BIG_ENDIAN=3Dy CONFIG_SH_RSK=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy # CONFIG_SH_TIMER_MTU2 is not set CONFIG_BINFMT_FLAT=3Dy CONFIG_NET=3Dy diff --git a/arch/sh/configs/rsk7269_defconfig b/arch/sh/configs/rsk7269_de= fconfig index d9a7ce783c9b..e4086d9b4fd9 100644 --- a/arch/sh/configs/rsk7269_defconfig +++ b/arch/sh/configs/rsk7269_defconfig @@ -10,6 +10,7 @@ CONFIG_MEMORY_SIZE=3D0x02000000 CONFIG_FLATMEM_MANUAL=3Dy CONFIG_CPU_BIG_ENDIAN=3Dy CONFIG_SH_RSK=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy # CONFIG_SH_TIMER_MTU2 is not set CONFIG_SH_PCLK_FREQ=3D66700000 CONFIG_BINFMT_FLAT=3Dy diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defc= onfig index 14d0f5ead502..bc3105bd33d2 100644 --- a/arch/sh/configs/se7619_defconfig +++ b/arch/sh/configs/se7619_defconfig @@ -14,6 +14,7 @@ CONFIG_FLATMEM_MANUAL=3Dy CONFIG_CPU_BIG_ENDIAN=3Dy CONFIG_SH_7619_SOLUTION_ENGINE=3Dy CONFIG_HZ_100=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_BINFMT_FLAT=3Dy CONFIG_BINFMT_ZFLAT=3Dy # CONFIG_STANDALONE is not set diff --git a/arch/sh/configs/se7705_defconfig b/arch/sh/configs/se7705_defc= onfig index 16a0f72f0822..efe34f6f9c18 100644 --- a/arch/sh/configs/se7705_defconfig +++ b/arch/sh/configs/se7705_defconfig @@ -13,6 +13,7 @@ CONFIG_FLATMEM_MANUAL=3Dy # CONFIG_SH_ADC is not set CONFIG_SH_SOLUTION_ENGINE=3Dy CONFIG_HEARTBEAT=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_PREEMPT=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defc= onfig index 09e455817447..bf7deaf881a3 100644 --- a/arch/sh/configs/se7722_defconfig +++ b/arch/sh/configs/se7722_defconfig @@ -17,6 +17,7 @@ CONFIG_SH_7722_SOLUTION_ENGINE=3Dy CONFIG_NO_HZ=3Dy CONFIG_HIGH_RES_TIMERS=3Dy CONFIG_HEARTBEAT=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_KEXEC=3Dy CONFIG_PREEMPT=3Dy CONFIG_NET=3Dy diff --git a/arch/sh/configs/se7750_defconfig b/arch/sh/configs/se7750_defc= onfig index 5fa6239ae4ea..2d0cd40f9634 100644 --- a/arch/sh/configs/se7750_defconfig +++ b/arch/sh/configs/se7750_defconfig @@ -15,6 +15,7 @@ CONFIG_FLATMEM_MANUAL=3Dy CONFIG_SH_SOLUTION_ENGINE=3Dy CONFIG_SH_PCLK_FREQ=3D33333333 CONFIG_HEARTBEAT=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy CONFIG_UNIX=3Dy diff --git a/arch/sh/configs/secureedge5410_defconfig b/arch/sh/configs/sec= ureedge5410_defconfig index 120176afe3f6..4ffdb1049d89 100644 --- a/arch/sh/configs/secureedge5410_defconfig +++ b/arch/sh/configs/secureedge5410_defconfig @@ -10,6 +10,7 @@ CONFIG_SH_SECUREEDGE5410=3Dy CONFIG_SH_DMA=3Dy CONFIG_SH_DMA_API=3Dy CONFIG_PCI=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_NET=3Dy CONFIG_INET=3Dy # CONFIG_INET_XFRM_MODE_TRANSPORT is not set diff --git a/arch/sh/configs/sh7710voipgw_defconfig b/arch/sh/configs/sh771= 0voipgw_defconfig index 7f742729df69..6d7842542caf 100644 --- a/arch/sh/configs/sh7710voipgw_defconfig +++ b/arch/sh/configs/sh7710voipgw_defconfig @@ -15,6 +15,7 @@ CONFIG_MEMORY_SIZE=3D0x00800000 CONFIG_FLATMEM_MANUAL=3Dy # CONFIG_SH_ADC is not set CONFIG_SH_PCLK_FREQ=3D32768000 +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy CONFIG_UNIX=3Dy diff --git a/arch/sh/configs/sh7724_generic_defconfig b/arch/sh/configs/sh7= 724_generic_defconfig index cbc9389a89a8..04bb71aeeb44 100644 --- a/arch/sh/configs/sh7724_generic_defconfig +++ b/arch/sh/configs/sh7724_generic_defconfig @@ -12,6 +12,7 @@ CONFIG_CPU_FREQ=3Dy CONFIG_SH_CPU_FREQ=3Dy CONFIG_KEXEC=3Dy CONFIG_KEXEC_JUMP=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_HIBERNATION=3Dy CONFIG_CPU_IDLE=3Dy # CONFIG_PREVENT_FIRMWARE_BUILD is not set diff --git a/arch/sh/configs/sh7770_generic_defconfig b/arch/sh/configs/sh7= 770_generic_defconfig index ee2357deba0f..5561ad497938 100644 --- a/arch/sh/configs/sh7770_generic_defconfig +++ b/arch/sh/configs/sh7770_generic_defconfig @@ -14,6 +14,7 @@ CONFIG_SH_CPU_FREQ=3Dy CONFIG_KEXEC=3Dy CONFIG_KEXEC_JUMP=3Dy CONFIG_PM=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_HIBERNATION=3Dy CONFIG_CPU_IDLE=3Dy # CONFIG_PREVENT_FIRMWARE_BUILD is not set diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh= 7785lcr_32bit_defconfig index 59262f42abe6..e742b7c37f2d 100644 --- a/arch/sh/configs/sh7785lcr_32bit_defconfig +++ b/arch/sh/configs/sh7785lcr_32bit_defconfig @@ -32,6 +32,7 @@ CONFIG_PREEMPT=3Dy CONFIG_INTC_USERIMASK=3Dy CONFIG_PCI=3Dy CONFIG_PCI_DEBUG=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_PM=3Dy CONFIG_CPU_IDLE=3Dy CONFIG_NET=3Dy diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lc= r_defconfig index 94381f8268ff..5d4fda1fe672 100644 --- a/arch/sh/configs/sh7785lcr_defconfig +++ b/arch/sh/configs/sh7785lcr_defconfig @@ -17,6 +17,7 @@ CONFIG_HEARTBEAT=3Dy CONFIG_KEXEC=3Dy CONFIG_PREEMPT=3Dy CONFIG_PCI=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_NET=3Dy CONFIG_PACKET=3Dy CONFIG_UNIX=3Dy diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_de= fconfig index 445bb451a5ec..fb9872609e38 100644 --- a/arch/sh/configs/urquell_defconfig +++ b/arch/sh/configs/urquell_defconfig @@ -34,6 +34,7 @@ CONFIG_PCIEPORTBUS=3Dy CONFIG_PCIEASPM_DEBUG=3Dy CONFIG_PCI_DEBUG=3Dy CONFIG_BINFMT_MISC=3Dy +CONFIG_CMDLINE_NO_MODIFY=3Dy CONFIG_PM=3Dy CONFIG_CPU_IDLE=3Dy CONFIG_NET=3Dy --=20 2.40.1