+ signedness-issue-in-drivers-scsi-osstc.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Signdness issue in drivers/scsi/osst.c

has been added to the -mm tree.  Its filename is

     signedness-issue-in-drivers-scsi-osstc.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Signdness issue in drivers/scsi/osst.c
From: Eric Sesterhenn <snakebyte@xxxxxx>

another signdness warning from gcc 4.1

drivers/scsi/osst.c:5154: warning: comparison of unsigned expression < 0 is always false

The problem is that blk is defined as unsigned, but all usages of it are
normal int cases.  osst_get_frame_position() and osst_get_sector() return ints
and can return negative values.  If blk stays an unsigned int, the error check
is useless.

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
Cc: Willem Riede <osst@xxxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/scsi/osst.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/scsi/osst.c~signedness-issue-in-drivers-scsi-osstc drivers/scsi/osst.c
--- a/drivers/scsi/osst.c~signedness-issue-in-drivers-scsi-osstc
+++ a/drivers/scsi/osst.c
@@ -4843,8 +4843,7 @@ static int os_scsi_tape_close(struct ino
 static int osst_ioctl(struct inode * inode,struct file * file,
 	 unsigned int cmd_in, unsigned long arg)
 {
-	int		      i, cmd_nr, cmd_type, retval = 0;
-	unsigned int	      blk;
+	int		      i, cmd_nr, cmd_type, blk, retval = 0;
 	struct st_modedef   * STm;
 	struct st_partstat  * STps;
 	struct osst_request * SRpnt = NULL;
_

Patches currently in -mm which might be from snakebyte@xxxxxx are

git-gfs2.patch
signedness-issue-in-drivers-net-phy-phy_devicec.patch
signedness-issue-in-drivers-scsi-iprc.patch
signedness-issue-in-drivers-scsi-osstc.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux