public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Voelkel <Stefan.Voelkel@millenux.com>
To: linux-scsi@vger.kernel.org
Subject: [RFC] scsi_find_device() int -> unsigned int
Date: Fri, 07 Nov 2003 16:17:24 +0100	[thread overview]
Message-ID: <1068218244.794.13.camel@lt-sv> (raw)


[-- 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 --]

                 reply	other threads:[~2003-11-07 15:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1068218244.794.13.camel@lt-sv \
    --to=stefan.voelkel@millenux.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox