* dead CONFIG_ variables: drivers/scsi/
@ 2007-05-03 10:10 Robert P. J. Day
2007-05-03 11:11 ` Russell King
2007-05-03 14:15 ` James Bottomley
0 siblings, 2 replies; 6+ messages in thread
From: Robert P. J. Day @ 2007-05-03 10:10 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: linux-scsi
$ ../dead_config.sh drivers/scsi
========== 53C700_BE_BUS ==========
drivers/scsi/53c700.h:266:#ifdef CONFIG_53C700_BE_BUS
========== ACORNSCSI_CONSTANTS ==========
drivers/scsi/arm/acornscsi.c:106:#undef CONFIG_ACORNSCSI_CONSTANTS
drivers/scsi/arm/acornscsi.c:417:#ifdef CONFIG_ACORNSCSI_CONSTANTS
drivers/scsi/arm/acornscsi.c:495:#ifdef CONFIG_ACORNSCSI_CONSTANTS
========== AIC7XXX_PROC_STATS ==========
drivers/scsi/aic7xxx/aic7xxx_osm.c:152:#ifdef CONFIG_AIC7XXX_PROC_STATS
Documentation/filesystems/proc.txt:636: AIC7XXX_PROC_STATS : Disabled
drivers/scsi/aic7xxx/aic7xxx_osm.c:153:#define AIC7XXX_PROC_STATS
========== HIGHIO ==========
drivers/scsi/ips.h:61: #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO
========== NCR53C8XX_PREFETCH ==========
drivers/scsi/ncr53c8xx.c:1818:#ifdef CONFIG_NCR53C8XX_PREFETCH
========== SCSI_ACORNSCSI_LINK ==========
drivers/scsi/arm/acornscsi.c:70:#undef CONFIG_SCSI_ACORNSCSI_LINK
drivers/scsi/arm/acornscsi.c:169:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
drivers/scsi/arm/acornscsi.c:1675:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
drivers/scsi/arm/acornscsi.c:2849:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
drivers/scsi/arm/acornscsi.c:2880:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
========== SCSI_DC395x_TRMS1040_TRADMAP ==========
drivers/scsi/dc395x.c:1176:#ifdef CONFIG_SCSI_DC395x_TRMS1040_TRADMAP
========== SCSI_G_NCR5380_MEM ==========
drivers/scsi/g_NCR5380.c:299:#ifdef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:377:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:439:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:449:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:519:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:592:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:599: /* implies CONFIG_SCSI_G_NCR5380_MEM */
drivers/scsi/g_NCR5380.c:612:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:619: /* implies CONFIG_SCSI_G_NCR5380_MEM */
drivers/scsi/g_NCR5380.c:678:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:684: /* implies CONFIG_SCSI_G_NCR5380_MEM */
drivers/scsi/g_NCR5380.c:694:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.c:700: /* implies CONFIG_SCSI_G_NCR5380_MEM */
drivers/scsi/g_NCR5380.h:66:#ifndef CONFIG_SCSI_G_NCR5380_MEM
drivers/scsi/g_NCR5380.h:94:/* therefore CONFIG_SCSI_G_NCR5380_MEM */
drivers/scsi/g_NCR5380_mmio.c:7:#define SCSI_G_NCR5380_MEM
========== SCSI_NCR53C8XX_DISABLE_MPARITY_CHECK ==========
drivers/scsi/ncr53c8xx.h:175:#ifdef CONFIG_SCSI_NCR53C8XX_DISABLE_MPARITY_CHECK
========== SCSI_NCR53C8XX_DISABLE_PARITY_CHECK ==========
drivers/scsi/ncr53c8xx.h:184:#ifdef CONFIG_SCSI_NCR53C8XX_DISABLE_PARITY_CHECK
========== SCSI_NCR53C8XX_FORCE_SYNC_NEGO ==========
drivers/scsi/ncr53c8xx.h:166:#ifdef CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO
========== SCSI_NCR53C8XX_IARB ==========
drivers/scsi/ncr53c8xx.h:125:#if defined(CONFIG_SCSI_NCR53C8XX_IARB)
========== SCSI_NCR53C8XX_INTEGRITY_CHECK ==========
drivers/scsi/ncr53c8xx.h:70:#ifdef CONFIG_SCSI_NCR53C8XX_INTEGRITY_CHECK
========== SCSI_NCR53C8XX_NO_WORD_TRANSFERS ==========
drivers/scsi/ncr53c8xx.h:416:#ifdef CONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS
drivers/scsi/ncr53c8xx.h:424:#ifdef CONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS
========== SCSI_NCR53C8XX_TAGGED_QUEUE ==========
drivers/scsi/ncr53c8xx.h:116:#elif defined CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE
========== WD33C93_PIO ==========
drivers/scsi/wd33c93.c:172:#ifdef CONFIG_WD33C93_PIO
drivers/scsi/wd33c93.c:230:#else /* CONFIG_WD33C93_PIO */
drivers/scsi/wd33c93.c:297:#endif /* CONFIG_WD33C93_PIO */
drivers/scsi/wd33c93.h:193:#ifdef CONFIG_WD33C93_PIO
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dead CONFIG_ variables: drivers/scsi/
2007-05-03 10:10 dead CONFIG_ variables: drivers/scsi/ Robert P. J. Day
@ 2007-05-03 11:11 ` Russell King
2007-05-03 11:17 ` Robert P. J. Day
2007-05-03 14:15 ` James Bottomley
1 sibling, 1 reply; 6+ messages in thread
From: Russell King @ 2007-05-03 11:11 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, linux-scsi
On Thu, May 03, 2007 at 06:10:28AM -0400, Robert P. J. Day wrote:
>
> $ ../dead_config.sh drivers/scsi
> ========== ACORNSCSI_CONSTANTS ==========
> drivers/scsi/arm/acornscsi.c:106:#undef CONFIG_ACORNSCSI_CONSTANTS
> drivers/scsi/arm/acornscsi.c:417:#ifdef CONFIG_ACORNSCSI_CONSTANTS
> drivers/scsi/arm/acornscsi.c:495:#ifdef CONFIG_ACORNSCSI_CONSTANTS
> ========== SCSI_ACORNSCSI_LINK ==========
> drivers/scsi/arm/acornscsi.c:70:#undef CONFIG_SCSI_ACORNSCSI_LINK
> drivers/scsi/arm/acornscsi.c:169:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
> drivers/scsi/arm/acornscsi.c:1675:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
> drivers/scsi/arm/acornscsi.c:2849:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
> drivers/scsi/arm/acornscsi.c:2880:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
False positives. That #undef is preceded by a comment describing the
driver-internal configuration for developers rather than users. I
guess they shouldn't be preceded by CONFIG_.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dead CONFIG_ variables: drivers/scsi/
2007-05-03 11:11 ` Russell King
@ 2007-05-03 11:17 ` Robert P. J. Day
2007-05-03 11:22 ` Russell King
2007-05-03 11:35 ` Stefan Richter
0 siblings, 2 replies; 6+ messages in thread
From: Robert P. J. Day @ 2007-05-03 11:17 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel Mailing List, linux-scsi
On Thu, 3 May 2007, Russell King wrote:
> On Thu, May 03, 2007 at 06:10:28AM -0400, Robert P. J. Day wrote:
> >
> > $ ../dead_config.sh drivers/scsi
> > ========== ACORNSCSI_CONSTANTS ==========
> > drivers/scsi/arm/acornscsi.c:106:#undef CONFIG_ACORNSCSI_CONSTANTS
> > drivers/scsi/arm/acornscsi.c:417:#ifdef CONFIG_ACORNSCSI_CONSTANTS
> > drivers/scsi/arm/acornscsi.c:495:#ifdef CONFIG_ACORNSCSI_CONSTANTS
> > ========== SCSI_ACORNSCSI_LINK ==========
> > drivers/scsi/arm/acornscsi.c:70:#undef CONFIG_SCSI_ACORNSCSI_LINK
> > drivers/scsi/arm/acornscsi.c:169:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
> > drivers/scsi/arm/acornscsi.c:1675:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
> > drivers/scsi/arm/acornscsi.c:2849:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
> > drivers/scsi/arm/acornscsi.c:2880:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
>
> False positives. That #undef is preceded by a comment describing the
> driver-internal configuration for developers rather than users. I
> guess they shouldn't be preceded by CONFIG_.
i've already admitted that this script is going to generate false
positives for a number of reasons, the most common one being using the
"CONFIG_" prefix outside the context of Kconfig.
technically, of course, that doesn't hurt but it sure would make the
code clearer if that prefix was officially reserved for Kconfig stuff.
rday
p.s. "CONFIG_" prefix aside, i would think it's also a bit yucky to
be checking for the definition of a preprocessor symbol that you've
already hardcoded out of existence in the same source file. :-)
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dead CONFIG_ variables: drivers/scsi/
2007-05-03 11:17 ` Robert P. J. Day
@ 2007-05-03 11:22 ` Russell King
2007-05-03 11:35 ` Stefan Richter
1 sibling, 0 replies; 6+ messages in thread
From: Russell King @ 2007-05-03 11:22 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, linux-scsi
On Thu, May 03, 2007 at 07:17:34AM -0400, Robert P. J. Day wrote:
> p.s. "CONFIG_" prefix aside, i would think it's also a bit yucky to
> be checking for the definition of a preprocessor symbol that you've
> already hardcoded out of existence in the same source file. :-)
No, because the way you turn them on (as intended) is to do:
perl -pi -e 's/undef/define/ if m/CONFIG_ACORNSCSI_CONSTANTS/' \
drivers/scsi/arm/acornscsi.c
(or via your text editor).
An alternative way around the issue is to keep a separate patch
outside of mainline which patches the additional code and data into
the driver. That's far less maintainable, and leads to additional
problems.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dead CONFIG_ variables: drivers/scsi/
2007-05-03 11:17 ` Robert P. J. Day
2007-05-03 11:22 ` Russell King
@ 2007-05-03 11:35 ` Stefan Richter
1 sibling, 0 replies; 6+ messages in thread
From: Stefan Richter @ 2007-05-03 11:35 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Russell King, Linux Kernel Mailing List, linux-scsi
Robert P. J. Day wrote:
[...]
>> > drivers/scsi/arm/acornscsi.c:70:#undef CONFIG_SCSI_ACORNSCSI_LINK
>> > drivers/scsi/arm/acornscsi.c:169:#ifdef CONFIG_SCSI_ACORNSCSI_LINK
[...]
> p.s. "CONFIG_" prefix aside, i would think it's also a bit yucky to
> be checking for the definition of a preprocessor symbol that you've
> already hardcoded out of existence in the same source file. :-)
These are basically #if 0 ... #endif blocks with an activation switch
conveniently placed at the top of the .c file. In the quoted example,
the effect of the activation switch is also documented by a comment.
Of course we should restrain ourselves WRT the use of #if 0 ... #endif
blocks in in-tree code, but sometimes they have sensible applications.
--
Stefan Richter
-=====-=-=== -=-= ---==
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dead CONFIG_ variables: drivers/scsi/
2007-05-03 10:10 dead CONFIG_ variables: drivers/scsi/ Robert P. J. Day
2007-05-03 11:11 ` Russell King
@ 2007-05-03 14:15 ` James Bottomley
1 sibling, 0 replies; 6+ messages in thread
From: James Bottomley @ 2007-05-03 14:15 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, linux-scsi
On Thu, 2007-05-03 at 06:10 -0400, Robert P. J. Day wrote:
> $ ../dead_config.sh drivers/scsi
> ========== 53C700_BE_BUS ==========
> drivers/scsi/53c700.h:266:#ifdef CONFIG_53C700_BE_BUS
This isn't dead, it's a placeholder ... the 53c700 can be wired either
LE or BE ... there's only one current BE user, and that's a parisc box
that has to be runtime switchable (the later integrated SCSI chip was
wired LE). However, it was thought there would be ppc users for
unconditional BE drivers.
James
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-03 14:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-03 10:10 dead CONFIG_ variables: drivers/scsi/ Robert P. J. Day
2007-05-03 11:11 ` Russell King
2007-05-03 11:17 ` Robert P. J. Day
2007-05-03 11:22 ` Russell King
2007-05-03 11:35 ` Stefan Richter
2007-05-03 14:15 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox