[PATCH v3 00/76] Clean up of bad Kconfig options

Simon Glass sjg at chromium.org
Wed Feb 1 21:19:11 CET 2023


This series adds source scanning to moveconfig.py so that it can look for
Kconfig options mentioned in the source which do not appear in Kconfig,
and vice versa.

This tool is then used to clean up the unused or obsolete options
mentioned in Makefiles, along with any attached source code.

No functional change is intended.

This should make it easier to move to the new kconfig approach.

Changes in v3:
- Update to support lower case CONFIG options
- Drop efi_loader change
- Drop the 10 patches that rename lower-case Kconfig options

Changes in v2:
- Just drop the reference
- Reinstate usb_hub code removed by accident
- Drop patch "treewide: Correct invalid Kconfig syntax and warnings"

Simon Glass (76):
  moveconfig: Add an option to compare Kconfig against source
  power: Drop fg_max77693
  nand: Drop CONFIG_NAND_SPEAR
  power: Drop pmic_max77693.c
  gpio: Drop adi_gpio2
  Makefile: Drop CONFIG_AIS_CONFIG_FILE
  misc: Drop ali512x
  sandbox: Drop reference to CONFIG_ARCH_DEVICE_TREE
  arm: mvebu: Remove reference to ARMADA_370
  arm: mvebu: Drop reference to CONFIG_ARMADA_39X
  ppc: Drop bat_rw
  rockchip: Correct a reference to CONFIG_BOOT_MODE_REG
  cmd: Add an option to enable the ini command
  cmd: Drop mfsl command
  Correct CONFIG_CONTROLCENTERDC
  Drop dataflash_mmc_mux command
  Drop CONFIG_DM644X_GPIO
  Makefile: Avoid use of invalid CONFIG_ option
  env: Drop ENV_IS_IN_SATA
  samsung: Drop CONFIG_EXYNOS_PWM_BL
  fpga: Add a LATTICE option
  fpga: Add a FPGA_STRATIX_II option
  misc: Drop mc9sdz60 driver
  freescale: Drop unused pixis code
  freescale: Drop unused ftpmu010 driver
  rcar: Drop timer
  imx: Drop unused CONFIG_IMX
  arm: Drop old kona code
  video: Drop unused lg4573 driver
  m68k: Drop unused CONFIG_M52277
  m68k: Drop unused CONFIG_MACH_DAVINCI_DA830_EVM
  arm: Drop CONFIG_MMU
  arc: Drop CONFIG_MMU
  gpio: Drop unused mpc83xx_gpio driver
  imx: Rename CONFIG_MXS to CFG_MXS
  nand: Drop unused actl_nand driver
  mtd: Drop unused fsl_upm driver
  mtd: Drop unused fsmc_nand driver
  mtd: Drop unused kb9202_nand driver
  mtd: Drop unused nand_plat driver
  Makefile: Drop CONFIG_OF_EARLY_FLATTREE
  omap: Drop unused CONFIG_OMAP_USB_PHY
  mtd: Drop unused CONFIG_ONENAND_U_BOOT
  ppc: Drop unused CONFIG_P2020DS
  gpio: Drop unused pca9698 driver
  samsung: Rename PINCTRL_EXYNOS78x0
  power: Drop unused bat_trats driver and battery code
  power: Drop unused fg_max17042 driver and fuel gauge code
  power: Drop unused muic_max77693 driver and mfd code
  power: Drop unused muic_max8997 driver
  freescale: Drop unused pq-mds-pib driver
  rmobile: Drop CONFIG_RMOBILE
  rtc: Drop old and unused drivers
  mtd: Drop unused CONFIG_S32V234
  mtd: Drop unused scf0403_lcd driver
  rmobile: Drop CONFIG_SH73A0 and associated code
  sh4: Drop unused pci_sh7780 driver
  Drop ubsha1 tool
  sysreset: at91: Correct Makefile rule for SYSRESET_AT91
  gdsys: Drop unused fpga file
  sh4: Drop unused kona_i2c driver
  compulab: Drop CONFIG_TARGET_MCM_IMX8M_MINI
  freescale: Drop CONFIG_TARGET_MPC8536DS et al
  sh4: Drop unused twl6030 driver
  ppc: Makefile: Drop unused ppc4xx code
  armada: usb: net: Drop unused USB drivers
  usb: Drop unused ehci-faraday driver
  usb: Drop unused fotg210 gadget
  rmobile: Drop unused ehci-rmobile driver
  usb: Drop unused ehci-vct driver
  usb: Drop unused sl811-hcd driver
  imx: Drop CONFIG_USE_PLUGIN
  freescale: Drop unused vsc3316_3308 driver
  tools: Drop xway-swap-bytes tool
  freescale: Drop unused zm7300 driver
  fdt: Drop use of non-existent OF_PLATDATA option

 Makefile                                      |   24 +-
 README                                        |    7 -
 arch/arc/config.mk                            |    4 -
 arch/arc/lib/ints_low.S                       |    5 -
 arch/arm/cpu/arm920t/Makefile                 |    2 -
 arch/arm/cpu/armv7/Makefile                   |    2 -
 arch/arm/cpu/armv7/kona-common/Makefile       |    8 -
 arch/arm/cpu/armv7/kona-common/clk-stubs.c    |   25 -
 .../arm/cpu/armv7/kona-common/hwinit-common.c |   17 -
 arch/arm/cpu/armv7/kona-common/reset.S        |   25 -
 arch/arm/cpu/armv7/kona-common/s_init.c       |   11 -
 arch/arm/cpu/armv8/Makefile                   |    1 -
 arch/arm/lib/debug.S                          |   21 -
 arch/arm/mach-exynos/Kconfig                  |    6 +-
 arch/arm/mach-mvebu/Makefile                  |    4 +-
 arch/arm/mach-rmobile/Makefile                |    2 -
 arch/arm/mach-rmobile/cpu_info-sh73a0.c       |   43 -
 arch/arm/mach-rmobile/cpu_info.c              |    1 -
 .../mach-rmobile/include/mach/ehci-rmobile.h  |  146 -
 arch/arm/mach-rmobile/include/mach/gpio.h     |    5 +-
 arch/arm/mach-rmobile/include/mach/rmobile.h  |    5 +-
 .../mach-rmobile/include/mach/sh73a0-gpio.h   |  553 ----
 arch/arm/mach-rmobile/include/mach/sh73a0.h   |  289 --
 arch/arm/mach-rmobile/pfc-sh73a0.c            | 2807 -----------------
 arch/arm/mach-rmobile/timer.c                 |   87 -
 arch/arm/mach-rockchip/Makefile               |    2 +-
 arch/m68k/Makefile                            |    1 -
 arch/mips/mach-octeon/octeon_fdt.c            |   43 +-
 arch/powerpc/lib/Makefile                     |    1 -
 arch/powerpc/lib/bat_rw.c                     |  244 --
 arch/sandbox/config.mk                        |    2 -
 arch/sh/include/asm/pci.h                     |    2 -
 .../compulab/imx8mm-cl-iot-gate/ddr/Makefile  |    4 -
 board/davinci/da8xxevm/Makefile               |    1 -
 board/freescale/common/Makefile               |    8 -
 board/freescale/common/pixis.c                |  470 ---
 board/freescale/common/pixis.h                |   54 -
 board/freescale/common/pq-mds-pib.c           |   60 -
 board/freescale/common/pq-mds-pib.h           |    9 -
 board/freescale/common/vsc3316_3308.c         |  530 ----
 board/freescale/common/zm7300.c               |  232 --
 board/freescale/common/zm7300.h               |   21 -
 board/freescale/mx7ulp_evk/Makefile           |    4 -
 board/gdsys/a38x/hre.c                        |    1 -
 board/gdsys/common/Makefile                   |    3 +-
 board/gdsys/common/fpga.c                     |   28 -
 board/xes/common/Makefile                     |    1 -
 board/xes/common/actl_nand.c                  |   49 -
 cmd/Kconfig                                   |    7 +
 cmd/Makefile                                  |    2 -
 cmd/dataflash_mmc_mux.c                       |   48 -
 cmd/mfsl.c                                    |  387 ---
 cmd/nvedit.c                                  |    1 -
 common/usb_hub.c                              |    6 -
 drivers/Makefile                              |    1 -
 drivers/fpga/Kconfig                          |   12 +
 drivers/gpio/Makefile                         |    5 -
 drivers/gpio/adi_gpio2.c                      |  425 ---
 drivers/gpio/kona_gpio.c                      |  141 -
 drivers/gpio/mpc83xx_gpio.c                   |  183 --
 drivers/gpio/pca9698.c                        |  127 -
 drivers/i2c/Makefile                          |    1 -
 drivers/i2c/kona_i2c.c                        |  728 -----
 drivers/i2c/sh_i2c.c                          |    5 -
 drivers/input/Makefile                        |    1 -
 drivers/input/twl6030.c                       |   47 -
 drivers/misc/Makefile                         |    2 -
 drivers/misc/ali512x.c                        |  401 ---
 drivers/misc/mc9sdz60.c                       |   34 -
 drivers/mtd/nand/raw/Makefile                 |    5 -
 drivers/mtd/nand/raw/fsl_upm.c                |  187 --
 drivers/mtd/nand/raw/fsmc_nand.c              |  470 ---
 drivers/mtd/nand/raw/kb9202_nand.c            |  134 -
 drivers/mtd/nand/raw/nand_plat.c              |   65 -
 drivers/pci/Makefile                          |    1 -
 drivers/pci/pci_sh7780.c                      |   92 -
 drivers/pinctrl/exynos/Kconfig                |    2 +-
 drivers/pinctrl/exynos/Makefile               |    2 +-
 drivers/power/Makefile                        |    4 -
 drivers/power/battery/Makefile                |    7 -
 drivers/power/battery/bat_trats.c             |   91 -
 drivers/power/battery/bat_trats2.c            |   65 -
 drivers/power/ftpmu010.c                      |   87 -
 drivers/power/fuel_gauge/Makefile             |    6 -
 drivers/power/fuel_gauge/fg_max17042.c        |  287 --
 drivers/power/mfd/Makefile                    |    8 -
 drivers/power/mfd/fg_max77693.c               |  137 -
 drivers/power/mfd/muic_max77693.c             |   77 -
 drivers/power/mfd/pmic_max77693.c             |   96 -
 drivers/power/pmic/Makefile                   |    1 -
 drivers/power/pmic/muic_max8997.c             |   74 -
 drivers/rtc/Makefile                          |   14 -
 drivers/rtc/at91sam9_rtt.c                    |   78 -
 drivers/rtc/ds1302.c                          |  329 --
 drivers/rtc/ds1306.c                          |  438 ---
 drivers/rtc/ftrtc010.c                        |  122 -
 drivers/rtc/imxdi.c                           |  223 --
 drivers/rtc/max6900.c                         |  105 -
 drivers/rtc/mk48t59.c                         |  175 -
 drivers/rtc/mx27rtc.c                         |   64 -
 drivers/rtc/rs5c372.c                         |  256 --
 drivers/rtc/s3c24x0_rtc.c                     |  149 -
 drivers/rtc/x1205.c                           |  161 -
 drivers/serial/serial_sh.h                    |   10 +-
 drivers/sysreset/Makefile                     |    2 +-
 drivers/usb/gadget/Makefile                   |    3 +-
 drivers/usb/gadget/fotg210.c                  |  964 ------
 drivers/usb/gadget/gadget_chips.h             |    8 -
 drivers/usb/host/Makefile                     |    5 -
 drivers/usb/host/ehci-armada100.c             |   48 -
 drivers/usb/host/ehci-faraday.c               |  144 -
 drivers/usb/host/ehci-hcd.c                   |    5 -
 drivers/usb/host/ehci-rmobile.c               |  129 -
 drivers/usb/host/ehci-vct.c                   |   44 -
 drivers/usb/host/sl811-hcd.c                  |  714 -----
 drivers/usb/host/sl811.h                      |  104 -
 drivers/usb/host/utmi-armada100.c             |   80 -
 drivers/video/Makefile                        |    2 -
 drivers/video/exynos/Makefile                 |    1 -
 drivers/video/lg4573.c                        |  331 --
 drivers/video/scf0403_lcd.c                   |  297 --
 dts/Kconfig                                   |    4 +-
 env/Makefile                                  |    1 -
 env/env.c                                     |    3 -
 env/sata.c                                    |  122 -
 include/faraday/ftpmu010.h                    |  234 --
 include/linux/mtd/fsl_upm.h                   |   44 -
 include/linux/mtd/fsmc_nand.h                 |   84 -
 include/netdev.h                              |    1 -
 include/pca9698.h                             |   17 -
 include/power/fg_battery_cell_params.h        |   73 -
 include/scf0403_lcd.h                         |   10 -
 include/usb/fotg210.h                         |  362 ---
 include/usb/fusbh200.h                        |   59 -
 tools/.gitignore                              |    1 -
 tools/Makefile                                |   14 +-
 tools/moveconfig.py                           |  334 ++
 tools/mxsimage.c                              |    2 +-
 tools/ubsha1.c                                |   83 -
 tools/xway-swap-bytes.c                       |   38 -
 140 files changed, 376 insertions(+), 16447 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/kona-common/Makefile
 delete mode 100644 arch/arm/cpu/armv7/kona-common/clk-stubs.c
 delete mode 100644 arch/arm/cpu/armv7/kona-common/hwinit-common.c
 delete mode 100644 arch/arm/cpu/armv7/kona-common/reset.S
 delete mode 100644 arch/arm/cpu/armv7/kona-common/s_init.c
 delete mode 100644 arch/arm/mach-rmobile/cpu_info-sh73a0.c
 delete mode 100644 arch/arm/mach-rmobile/include/mach/ehci-rmobile.h
 delete mode 100644 arch/arm/mach-rmobile/include/mach/sh73a0-gpio.h
 delete mode 100644 arch/arm/mach-rmobile/include/mach/sh73a0.h
 delete mode 100644 arch/arm/mach-rmobile/pfc-sh73a0.c
 delete mode 100644 arch/arm/mach-rmobile/timer.c
 delete mode 100644 arch/powerpc/lib/bat_rw.c
 delete mode 100644 board/freescale/common/pixis.c
 delete mode 100644 board/freescale/common/pixis.h
 delete mode 100644 board/freescale/common/pq-mds-pib.c
 delete mode 100644 board/freescale/common/pq-mds-pib.h
 delete mode 100644 board/freescale/common/vsc3316_3308.c
 delete mode 100644 board/freescale/common/zm7300.c
 delete mode 100644 board/freescale/common/zm7300.h
 delete mode 100644 board/gdsys/common/fpga.c
 delete mode 100644 board/xes/common/actl_nand.c
 delete mode 100644 cmd/dataflash_mmc_mux.c
 delete mode 100644 cmd/mfsl.c
 delete mode 100644 drivers/gpio/adi_gpio2.c
 delete mode 100644 drivers/gpio/kona_gpio.c
 delete mode 100644 drivers/gpio/mpc83xx_gpio.c
 delete mode 100644 drivers/gpio/pca9698.c
 delete mode 100644 drivers/i2c/kona_i2c.c
 delete mode 100644 drivers/input/twl6030.c
 delete mode 100644 drivers/misc/ali512x.c
 delete mode 100644 drivers/misc/mc9sdz60.c
 delete mode 100644 drivers/mtd/nand/raw/fsl_upm.c
 delete mode 100644 drivers/mtd/nand/raw/fsmc_nand.c
 delete mode 100644 drivers/mtd/nand/raw/kb9202_nand.c
 delete mode 100644 drivers/mtd/nand/raw/nand_plat.c
 delete mode 100644 drivers/pci/pci_sh7780.c
 delete mode 100644 drivers/power/battery/Makefile
 delete mode 100644 drivers/power/battery/bat_trats.c
 delete mode 100644 drivers/power/battery/bat_trats2.c
 delete mode 100644 drivers/power/ftpmu010.c
 delete mode 100644 drivers/power/fuel_gauge/Makefile
 delete mode 100644 drivers/power/fuel_gauge/fg_max17042.c
 delete mode 100644 drivers/power/mfd/Makefile
 delete mode 100644 drivers/power/mfd/fg_max77693.c
 delete mode 100644 drivers/power/mfd/muic_max77693.c
 delete mode 100644 drivers/power/mfd/pmic_max77693.c
 delete mode 100644 drivers/power/pmic/muic_max8997.c
 delete mode 100644 drivers/rtc/at91sam9_rtt.c
 delete mode 100644 drivers/rtc/ds1302.c
 delete mode 100644 drivers/rtc/ds1306.c
 delete mode 100644 drivers/rtc/ftrtc010.c
 delete mode 100644 drivers/rtc/imxdi.c
 delete mode 100644 drivers/rtc/max6900.c
 delete mode 100644 drivers/rtc/mk48t59.c
 delete mode 100644 drivers/rtc/mx27rtc.c
 delete mode 100644 drivers/rtc/rs5c372.c
 delete mode 100644 drivers/rtc/s3c24x0_rtc.c
 delete mode 100644 drivers/rtc/x1205.c
 delete mode 100644 drivers/usb/gadget/fotg210.c
 delete mode 100644 drivers/usb/host/ehci-armada100.c
 delete mode 100644 drivers/usb/host/ehci-faraday.c
 delete mode 100644 drivers/usb/host/ehci-rmobile.c
 delete mode 100644 drivers/usb/host/ehci-vct.c
 delete mode 100644 drivers/usb/host/sl811-hcd.c
 delete mode 100644 drivers/usb/host/sl811.h
 delete mode 100644 drivers/usb/host/utmi-armada100.c
 delete mode 100644 drivers/video/lg4573.c
 delete mode 100644 drivers/video/scf0403_lcd.c
 delete mode 100644 env/sata.c
 delete mode 100644 include/faraday/ftpmu010.h
 delete mode 100644 include/linux/mtd/fsl_upm.h
 delete mode 100644 include/linux/mtd/fsmc_nand.h
 delete mode 100644 include/pca9698.h
 delete mode 100644 include/power/fg_battery_cell_params.h
 delete mode 100644 include/scf0403_lcd.h
 delete mode 100644 include/usb/fotg210.h
 delete mode 100644 include/usb/fusbh200.h
 delete mode 100644 tools/ubsha1.c
 delete mode 100644 tools/xway-swap-bytes.c

-- 
2.39.1.456.gfc5497dd1b-goog



More information about the U-Boot mailing list