some possible Kconfig-related janitorial work
"Robert P. J. Day" <[email protected]>
| Newsgroups | org.kernel.vger.kernel-janitors |
|---|---|
| Message-ID | <[email protected]> |
following up on my earlier posts, again, many years back, when i wrote those kernel source "cleanup" scripts, a number of them looked for cleanup in the Kconfig files -- things like config variables that were never used, "select" directives that selected non-existent settings and so on. those scripts were absolute brute force and (i might be mistaken) i recall that someone subsequently wrote much better utilities that took advantage of the database of Kconfig values created during parsing. in any event, if i run my old "find_badref_selects.sh" scripts and ask it to scan the drivers/ directory: $ find_badref_selects.sh drivers >>>>> DRM_KMS_DMA_HELPER drivers/gpu/drm/logicvc/Kconfig:7: select DRM_KMS_DMA_HELPER drivers/gpu/drm/adp/Kconfig:9: select DRM_KMS_DMA_HELPER $ that tells me that a couple Kconfig files *appear* to be selecting a config setting that does not exist anywhere in the entire tree. not fatal, just unnecessary. if i examine the arch/ subdirectory: $ find_badref_selects.sh arch >>>>> HAVE_LEGACY_CLK arch/sh/boards/Kconfig:13: select HAVE_LEGACY_CLK arch/mips/Kconfig:334: select HAVE_LEGACY_CLK arch/mips/Kconfig:475: select HAVE_LEGACY_CLK arch/m68k/Kconfig.cpu:33: select HAVE_LEGACY_CLK drivers/clk/Kconfig:12:config HAVE_LEGACY_CLK # TODO: Remove once all legacy users are migrated drivers/clk/Kconfig:23: depends on !HAVE_LEGACY_CLK >>>>> PINCTRL_MILBEAUT arch/arm/mach-milbeaut/Kconfig:16: select PINCTRL_MILBEAUT >>>>> USB_OHCI_SH arch/sh/Kconfig:334: select USB_OHCI_SH if USB_OHCI_HCD arch/sh/Kconfig:344: select USB_OHCI_SH if USB_OHCI_HCD arch/sh/Kconfig:429: select USB_OHCI_SH if USB_OHCI_HCD arch/sh/Kconfig:455: select USB_OHCI_SH if USB_OHCI_HCD $ a small number of *possible* cleanups -- there used to be *way* more hits than today so a lot of that stuff was cleaned up. anyway, i'm sure there are better utilities for identifying stuff like that, but there's so little of that these days that it's probably not worth working on. rday