[lkml]   [2001]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.5.1-pre2 does not compile
On Nov 28, 2001  17:42 +0100, Christoph Hellwig wrote:
> On Wed, Nov 28, 2001 at 09:26:00AM -0700, Andreas Dilger wrote:
> > What would be nice in the case of drivers that don't use the new error
> > handling code is to add something like:
> >
> > #warning "Uses obsolete SCSI error code, see Documentation/2.5/scsi-error.txt"
> >
> > for a hint as to the reason why it no longer compiles, and a short guide
> > on how to update the drivers.
> I already thought about that - as the old error handling code is selected
> by setting a member in a struct to '1' I don't see any easy way to do so...

I'm thinking about a compile-time #warning/#error, that at least tells an
interested party where to start looking for how to fix this. It could be
anywhere in the affected driver source file (preferrably at the top, so it
is hit before the compiler exits because of too many other errors). It
would just be a matter of cut-n-paste a single line into every file which
previously used the old error-handling code.

I presume that the nature of this change will either cause compile errors
anyways (because of missing struct definitions), or linker errors (because
of missing functions). I think that having a #warning at compile time will
at least avoid a whole bunch of "this driver doesn't compile, help me"
emails, and may also help someone to actually update the driver rather than
giving up because they have no idea where to begin looking for the fix.

Actually, what would also be nice is to include the kernel version where
this change happened, so that interested parties could also see what changes
where necessary to bring about this fix. In this case (removing the old
error handling support), it probably doesn't help much, but in Jens' BIO
changes it _would_ be very helpful to know when a major change was made
so potential fixers can "follow along" with the changes rather than having
to reverse-engineer it 50 releases from now (along with the 33 other major
changes that have been made along the way). Even now, with the BIO +
SCSI error handling changes there are a lot of SCSI drivers with problems
and it won't be "obvious" how to fix them later on.

Cheers, Andreas

PS - are you sure the old error handling code was selected with a '1' and
not with a '0' for "use_new_eh_code"?
Andreas Dilger

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:13    [W:0.070 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site