Skip to contentSkip to conversation

signed bug in scsi_device.h

PATCH In review Olaf Hering 2 participants 4 messages May 13, 2004 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 signed bug in scsi_device.h

one of the recent aic7xxx versions puts a -1 in scsi_cmnd->device->type, in drivers/scsi/aic7xxx/aic79xx_osm.c
that doesnt work very well on ppc because aic7xxx tends to use -Werror.

maybe scsi_level needs the signed as well.

include/scsi/scsi_device.h 2004-05-13 18:27:37.000000000 +0200 renamed from include/scsi/scsi_device.h~ 2004-05-13 18:22:20.000000000 +0200 +1 -1
@@ -57,7 +57,7 @@ struct scsi_device {
 
        void *hostdata;         /* available to low-level driver */
        char devfs_name[256];   /* devfs junk */
-       char type;
+       signed char type;
        char scsi_level;
        unsigned char inquiry_len;      /* valid bytes in 'inquiry' */
        unsigned char * inquiry;        /* INQUIRY response data */
Signature · 7 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 6 lines · Olaf Hering

one of the recent aic7xxx versions puts a -1 in scsi_cmnd->device->type, in drivers/scsi/aic7xxx/aic79xx_osm.c
that doesnt work very well on ppc because aic7xxx tends to use -Werror.

maybe scsi_level needs the signed as well.

Maybe aic7xxx should stop doing stuff like that instead?

#2 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 6 lines · Olaf Hering

one of the recent aic7xxx versions puts a -1 in scsi_cmnd->device->type, in drivers/scsi/aic7xxx/aic79xx_osm.c
that doesnt work very well on ppc because aic7xxx tends to use -Werror.

maybe scsi_level needs the signed as well.

Maybe aic7xxx should stop doing stuff like that instead?

Okay, I take that back, it should be signed indeed. That doesn't mean aic7xxx should ever write to that field, though.

#3 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig
Quoted 6 lines · Olaf Hering

one of the recent aic7xxx versions puts a -1 in scsi_cmnd->device->type, in drivers/scsi/aic7xxx/aic79xx_osm.c
that doesnt work very well on ppc because aic7xxx tends to use -Werror.

maybe scsi_level needs the signed as well.

Maybe aic7xxx should stop doing stuff like that instead?

probably. Can you fix up scsi_alloc_sdev in the meantime?
I just looked again, the check was device->type != -1.
Maybe our enterprise compiler is just too pedantic. I really dont know.

Signature · 7 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html