All of lore.kernel.org
 help / color / mirror / Atom feed
* I have a pile of potential janitorial work for interested parties
@ 2025-06-28 21:08 Robert P. J. Day
  2025-06-30 14:42 ` Ruben Wauters
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2025-06-28 21:08 UTC (permalink / raw)
  To: Kernel Janitors List


  Quite some time ago, I was immersed in a bunch of Linux kernel
janitorial work, and I wrote a bunch of scripts that scanned the
kernel source tree and identified obvious candidates for
simplification and cleanup. I'm going to publish all of that to my
website in the very near future, but just to clarify what I mean, let
me provide a single example to see if this is still relevant, or
whether I'm off-base.

  One of the scripts I wrote scanned the kernel tree for what I call
"badref selects", those being entries in Kconfig files that "select"ed
config entries that did not exist (probably the result of someone
deleting config entries, but not checking to see if anything selected
that entry). Such occurrences are not fatal, but they are obvious
candidates for cleanup.

  I just ran that script on the current source tree just for the
drivers/ directory, and here's the output I got:


$ find_badref_selects.sh drivers
===== DRM_DEBUG_SELFTEST
drivers/gpu/drm/i915/Kconfig.debug:53:	select DRM_DEBUG_SELFTEST
===== DRM_KMS_DMA_HELPER
drivers/gpu/drm/adp/Kconfig:9:	select DRM_KMS_DMA_HELPER
drivers/gpu/drm/logicvc/Kconfig:7:	select DRM_KMS_DMA_HELPER
===== TEST_KUNIT_DEVICE_HELPERS
drivers/iio/test/Kconfig:11:	select TEST_KUNIT_DEVICE_HELPERS


This output suggests that those "selects" refer to config entries that
do not exist, and so could likely be removed as janitorial work.

  Does the above make sense? If I recursively grep for the strings,
say, "TEST_KUNIT_DEVICE_HELPERS", I see only that select statement,
and nothing else. I'm assuming that means it's superfluous. If this
makes sense, I can publish my scanning scripts and others are welcome
to use them to find stuff that can be cleaned up.

  Thoughts?

rday

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-30 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28 21:08 I have a pile of potential janitorial work for interested parties Robert P. J. Day
2025-06-30 14:42 ` Ruben Wauters
2025-06-30 15:15   ` Robert P. J. Day
2025-06-30 16:27     ` Charalampos Mitrodimas
2025-06-30 17:27       ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.