* patch suggestion: Kconfig symbols
@ 2021-07-27 0:21 Randy Dunlap
2021-07-27 0:33 ` Shuah Khan
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Randy Dunlap @ 2021-07-27 0:21 UTC (permalink / raw)
To: linux-kernel-mentees
Hi,
Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
Kconfig symbols that are used questionably. Lots of these are false positives
but lots of the remainder could use some cleaning up.
One example:
DSCC4
Referencing files: arch/mips/configs/gpr_defconfig, arch/mips/configs/mtx1_defconfig, drivers/net/wan/Kconfig
Similar symbols: SCC, DMASCC, CRC4, CRC64
There is no longer a Kconfig entry for DSCC4 (it has been deleted, but some
references to it were not deleted) -- and this is not a typo
of one of the "Similar symbols" listed here.
So all of these references to DSCC4 can be (should be) deleted.
And of course, Cc: the GENERIC HDLC (WAN) DRIVERS maintainer on such a patch.
False positive example:
XCHOFFLD_MEM
Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
The Referencing source file does this:
#define CONFIG_XCHOFFLD_MEM 0x3
which is legitimate, so no change is needed.
Comment example:
IA32_SUPPORT
Referencing files: arch/x86/include/asm/ia32.h
Similar symbols: MEDIA_SUPPORT, EDAC_SUPPORT, IOMMU_SUPPORT, USB_SUPPORT, I2C_PARPORT, NIOS2_FPU_SUPPORT, NIOS2_CDX_SUPPORT, NIOS2_BMX_SUPPORT, MEDIA_USB_SUPPORT, MEDIA_SDR_SUPPORT
The Referencing file has:
#endif /* !CONFIG_IA32_SUPPORT */
and this #ifdef block was begun with
#ifdef CONFIG_IA32_EMULATION
so the comment on the #endif line is incorrect.
This could be fixed but it's not a big deal just to leave it as is.
So there is lots here that could be done, but there are also lots of
false positives here that don't need to be touched.
--
~Randy
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-27 0:21 patch suggestion: Kconfig symbols Randy Dunlap
@ 2021-07-27 0:33 ` Shuah Khan
2021-07-28 15:37 ` Joe Perches
2021-07-29 15:02 ` Lukas Bulwahn
2 siblings, 0 replies; 13+ messages in thread
From: Shuah Khan @ 2021-07-27 0:33 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel-mentees
Hi Randy,
On 7/26/21 6:21 PM, Randy Dunlap wrote:
> Hi,
>
> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
> Kconfig symbols that are used questionably. Lots of these are false positives
> but lots of the remainder could use some cleaning up.
>
Thank you for these patch suggestions. These will are helpful for
new developers looking for ways to get started.
thanks,
-- Shuah
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-27 0:21 patch suggestion: Kconfig symbols Randy Dunlap
@ 2021-07-28 15:37 ` Joe Perches
2021-07-28 15:37 ` Joe Perches
2021-07-29 15:02 ` Lukas Bulwahn
2 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2021-07-28 15:37 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel-mentees; +Cc: LKML, kernel-janitors
On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
> Kconfig symbols that are used questionably. Lots of these are false positives
> but lots of the remainder could use some cleaning up.
[]
> False positive example:
>
> XCHOFFLD_MEM
> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>
> The Referencing source file does this:
> #define CONFIG_XCHOFFLD_MEM 0x3
>
> which is legitimate, so no change is needed.
Legitimate is perhaps dubious.
It might be better if Kconfig has exclusive use of CONFIG_<foo> naming so
renaming all the other existing CONFIG_<foo> defines might be appropriate.
$ git grep -P '^\s*#\s*define\s+CONFIG_[A-Z]+\b'
arch/alpha/kernel/smc37c93x.c:#define CONFIG_CONTROL 0x02
arch/sh/drivers/pci/ops-sh4.c:#define CONFIG_CMD(bus, devfn, where) \
arch/sh/include/asm/smc37c93x.h:#define CONFIG_PORT 0x3f0
arch/sh/include/asm/smc37c93x.h:#define CONFIG_ENTER 0x55
arch/sh/include/asm/smc37c93x.h:#define CONFIG_EXIT 0xaa
arch/sparc/kernel/pcic.c:#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (((unsigned int)bus) << 16) | (((unsigned int)device_fn) << 8) | (where & ~3))
arch/um/drivers/mconsole_kern.h:#define CONFIG_CHUNK(str, size, current, chunk, end) \
drivers/atm/he.h:#define CONFIG_RSRA 0x00000
drivers/atm/he.h:#define CONFIG_RCMLBM 0x08000
drivers/atm/he.h:#define CONFIG_RCMABR 0x0d800
drivers/atm/he.h:#define CONFIG_RSRB 0x0e000
drivers/atm/he.h:#define CONFIG_TSRA 0x00000
drivers/atm/he.h:#define CONFIG_TSRB 0x08000
drivers/atm/he.h:#define CONFIG_TSRC 0x0c000
drivers/atm/he.h:#define CONFIG_TSRD 0x0e000
drivers/atm/he.h:#define CONFIG_TMABR 0x0f000
drivers/atm/he.h:#define CONFIG_TPDBA 0x10000
drivers/comedi/drivers/ni_at_a2150.c:#define CONFIG_REG 0x0
drivers/crypto/atmel-i2c.h:#define CONFIG_ZONE 0
drivers/dma/idxd/perfmon.h:#define CONFIG_RESET 0x0000000000000001
drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_MEMSIZE 0x150A
drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_CNTL 0x1509
drivers/gpu/drm/radeon/cikd.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/evergreend.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/nid.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/r600d.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/r600d.h:#define CONFIG_CNTL 0x5424
drivers/gpu/drm/radeon/rv515d.h:#define CONFIG_MEMSIZE 0x00F8
drivers/gpu/drm/radeon/rv770d.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/sid.h:#define CONFIG_MEMSIZE 0x5428
drivers/macintosh/therm_adt746x.c:#define CONFIG_REG 0x40
drivers/memory/ti-aemif.c:#define CONFIG_MASK (TA(TA_MAX) | \
drivers/mtd/spi-nor/controllers/aspeed-smc.c:#define CONFIG_REG 0x0
drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_REG(lp) SMC_REG(lp, 0x0000, 1)
drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_GPCNTRL 0x0400 // Inverse value drives pin nCNTRL
drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_DEFAULT (CONFIG_EPH_POWER_EN)
drivers/pcmcia/cs_internal.h:#define CONFIG_LOCKED 0x01
drivers/pinctrl/mvebu/pinctrl-dove.c:#define CONFIG_PMU BIT(4)
drivers/staging/vt6655/device_cfg.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
drivers/staging/vt6656/device.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
drivers/thermal/qcom/tsens-8960.c:#define CONFIG_ADDR 0x3640
drivers/thermal/qcom/tsens-8960.c:#define CONFIG_MASK 0xf
drivers/usb/host/xhci.h:#define CONFIG_CIE (1 << 9)
drivers/video/fbdev/geode/display_gx1.h:#define CONFIG_GCR 0xb8
tools/power/x86/intel-speed-select/isst.h:#define CONFIG_TDP 0x7f
tools/power/x86/intel-speed-select/isst.h:#define CONFIG_CLOS 0xd0
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h:#define CONFIG_SMP
tools/virtio/linux/kernel.h:#define CONFIG_SMP
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
@ 2021-07-28 15:37 ` Joe Perches
0 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2021-07-28 15:37 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel-mentees; +Cc: kernel-janitors, LKML
On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
> Kconfig symbols that are used questionably. Lots of these are false positives
> but lots of the remainder could use some cleaning up.
[]
> False positive example:
>
> XCHOFFLD_MEM
> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>
> The Referencing source file does this:
> #define CONFIG_XCHOFFLD_MEM 0x3
>
> which is legitimate, so no change is needed.
Legitimate is perhaps dubious.
It might be better if Kconfig has exclusive use of CONFIG_<foo> naming so
renaming all the other existing CONFIG_<foo> defines might be appropriate.
$ git grep -P '^\s*#\s*define\s+CONFIG_[A-Z]+\b'
arch/alpha/kernel/smc37c93x.c:#define CONFIG_CONTROL 0x02
arch/sh/drivers/pci/ops-sh4.c:#define CONFIG_CMD(bus, devfn, where) \
arch/sh/include/asm/smc37c93x.h:#define CONFIG_PORT 0x3f0
arch/sh/include/asm/smc37c93x.h:#define CONFIG_ENTER 0x55
arch/sh/include/asm/smc37c93x.h:#define CONFIG_EXIT 0xaa
arch/sparc/kernel/pcic.c:#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (((unsigned int)bus) << 16) | (((unsigned int)device_fn) << 8) | (where & ~3))
arch/um/drivers/mconsole_kern.h:#define CONFIG_CHUNK(str, size, current, chunk, end) \
drivers/atm/he.h:#define CONFIG_RSRA 0x00000
drivers/atm/he.h:#define CONFIG_RCMLBM 0x08000
drivers/atm/he.h:#define CONFIG_RCMABR 0x0d800
drivers/atm/he.h:#define CONFIG_RSRB 0x0e000
drivers/atm/he.h:#define CONFIG_TSRA 0x00000
drivers/atm/he.h:#define CONFIG_TSRB 0x08000
drivers/atm/he.h:#define CONFIG_TSRC 0x0c000
drivers/atm/he.h:#define CONFIG_TSRD 0x0e000
drivers/atm/he.h:#define CONFIG_TMABR 0x0f000
drivers/atm/he.h:#define CONFIG_TPDBA 0x10000
drivers/comedi/drivers/ni_at_a2150.c:#define CONFIG_REG 0x0
drivers/crypto/atmel-i2c.h:#define CONFIG_ZONE 0
drivers/dma/idxd/perfmon.h:#define CONFIG_RESET 0x0000000000000001
drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_MEMSIZE 0x150A
drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_CNTL 0x1509
drivers/gpu/drm/radeon/cikd.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/evergreend.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/nid.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/r600d.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/r600d.h:#define CONFIG_CNTL 0x5424
drivers/gpu/drm/radeon/rv515d.h:#define CONFIG_MEMSIZE 0x00F8
drivers/gpu/drm/radeon/rv770d.h:#define CONFIG_MEMSIZE 0x5428
drivers/gpu/drm/radeon/sid.h:#define CONFIG_MEMSIZE 0x5428
drivers/macintosh/therm_adt746x.c:#define CONFIG_REG 0x40
drivers/memory/ti-aemif.c:#define CONFIG_MASK (TA(TA_MAX) | \
drivers/mtd/spi-nor/controllers/aspeed-smc.c:#define CONFIG_REG 0x0
drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_REG(lp) SMC_REG(lp, 0x0000, 1)
drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_GPCNTRL 0x0400 // Inverse value drives pin nCNTRL
drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_DEFAULT (CONFIG_EPH_POWER_EN)
drivers/pcmcia/cs_internal.h:#define CONFIG_LOCKED 0x01
drivers/pinctrl/mvebu/pinctrl-dove.c:#define CONFIG_PMU BIT(4)
drivers/staging/vt6655/device_cfg.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
drivers/staging/vt6656/device.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
drivers/thermal/qcom/tsens-8960.c:#define CONFIG_ADDR 0x3640
drivers/thermal/qcom/tsens-8960.c:#define CONFIG_MASK 0xf
drivers/usb/host/xhci.h:#define CONFIG_CIE (1 << 9)
drivers/video/fbdev/geode/display_gx1.h:#define CONFIG_GCR 0xb8
tools/power/x86/intel-speed-select/isst.h:#define CONFIG_TDP 0x7f
tools/power/x86/intel-speed-select/isst.h:#define CONFIG_CLOS 0xd0
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h:#define CONFIG_SMP
tools/virtio/linux/kernel.h:#define CONFIG_SMP
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-28 15:37 ` Joe Perches
@ 2021-07-28 19:41 ` Randy Dunlap
-1 siblings, 0 replies; 13+ messages in thread
From: Randy Dunlap @ 2021-07-28 19:41 UTC (permalink / raw)
To: Joe Perches, linux-kernel-mentees; +Cc: LKML, kernel-janitors
On 7/28/21 8:37 AM, Joe Perches wrote:
> On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
>> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
>> Kconfig symbols that are used questionably. Lots of these are false positives
>> but lots of the remainder could use some cleaning up.
> []
>> False positive example:
>>
>> XCHOFFLD_MEM
>> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
>> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>>
>> The Referencing source file does this:
>> #define CONFIG_XCHOFFLD_MEM 0x3
>>
>> which is legitimate, so no change is needed.
>
> Legitimate is perhaps dubious.
>
> It might be better if Kconfig has exclusive use of CONFIG_<foo> naming so
> renaming all the other existing CONFIG_<foo> defines might be appropriate.
I would prefer that as well -- maybe 15 years ago.
But I think it's too invasive to make that change now.
>
> $ git grep -P '^\s*#\s*define\s+CONFIG_[A-Z]+\b'
> arch/alpha/kernel/smc37c93x.c:#define CONFIG_CONTROL 0x02
> arch/sh/drivers/pci/ops-sh4.c:#define CONFIG_CMD(bus, devfn, where) \
> arch/sh/include/asm/smc37c93x.h:#define CONFIG_PORT 0x3f0
> arch/sh/include/asm/smc37c93x.h:#define CONFIG_ENTER 0x55
> arch/sh/include/asm/smc37c93x.h:#define CONFIG_EXIT 0xaa
> arch/sparc/kernel/pcic.c:#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (((unsigned int)bus) << 16) | (((unsigned int)device_fn) << 8) | (where & ~3))
> arch/um/drivers/mconsole_kern.h:#define CONFIG_CHUNK(str, size, current, chunk, end) \
> drivers/atm/he.h:#define CONFIG_RSRA 0x00000
> drivers/atm/he.h:#define CONFIG_RCMLBM 0x08000
> drivers/atm/he.h:#define CONFIG_RCMABR 0x0d800
> drivers/atm/he.h:#define CONFIG_RSRB 0x0e000
> drivers/atm/he.h:#define CONFIG_TSRA 0x00000
> drivers/atm/he.h:#define CONFIG_TSRB 0x08000
> drivers/atm/he.h:#define CONFIG_TSRC 0x0c000
> drivers/atm/he.h:#define CONFIG_TSRD 0x0e000
> drivers/atm/he.h:#define CONFIG_TMABR 0x0f000
> drivers/atm/he.h:#define CONFIG_TPDBA 0x10000
> drivers/comedi/drivers/ni_at_a2150.c:#define CONFIG_REG 0x0
> drivers/crypto/atmel-i2c.h:#define CONFIG_ZONE 0
> drivers/dma/idxd/perfmon.h:#define CONFIG_RESET 0x0000000000000001
> drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_MEMSIZE 0x150A
> drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_CNTL 0x1509
> drivers/gpu/drm/radeon/cikd.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/evergreend.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/nid.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/r600d.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/r600d.h:#define CONFIG_CNTL 0x5424
> drivers/gpu/drm/radeon/rv515d.h:#define CONFIG_MEMSIZE 0x00F8
> drivers/gpu/drm/radeon/rv770d.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/sid.h:#define CONFIG_MEMSIZE 0x5428
> drivers/macintosh/therm_adt746x.c:#define CONFIG_REG 0x40
> drivers/memory/ti-aemif.c:#define CONFIG_MASK (TA(TA_MAX) | \
> drivers/mtd/spi-nor/controllers/aspeed-smc.c:#define CONFIG_REG 0x0
> drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_REG(lp) SMC_REG(lp, 0x0000, 1)
> drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_GPCNTRL 0x0400 // Inverse value drives pin nCNTRL
> drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_DEFAULT (CONFIG_EPH_POWER_EN)
> drivers/pcmcia/cs_internal.h:#define CONFIG_LOCKED 0x01
> drivers/pinctrl/mvebu/pinctrl-dove.c:#define CONFIG_PMU BIT(4)
> drivers/staging/vt6655/device_cfg.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
> drivers/staging/vt6656/device.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
> drivers/thermal/qcom/tsens-8960.c:#define CONFIG_ADDR 0x3640
> drivers/thermal/qcom/tsens-8960.c:#define CONFIG_MASK 0xf
> drivers/usb/host/xhci.h:#define CONFIG_CIE (1 << 9)
> drivers/video/fbdev/geode/display_gx1.h:#define CONFIG_GCR 0xb8
> tools/power/x86/intel-speed-select/isst.h:#define CONFIG_TDP 0x7f
> tools/power/x86/intel-speed-select/isst.h:#define CONFIG_CLOS 0xd0
> tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
> tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
> tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h:#define CONFIG_SMP
> tools/virtio/linux/kernel.h:#define CONFIG_SMP
>
>
--
~Randy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
@ 2021-07-28 19:41 ` Randy Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: Randy Dunlap @ 2021-07-28 19:41 UTC (permalink / raw)
To: Joe Perches, linux-kernel-mentees; +Cc: kernel-janitors, LKML
On 7/28/21 8:37 AM, Joe Perches wrote:
> On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
>> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
>> Kconfig symbols that are used questionably. Lots of these are false positives
>> but lots of the remainder could use some cleaning up.
> []
>> False positive example:
>>
>> XCHOFFLD_MEM
>> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
>> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>>
>> The Referencing source file does this:
>> #define CONFIG_XCHOFFLD_MEM 0x3
>>
>> which is legitimate, so no change is needed.
>
> Legitimate is perhaps dubious.
>
> It might be better if Kconfig has exclusive use of CONFIG_<foo> naming so
> renaming all the other existing CONFIG_<foo> defines might be appropriate.
I would prefer that as well -- maybe 15 years ago.
But I think it's too invasive to make that change now.
>
> $ git grep -P '^\s*#\s*define\s+CONFIG_[A-Z]+\b'
> arch/alpha/kernel/smc37c93x.c:#define CONFIG_CONTROL 0x02
> arch/sh/drivers/pci/ops-sh4.c:#define CONFIG_CMD(bus, devfn, where) \
> arch/sh/include/asm/smc37c93x.h:#define CONFIG_PORT 0x3f0
> arch/sh/include/asm/smc37c93x.h:#define CONFIG_ENTER 0x55
> arch/sh/include/asm/smc37c93x.h:#define CONFIG_EXIT 0xaa
> arch/sparc/kernel/pcic.c:#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (((unsigned int)bus) << 16) | (((unsigned int)device_fn) << 8) | (where & ~3))
> arch/um/drivers/mconsole_kern.h:#define CONFIG_CHUNK(str, size, current, chunk, end) \
> drivers/atm/he.h:#define CONFIG_RSRA 0x00000
> drivers/atm/he.h:#define CONFIG_RCMLBM 0x08000
> drivers/atm/he.h:#define CONFIG_RCMABR 0x0d800
> drivers/atm/he.h:#define CONFIG_RSRB 0x0e000
> drivers/atm/he.h:#define CONFIG_TSRA 0x00000
> drivers/atm/he.h:#define CONFIG_TSRB 0x08000
> drivers/atm/he.h:#define CONFIG_TSRC 0x0c000
> drivers/atm/he.h:#define CONFIG_TSRD 0x0e000
> drivers/atm/he.h:#define CONFIG_TMABR 0x0f000
> drivers/atm/he.h:#define CONFIG_TPDBA 0x10000
> drivers/comedi/drivers/ni_at_a2150.c:#define CONFIG_REG 0x0
> drivers/crypto/atmel-i2c.h:#define CONFIG_ZONE 0
> drivers/dma/idxd/perfmon.h:#define CONFIG_RESET 0x0000000000000001
> drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_MEMSIZE 0x150A
> drivers/gpu/drm/amd/amdgpu/sid.h:#define CONFIG_CNTL 0x1509
> drivers/gpu/drm/radeon/cikd.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/evergreend.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/nid.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/r600d.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/r600d.h:#define CONFIG_CNTL 0x5424
> drivers/gpu/drm/radeon/rv515d.h:#define CONFIG_MEMSIZE 0x00F8
> drivers/gpu/drm/radeon/rv770d.h:#define CONFIG_MEMSIZE 0x5428
> drivers/gpu/drm/radeon/sid.h:#define CONFIG_MEMSIZE 0x5428
> drivers/macintosh/therm_adt746x.c:#define CONFIG_REG 0x40
> drivers/memory/ti-aemif.c:#define CONFIG_MASK (TA(TA_MAX) | \
> drivers/mtd/spi-nor/controllers/aspeed-smc.c:#define CONFIG_REG 0x0
> drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_REG(lp) SMC_REG(lp, 0x0000, 1)
> drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_GPCNTRL 0x0400 // Inverse value drives pin nCNTRL
> drivers/net/ethernet/smsc/smc91x.h:#define CONFIG_DEFAULT (CONFIG_EPH_POWER_EN)
> drivers/pcmcia/cs_internal.h:#define CONFIG_LOCKED 0x01
> drivers/pinctrl/mvebu/pinctrl-dove.c:#define CONFIG_PMU BIT(4)
> drivers/staging/vt6655/device_cfg.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
> drivers/staging/vt6656/device.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
> drivers/thermal/qcom/tsens-8960.c:#define CONFIG_ADDR 0x3640
> drivers/thermal/qcom/tsens-8960.c:#define CONFIG_MASK 0xf
> drivers/usb/host/xhci.h:#define CONFIG_CIE (1 << 9)
> drivers/video/fbdev/geode/display_gx1.h:#define CONFIG_GCR 0xb8
> tools/power/x86/intel-speed-select/isst.h:#define CONFIG_TDP 0x7f
> tools/power/x86/intel-speed-select/isst.h:#define CONFIG_CLOS 0xd0
> tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
> tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h:#define CONFIG_ALTIVEC
> tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h:#define CONFIG_SMP
> tools/virtio/linux/kernel.h:#define CONFIG_SMP
>
>
--
~Randy
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-28 19:41 ` Randy Dunlap
@ 2021-07-28 21:30 ` Joe Perches
-1 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2021-07-28 21:30 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kernel-mentees, LKML, kernel-janitors
On 2021-07-28 12:41, Randy Dunlap wrote:
> On 7/28/21 8:37 AM, Joe Perches wrote:
>> On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
>>> Running scripts/checkkconfigsymbols.py reports several hundred (maybe
>>> thousand)
>>> Kconfig symbols that are used questionably. Lots of these are false
>>> positives
>>> but lots of the remainder could use some cleaning up.
>> []
>>> False positive example:
>>>
>>> XCHOFFLD_MEM
>>> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
>>> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>>>
>>> The Referencing source file does this:
>>> #define CONFIG_XCHOFFLD_MEM 0x3
>>>
>>> which is legitimate, so no change is needed.
>>
>> Legitimate is perhaps dubious.
>>
>> It might be better if Kconfig has exclusive use of CONFIG_<foo> naming
>> so
>> renaming all the other existing CONFIG_<foo> defines might be
>> appropriate.
>
> I would prefer that as well -- maybe 15 years ago.
> But I think it's too invasive to make that change now.
I do not think it's that invasive.
It's something that doesn't have to be done immediately either.
It's not too many macro defines and not too many uses of those defines.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
@ 2021-07-28 21:30 ` Joe Perches
0 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2021-07-28 21:30 UTC (permalink / raw)
To: Randy Dunlap; +Cc: kernel-janitors, linux-kernel-mentees, LKML
On 2021-07-28 12:41, Randy Dunlap wrote:
> On 7/28/21 8:37 AM, Joe Perches wrote:
>> On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
>>> Running scripts/checkkconfigsymbols.py reports several hundred (maybe
>>> thousand)
>>> Kconfig symbols that are used questionably. Lots of these are false
>>> positives
>>> but lots of the remainder could use some cleaning up.
>> []
>>> False positive example:
>>>
>>> XCHOFFLD_MEM
>>> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
>>> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>>>
>>> The Referencing source file does this:
>>> #define CONFIG_XCHOFFLD_MEM 0x3
>>>
>>> which is legitimate, so no change is needed.
>>
>> Legitimate is perhaps dubious.
>>
>> It might be better if Kconfig has exclusive use of CONFIG_<foo> naming
>> so
>> renaming all the other existing CONFIG_<foo> defines might be
>> appropriate.
>
> I would prefer that as well -- maybe 15 years ago.
> But I think it's too invasive to make that change now.
I do not think it's that invasive.
It's something that doesn't have to be done immediately either.
It's not too many macro defines and not too many uses of those defines.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-28 21:30 ` Joe Perches
@ 2021-07-28 22:55 ` Randy Dunlap
-1 siblings, 0 replies; 13+ messages in thread
From: Randy Dunlap @ 2021-07-28 22:55 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel-mentees, LKML, kernel-janitors
On 7/28/21 2:30 PM, Joe Perches wrote:
> On 2021-07-28 12:41, Randy Dunlap wrote:
>> On 7/28/21 8:37 AM, Joe Perches wrote:
>>> On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
>>>> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
>>>> Kconfig symbols that are used questionably. Lots of these are false positives
>>>> but lots of the remainder could use some cleaning up.
>>> []
>>>> False positive example:
>>>>
>>>> XCHOFFLD_MEM
>>>> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
>>>> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>>>>
>>>> The Referencing source file does this:
>>>> #define CONFIG_XCHOFFLD_MEM 0x3
>>>>
>>>> which is legitimate, so no change is needed.
>>>
>>> Legitimate is perhaps dubious.
>>>
>>> It might be better if Kconfig has exclusive use of CONFIG_<foo> naming so
>>> renaming all the other existing CONFIG_<foo> defines might be appropriate.
>>
>> I would prefer that as well -- maybe 15 years ago.
>> But I think it's too invasive to make that change now.
>
> I do not think it's that invasive.
>
> It's something that doesn't have to be done immediately either.
>
> It's not too many macro defines and not too many uses of those defines.
OK :)
I'm not trying to prevent such a change.
Getting the exclusive use of CONFIG_symbols being dedicated to
Kconfig namespace is the bug hurdle (IMO).
--
~Randy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
@ 2021-07-28 22:55 ` Randy Dunlap
0 siblings, 0 replies; 13+ messages in thread
From: Randy Dunlap @ 2021-07-28 22:55 UTC (permalink / raw)
To: Joe Perches; +Cc: kernel-janitors, linux-kernel-mentees, LKML
On 7/28/21 2:30 PM, Joe Perches wrote:
> On 2021-07-28 12:41, Randy Dunlap wrote:
>> On 7/28/21 8:37 AM, Joe Perches wrote:
>>> On Mon, 2021-07-26 at 17:21 -0700, Randy Dunlap wrote:
>>>> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
>>>> Kconfig symbols that are used questionably. Lots of these are false positives
>>>> but lots of the remainder could use some cleaning up.
>>> []
>>>> False positive example:
>>>>
>>>> XCHOFFLD_MEM
>>>> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
>>>> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>>>>
>>>> The Referencing source file does this:
>>>> #define CONFIG_XCHOFFLD_MEM 0x3
>>>>
>>>> which is legitimate, so no change is needed.
>>>
>>> Legitimate is perhaps dubious.
>>>
>>> It might be better if Kconfig has exclusive use of CONFIG_<foo> naming so
>>> renaming all the other existing CONFIG_<foo> defines might be appropriate.
>>
>> I would prefer that as well -- maybe 15 years ago.
>> But I think it's too invasive to make that change now.
>
> I do not think it's that invasive.
>
> It's something that doesn't have to be done immediately either.
>
> It's not too many macro defines and not too many uses of those defines.
OK :)
I'm not trying to prevent such a change.
Getting the exclusive use of CONFIG_symbols being dedicated to
Kconfig namespace is the bug hurdle (IMO).
--
~Randy
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-28 15:37 ` Joe Perches
@ 2021-07-29 9:55 ` Greg KH
-1 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2021-07-29 9:55 UTC (permalink / raw)
To: Joe Perches; +Cc: Randy Dunlap, linux-kernel-mentees, kernel-janitors, LKML
On Wed, Jul 28, 2021 at 08:37:26AM -0700, Joe Perches wrote:
> drivers/staging/vt6655/device_cfg.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
> drivers/staging/vt6656/device.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
This can be removed right now, I'll go do that, this is totally
unused...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
@ 2021-07-29 9:55 ` Greg KH
0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2021-07-29 9:55 UTC (permalink / raw)
To: Joe Perches; +Cc: kernel-janitors, Randy Dunlap, linux-kernel-mentees, LKML
On Wed, Jul 28, 2021 at 08:37:26AM -0700, Joe Perches wrote:
> drivers/staging/vt6655/device_cfg.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
> drivers/staging/vt6656/device.h:#define CONFIG_PATH "/etc/vntconfiguration.dat"
This can be removed right now, I'll go do that, this is totally
unused...
thanks,
greg k-h
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: patch suggestion: Kconfig symbols
2021-07-27 0:21 patch suggestion: Kconfig symbols Randy Dunlap
2021-07-27 0:33 ` Shuah Khan
2021-07-28 15:37 ` Joe Perches
@ 2021-07-29 15:02 ` Lukas Bulwahn
2 siblings, 0 replies; 13+ messages in thread
From: Lukas Bulwahn @ 2021-07-29 15:02 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kernel-mentees
On Tue, Jul 27, 2021 at 2:21 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Hi,
>
> Running scripts/checkkconfigsymbols.py reports several hundred (maybe thousand)
> Kconfig symbols that are used questionably. Lots of these are false positives
> but lots of the remainder could use some cleaning up.
>
> One example:
>
> DSCC4
> Referencing files: arch/mips/configs/gpr_defconfig, arch/mips/configs/mtx1_defconfig, drivers/net/wan/Kconfig
> Similar symbols: SCC, DMASCC, CRC4, CRC64
>
> There is no longer a Kconfig entry for DSCC4 (it has been deleted, but some
> references to it were not deleted) -- and this is not a typo
> of one of the "Similar symbols" listed here.
>
> So all of these references to DSCC4 can be (should be) deleted.
> And of course, Cc: the GENERIC HDLC (WAN) DRIVERS maintainer on such a patch.
>
>
> False positive example:
>
> XCHOFFLD_MEM
> Referencing files: drivers/scsi/qla2xxx/qla_mbx.c
> Similar symbols: OF_PMEM, CXL_MEM, CXL_PMEM
>
> The Referencing source file does this:
> #define CONFIG_XCHOFFLD_MEM 0x3
>
> which is legitimate, so no change is needed.
>
>
> Comment example:
>
> IA32_SUPPORT
> Referencing files: arch/x86/include/asm/ia32.h
> Similar symbols: MEDIA_SUPPORT, EDAC_SUPPORT, IOMMU_SUPPORT, USB_SUPPORT, I2C_PARPORT, NIOS2_FPU_SUPPORT, NIOS2_CDX_SUPPORT, NIOS2_BMX_SUPPORT, MEDIA_USB_SUPPORT, MEDIA_SDR_SUPPORT
>
> The Referencing file has:
> #endif /* !CONFIG_IA32_SUPPORT */
>
> and this #ifdef block was begun with
> #ifdef CONFIG_IA32_EMULATION
>
> so the comment on the #endif line is incorrect.
> This could be fixed but it's not a big deal just to leave it as is.
>
> So there is lots here that could be done, but there are also lots of
> false positives here that don't need to be touched.
>
Thanks, Randy. Before giving the tasks to potential mentees, I first
had a look for myself and investigated as well. As you have seen, I
could already quickly remove HAVE_IDE, see
https://lore.kernel.org/lkml/20210728182115.4401-1-lukas.bulwahn@gmail.com/.
I am preparing another larger patch set for ./arch/x86 fixes to see
the reception of such a larger clean-up before handing such tasks to a
mentee.
There are a few "real false positives" and a few "just fixing
comments", but it is not too bad... In the end, there are some issues
that have been 'broken' (= working differently than intended or
fulfilling no purpose) for months or years and not being noticed. So,
the tool does serve some basic purpose of detecting some issues. Of
course, the resulting commits are "trivial patches", which brings back
Greg KH's general concern (on the ksummit mailing list) how to deal
with such work (e.g., verify the effect of the patch) when done by
potentially less trustworthy developers.
At least here on the linux-kernel-mentees, those patches would be
gated by some general mentor review and testing.
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-07-29 15:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 0:21 patch suggestion: Kconfig symbols Randy Dunlap
2021-07-27 0:33 ` Shuah Khan
2021-07-28 15:37 ` Joe Perches
2021-07-28 15:37 ` Joe Perches
2021-07-28 19:41 ` Randy Dunlap
2021-07-28 19:41 ` Randy Dunlap
2021-07-28 21:30 ` Joe Perches
2021-07-28 21:30 ` Joe Perches
2021-07-28 22:55 ` Randy Dunlap
2021-07-28 22:55 ` Randy Dunlap
2021-07-29 9:55 ` Greg KH
2021-07-29 9:55 ` Greg KH
2021-07-29 15:02 ` Lukas Bulwahn
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.