[PATCH 0/9] configs: cleanup obsolete or incorrect assignments

"Vincent Mailhol (Arm)" <[email protected]>
Newsgroups gmane.linux.ports.riscv,gmane.linux.kbuild.devel,gmane.linux.kernel,gmane.linux.ports.alpha,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.omap,gmane.linux.ports.mips,gmane.linux.ports.ppc64.devel,gmane.linux.ports.sh.devel,gmane.linux.kernel.samsung-soc,gmane.linux.kernel.renesas-soc,gmane.linux.ports.parisc,gmane.comp.hardware.openbmc
Message-ID <[email protected]>
The arm64 defconfig contains several inconsistencies, as shown by the
following merge_config warnings:

  $ ARCH=arm64 ./scripts/kconfig/merge_config.sh arch/arm64/configs/defconfig
  Using arch/arm64/configs/defconfig as base
  #
  # configuration written to .config
  #
  WARNING: Value requested for CONFIG_NETFILTER_XT_TARGET_CHECKSUM not in final .config
  Requested value: CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
  Actual value:
  WARNING: Value requested for CONFIG_IP_NF_FILTER not in final .config
  Requested value: CONFIG_IP_NF_FILTER=m
  Actual value:
  WARNING: Value requested for CONFIG_IP_NF_TARGET_REJECT not in final .config
  Requested value: CONFIG_IP_NF_TARGET_REJECT=m
  Actual value:
  WARNING: Value requested for CONFIG_IP_NF_NAT not in final .config
  Requested value: CONFIG_IP_NF_NAT=m
  Actual value:
  WARNING: Value requested for CONFIG_IP_NF_TARGET_MASQUERADE not in final .config
  Requested value: CONFIG_IP_NF_TARGET_MASQUERADE=m
  Actual value:
  WARNING: Value requested for CONFIG_IP_NF_MANGLE not in final .config
  Requested value: CONFIG_IP_NF_MANGLE=m
  Actual value:
  WARNING: Value requested for CONFIG_IP6_NF_FILTER not in final .config
  Requested value: CONFIG_IP6_NF_FILTER=m
  Actual value:
  WARNING: Value requested for CONFIG_IP6_NF_TARGET_REJECT not in final .config
  Requested value: CONFIG_IP6_NF_TARGET_REJECT=m
  Actual value:
  WARNING: Value requested for CONFIG_IP6_NF_MANGLE not in final .config
  Requested value: CONFIG_IP6_NF_MANGLE=m
  Actual value:
  WARNING: Value requested for CONFIG_IP6_NF_NAT not in final .config
  Requested value: CONFIG_IP6_NF_NAT=m
  Actual value:
  WARNING: Value requested for CONFIG_IP6_NF_TARGET_MASQUERADE not in final .config
  Requested value: CONFIG_IP6_NF_TARGET_MASQUERADE=m
  Actual value:
  WARNING: Value requested for CONFIG_SENSORS_SA67MCU not in final .config
  Requested value: CONFIG_SENSORS_SA67MCU=m
  Actual value:
  WARNING: Value requested for CONFIG_FB_MODE_HELPERS not in final .config
  Requested value: CONFIG_FB_MODE_HELPERS=y
  Actual value:
  WARNING: Value requested for CONFIG_SND_SOC_ROCKCHIP not in final .config
  Requested value: CONFIG_SND_SOC_ROCKCHIP=m
  Actual value:
  WARNING: Value requested for CONFIG_IPQ_APSS_5018 not in final .config
  Requested value: CONFIG_IPQ_APSS_5018=y
  Actual value:
  WARNING: Value requested for CONFIG_SLIM_QCOM_CTRL not in final .config
  Requested value: CONFIG_SLIM_QCOM_CTRL=m
  Actual value:
  WARNING: Value requested for CONFIG_NFS_V4_1 not in final .config
  Requested value: CONFIG_NFS_V4_1=y
  Actual value:
  WARNING: CONFIG_CRYPTO_SHA3 differs:
  Requested value: CONFIG_CRYPTO_SHA3=m
  Actual value:    CONFIG_CRYPTO_SHA3=y
  ./scripts/kconfig/merge_config.sh: 384: [: false: unexpected operator

The issues fall into several categories:

  - assignments to removed or renamed configuration symbols.

  - assignments to symbols that became hidden or internal.

  - assignments that are requested as module (=m) but which have a
    built-in parent dependency (=y).

This series cleans up all those issues. While the focus is the arm64
defconfig, fixes that apply more broadly are extended treewide.

After applying this series, merge_config.sh runs without warnings on
the arm64 defconfig. Below script was used to confirm that no symbols
got inadvertently removed:

  #!/bin/sh

  DIR=$(mktemp -d)

  # Generate conf before this series
  git checkout $(git merge-base HEAD @{upstream})
  for arch in arch/*/; do
      for conf in "$arch"configs/*defconfig; do
        ARCH=$(basename $arch) \
        KCONFIG_CONFIG="$DIR/$(basename $arch)_$(basename $conf)_before" \
            ./scripts/kconfig/merge_config.sh $conf
      done
  done

  # Generate conf after this series
  git checkout -
  for arch in arch/*/; do
      for conf in "$arch"configs/*defconfig; do
        ARCH=$(basename $arch) \
        KCONFIG_CONFIG="$DIR/$(basename $arch)_$(basename $conf)_after" \
            ./scripts/kconfig/merge_config.sh $conf
      done
  done

  # Compare
  for arch in arch/*/; do
      for conf in "$arch"configs/*defconfig; do
        if diff --unified \
                "$DIR/$(basename $arch)_$(basename $conf)_before" \
                "$DIR/$(basename $arch)_$(basename $conf)_after"; then
            echo "$conf: OK"
        else
            echo "$conf: configuration changed"
        fi
      done
  done

Signed-off-by: Vincent Mailhol (Arm) <[email protected]>
---
Vincent Mailhol (Arm) (9):
      scripts: kconfig: merge_config.sh: use POSIX '=' in test
      configs: remove orphan dependencies of NETFILTER_XTABLES_LEGACY
      configs: remove obsolete assignments to CONFIG_NFS_V4_1
      configs: remove implicit assignments to FB_MODE_HELPERS
      arm: configs: remove obsolete assignments to SND_SOC_ROCKCHIP
      arm64: defconfig: remove implicit assignment to CRYPTO_SHA3
      arm64: defconfig: remove incorrect assignment to IPQ_APSS_5018
      arm64: defconfig: remove obsolete assignment to SENSORS_SA67MCU
      arm64: defconfig: remove obsolete assignment to SLIM_QCOM_CTRL

 arch/alpha/configs/defconfig                |  1 -
 arch/arm/configs/am200epdkit_defconfig      |  1 -
 arch/arm/configs/collie_defconfig           |  1 -
 arch/arm/configs/ep93xx_defconfig           |  1 -
 arch/arm/configs/exynos_defconfig           |  1 -
 arch/arm/configs/imx_v6_v7_defconfig        |  2 --
 arch/arm/configs/ixp4xx_defconfig           |  3 ---
 arch/arm/configs/keystone_defconfig         |  3 ---
 arch/arm/configs/lpc18xx_defconfig          |  1 -
 arch/arm/configs/lpc32xx_defconfig          |  2 --
 arch/arm/configs/mps2_defconfig             |  1 -
 arch/arm/configs/multi_v7_defconfig         |  2 --
 arch/arm/configs/mxs_defconfig              |  1 -
 arch/arm/configs/omap1_defconfig            |  1 -
 arch/arm/configs/omap2plus_defconfig        |  1 -
 arch/arm/configs/shmobile_defconfig         |  1 -
 arch/arm/configs/spitz_defconfig            |  4 ----
 arch/arm/configs/wpcm450_defconfig          |  1 -
 arch/arm64/configs/defconfig                | 18 ------------------
 arch/loongarch/configs/loongson32_defconfig |  1 -
 arch/loongarch/configs/loongson64_defconfig |  1 -
 arch/mips/configs/bmips_stb_defconfig       |  2 --
 arch/mips/configs/cavium_octeon_defconfig   |  1 -
 arch/mips/configs/db1xxx_defconfig          |  1 -
 arch/mips/configs/eyeq5_defconfig           |  1 -
 arch/mips/configs/eyeq6_defconfig           |  1 -
 arch/mips/configs/fuloong2e_defconfig       |  3 ---
 arch/mips/configs/generic_defconfig         |  1 -
 arch/mips/configs/gpr_defconfig             |  3 ---
 arch/mips/configs/ip22_defconfig            |  6 ------
 arch/mips/configs/lemote2f_defconfig        |  1 -
 arch/mips/configs/loongson2k_defconfig      |  3 ---
 arch/mips/configs/loongson3_defconfig       | 11 -----------
 arch/mips/configs/malta_defconfig           |  6 ------
 arch/mips/configs/malta_kvm_defconfig       |  6 ------
 arch/mips/configs/maltaup_xpa_defconfig     |  6 ------
 arch/mips/configs/mtx1_defconfig            |  6 ------
 arch/mips/configs/rb532_defconfig           |  3 ---
 arch/mips/configs/rm200_defconfig           |  6 ------
 arch/mips/configs/rt305x_defconfig          |  3 ---
 arch/mips/configs/xway_defconfig            |  3 ---
 arch/parisc/configs/generic-64bit_defconfig |  1 -
 arch/powerpc/configs/85xx/stx_gp3_defconfig |  1 -
 arch/powerpc/configs/cell_defconfig         |  3 ---
 arch/powerpc/configs/linkstation_defconfig  |  3 ---
 arch/powerpc/configs/mvme5100_defconfig     |  3 ---
 arch/powerpc/configs/pmac32_defconfig       |  3 ---
 arch/powerpc/configs/ppc6xx_defconfig       |  6 ------
 arch/riscv/configs/defconfig                |  9 ---------
 arch/sh/configs/titan_defconfig             |  6 ------
 arch/x86/configs/i386_defconfig             |  7 -------
 arch/x86/configs/x86_64_defconfig           |  7 -------
 arch/xtensa/configs/virt_defconfig          |  1 -
 scripts/kconfig/merge_config.sh             |  2 +-
 54 files changed, 1 insertion(+), 172 deletions(-)
---
base-commit: f338e77383789c0cae23ca3d48adcc5e9e137e3c
change-id: 20260312-arm_defconf_cleanup-cd17f4ba989d

Best regards,
-- 
Vincent Mailhol (Arm) <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.