[3273] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Peeves about 2.1.85

daemon@ATHENA.MIT.EDU (Eric Youngdale)
Mon Feb 9 00:21:47 1998

Date: 	Mon, 9 Feb 1998 00:34:09 -0500 (EST)
From: Eric Youngdale <eric@andante.jic.com>
To: linux-scsi@vger.rutgers.edu
cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
In-Reply-To: <199802090132.MAA32000@vindaloo.atnf.CSIRO.AU>


	Someone changed the initializer for IBMMCA in ibmmca.h back to the
old format, and I would bet large sums of money that the thing simply will
not compile.  It has the wrong number of initializers as a number of new
elements were added to the structure.  I am going to have to change it
back again - in the future I don't want to see the old style initializers
in any drivers because it means lots of edits whenever the structures are
changed.  It is also extremely tedious to convert old initializers to the
new format (having done it 30+ times a few months back). 

	Secondly, I notice a number of people are going and adding hacks
back to the drivers like: 

>#if   LINUX_VERSION_CODE >= LinuxVersionCode(2,1,75)
>#elif LINUX_VERSION_CODE >= LinuxVersionCode(1,3,0)
>#endif

	While relatively harmless, I believe that this isn't needed, and
this leads me to believe that some people are missing the point of this. 
The new form of the initializers don't exploit any new features of the
kernel - instead they exploit a compiler feature that has been around for
ages.  The point is that we can made slight changes to the actual
structure itself without requiring all 30+ drivers to have the initializer
modified.  For example, we may add a special flag in the structure for one
specific type of driver which would simply be set to 0 in all other
drivers.  With the new initializer format, only the drivers that use that
feature would set the flag.  All of the other drivers wouldn't need to be
modified at all - in a nutshell that's the point.   The old way of doing
things required that all 30+ drivers be patched, which was both a pain in
the neck, and error prone.

-Eric

"The woods are lovely, dark and deep.  But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."


home help back first fref pref prev next nref lref last post