CONFIG_IS_ENABLED vs IS_ENABLED
v5 cover CONFIG_IS_ENABLED vs IS_ENABLED
This patch set gets ready to checks the usage of CONFIG_IS_ENABLED/IS_ENABLED.
After the set has been applied, you can delete test/usage_of_is_enabled_todo.txt
and run test/usage_of_is_enabled_commit.sh
The script test/usage_of_is_enabled_check.sh checks for new questionable uses of CONFIG_IS_ENABLED/IS_ENABLED and is added to .azure-pipelines.yml, and .gitlab-ci.yml
version 5 changes:
rebased on denx/next and updated todo with
rm test/usage_of_is_enabled_todo.txt test/usage_of_is_enabled_check.sh >test/usage_of_is_enabled_todo.txt
And delete the last 2 lines
sed -i '$d' test/usage_of_is_enabled_todo.txt sed -i '$d' test/usage_of_is_enabled_todo.txt
version 4 changes:
Down to just one patch, other issue fixed by other means Added the following new configs to todo
ACPIDM_CLKFEC_MXCFWU_MULTI_BANK_UPDATEIMX8M_VDD_SOC_850MV
MCFTMR
PANEL
SANDBOX64SPLASH_SCREENSPLASH_SOURCESPL_LOAD_FITUSB_ETH_RNDIS
VIDEOVIDEO_BPP16VIDEO_BPP32VIDEO_BPP8VIDEO_LOGOX86_32BIT_INIT
version 3 changes:
Dropped changes to puma-rk3399 and ringneck-px30 in favor of Quentin Schulz's patch
https://patchwork.ozlabs.org/project/uboot/patch/20230301-tsd-env-nowhere-kconfig-v1-1-d5c08e096906@theobroma-systems.com/
https://patchwork.ozlabs.org/project/uboot/patch/20230301-tsd-env-nowhere-kconfig-v1-2-d5c08e096906@theobroma-systems.com/
Please apply them before this series.
Drop gateworks: venice: Always define setup_fec and setup_eqos Drop arm: cpu: armv7: ls102xa: fdt: remove eth_device support Simon's patches took care of these
Add to todo list, these new questionable uses that snuck into the code. PARTITION_TYPE_GUID
PHY_ATHEROS
RTC_SANDBOX
(no changes since v1)
Troy Kisky (1):
CI: add test/usage_of_is_enabled_check.sh
.azure-pipelines.yml | 11 ++ .gitlab-ci.yml | 5 + test/usage_of_is_enabled_check.sh | 19 +++ test/usage_of_is_enabled_commit.sh | 12 ++ test/usage_of_is_enabled_correct.sh | 50 ++++++ test/usage_of_is_enabled_exempt.txt | 9 ++ test/usage_of_is_enabled_list.sh | 86 +++++++++++ test/usage_of_is_enabled_splcfg.txt | 21 +++ test/usage_of_is_enabled_todo.txt | 232 ++++++++++++++++++++++++++++ 9 files changed, 445 insertions(+) create mode 100755 test/usage_of_is_enabled_check.sh create mode 100755 test/usage_of_is_enabled_commit.sh create mode 100755 test/usage_of_is_enabled_correct.sh create mode 100644 test/usage_of_is_enabled_exempt.txt create mode 100755 test/usage_of_is_enabled_list.sh create mode 100644 test/usage_of_is_enabled_splcfg.txt create mode 100644 test/usage_of_is_enabled_todo.txt
Signature · 1 line
2.34.1
PATCH v5 1/1 CI: add test/usage_of_is_enabled_check.sh
Add script usage_of_is_enabled_check to print any configs that use CONFIG_IS_ENABLED instead of IS_ENABLED and vice versa.
Add usage_of_is_enabled_commit.sh to generate commits to fix the above issues.
You can remove entries from test/usage_of_is_enabled_todo.txt or the entire file and then run test/usage_of_is_enabled_commit.sh
to convert to suggested usage of CONFIG_IS_ENABLED/IS_ENABLED
or run test/usage_of_is_enabled_check.sh to
see which configs are still todo.
---
(no changes since v1)
.azure-pipelines.yml | 11 ++ .gitlab-ci.yml | 5 + test/usage_of_is_enabled_check.sh | 19 +++ test/usage_of_is_enabled_commit.sh | 12 ++ test/usage_of_is_enabled_correct.sh | 50 ++++++ test/usage_of_is_enabled_exempt.txt | 9 ++ test/usage_of_is_enabled_list.sh | 86 +++++++++++ test/usage_of_is_enabled_splcfg.txt | 21 +++ test/usage_of_is_enabled_todo.txt | 232 ++++++++++++++++++++++++++++ 9 files changed, 445 insertions(+) create mode 100755 test/usage_of_is_enabled_check.sh create mode 100755 test/usage_of_is_enabled_commit.sh create mode 100755 test/usage_of_is_enabled_correct.sh create mode 100644 test/usage_of_is_enabled_exempt.txt create mode 100755 test/usage_of_is_enabled_list.sh create mode 100644 test/usage_of_is_enabled_splcfg.txt create mode 100644 test/usage_of_is_enabled_todo.txt
.azure-pipelines.yml +11 -0
@@ -67,6 +67,17 @@ stages: :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0 + - job: check_usage_of_is_enabled + displayName: 'Check usage of CONFIG_IS_ENABLED vs IS_ENABLED' + pool: + vmImage: $(ubuntu_vm) + container: + image: $(ci_runner_image) + options: $(container_option) + steps: + # generate list of SPL configs + - script: test/usage_of_is_enabled_check.sh + - job: docs displayName: 'Build documentation' pool:
.gitlab-ci.yml +5 -0
@@ -163,6 +163,11 @@ check for new CONFIG symbols outside Kconfig: :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0 +check usage of CONFIG_IS_ENABLED vs IS_ENABLED: + stage: testsuites + script: + - ./test/usage_of_is_enabled_check.sh + # build documentation docs: extends: .testsuites
test/usage_of_is_enabled_check.sh new file +19 -0
@@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# +# Written by Troy Kisky <[email protected]> + +scriptdir=`dirname "$0"`; +${scriptdir}/usage_of_is_enabled_list.sh | grep -vw FOO; +if [ $? -eq 0 ] ; then + echo "The above may have incorrect usage of IS_ENABLED/"\ +"CONFIG_IS_ENABLED" + echo "Run test/usage_of_is_enabled_commit.sh and "\ +"squash with appropriate commit" + ret=1; +else + ret=0; +fi + +rm ${scriptdir}/splcfg.tmp ${scriptdir}/exclude.tmp +exit ${ret}
test/usage_of_is_enabled_commit.sh new file +12 -0
@@ -0,0 +1,12 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# +# Written by Troy Kisky <[email protected]> + +scriptdir=`dirname "$0"`; +${scriptdir}/usage_of_is_enabled_list.sh | \ +xargs -I {} sh -c "${scriptdir}/usage_of_is_enabled_correct.sh {}; \ +git commit -a -m\"CONFIG_{}: correct usage of CONFIG_IS_ENABLED/IS_ENABLED\";" + + +rm ${scriptdir}/splcfg.tmp ${scriptdir}/exclude.tmp
test/usage_of_is_enabled_correct.sh new file +50 -0
50 lines not on this page · raw message
test/usage_of_is_enabled_exempt.txt new file +9 -0
@@ -0,0 +1,9 @@ +BLOBLIST +BLOBLIST_FIXED +DM_PMIC_PFUZE100 +FOO +NAND_BOOT +OF_CONTROL +SYS_L2_PL310 +WATCHDOG +X86_64
test/usage_of_is_enabled_list.sh new file +86 -0
86 lines not on this page · raw message
test/usage_of_is_enabled_splcfg.txt new file +21 -0
@@ -0,0 +1,21 @@ +BZIP2 +CONFIG_CLK +CONSOLE_MUX +DM_EVENT +DM_HWSPINLOCK +DM_RNG +DM_STDIO +EFI_DEVICE_PATH_TO_TEXT +EFI_LOADER +ERRNO_STR +EVENT_DYNAMIC +GENERATE_SMBIOS_TABLE +IOMMU +MMC_HW_PARTITIONING +NAND_CS_INIT +OFNODE_MULTI_TREE +PINCTRL_ARMADA_38X +PRE_CONSOLE_BUFFER +RESET_MEDIATEK +RESET_ROCKCHIP +UT_DM
test/usage_of_is_enabled_todo.txt new file +232 -0
232 lines not on this page · raw message
Signature · 1 line
2.34.1