Skip to contentSkip to conversation

scsi_find_device() int -> unsigned int

RFC New Stefan Voelkel 1 participant 1 message Nov 7, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

RFC 1/1 scsi_find_device() int -> unsigned int

Hello,

after hitting a signed/unsigned bug I turned on -Wsign-compare and found a warning in scsi_find_device(). Any reason not to do this?

regards
Stefan

Signature · 6 lines
--------------------------------------------------------------------
Stefan Völkel                            [email protected]
Millenux GmbH                              mobile: +49.170.79177.17
Lilienthalstraße 2                          phone: +49.711.88770.300
70825 Stuttgart-Korntal                       fax: +49.711.88770.349
     -= linux without limits -=- http://linux.zSeries.org/ =-
tmp/hosts.h renamed from hosts.h +4 -2
@@ -35,8 +35,10 @@
  * @pun:	SCSI target number (physical unit number)
  * @lun:	SCSI Logical Unit Number
  **/
-static inline struct scsi_device *scsi_find_device(struct Scsi_Host *shost,
-                                            int channel, int pun, int lun) {
+static inline struct scsi_device *
+scsi_find_device(struct Scsi_Host *shost, unsigned int channel,
+		unsigned int pun, unsigned int lun)
+{
         struct scsi_device *sdev;
 
 	list_for_each_entry (sdev, &shost->my_devices, siblings)