linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] scsi_find_device() int -> unsigned int
@ 2003-11-07 15:17 Stefan Voelkel
  0 siblings, 0 replies; only message in thread
From: Stefan Voelkel @ 2003-11-07 15:17 UTC (permalink / raw)
  To: linux-scsi


[-- Attachment #1.1: Type: text/plain, Size: 582 bytes --]

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
-- 
--------------------------------------------------------------------
Stefan Völkel                            stefan.voelkel@millenux.com
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/ =-

[-- Attachment #1.2: unsigned.diff --]
[-- Type: text/plain, Size: 622 bytes --]

--- hosts.h	2003-11-07 15:48:52.146602957 +0100
+++ /tmp/hosts.h	2003-11-07 15:48:08.126602957 +0100
@@ -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)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-11-07 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-07 15:17 [RFC] scsi_find_device() int -> unsigned int Stefan Voelkel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).