Re: dead CONFIG_ variables: drivers/scsi/

From: Stefan Richter
Date: Thu May 03 2007 - 07:37:11 EST


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/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/