Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575595 > unrolled thread

[PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int

Started byColin King <colin.king@canonical.com>
First post2017-02-07 13:00 +0100
Last post2017-02-07 23:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int Colin King <colin.king@canonical.com> - 2017-02-07 13:00 +0100
    Re: [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-02-07 23:30 +0100

#1575595 — [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int

FromColin King <colin.king@canonical.com>
Date2017-02-07 13:00 +0100
Subject[PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
Message-ID<t8cBc-2ms-15@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

aac_fib_send can return -ve error returns and hence rcode should
be signed. Currently the rcode >= 0 check is always true and -ve
errors are not being checked.

Thanks to Dan Carpenter for spotting my original broken fix to this
issue.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/aacraid/aachba.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 3b5ddf4..907f1e8 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1798,7 +1798,7 @@ int aac_report_phys_luns(struct aac_dev *dev, struct fib *fibptr, int rescan)
 	struct sgmap64 *sg64;
 	dma_addr_t addr;
 	u32 vbus, vid;
-	u32 rcode = 0;
+	int rcode = 0;
 
 	/* Thor SA Firmware -> CISS_REPORT_PHYSICAL_LUNS */
 	fibsize = sizeof(struct aac_srb) - sizeof(struct sgentry)
-- 
2.10.2

[toc] | [next] | [standalone]


#1576123

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2017-02-07 23:30 +0100
Message-ID<t8mqS-iJ-11@gated-at.bofh.it>
In reply to#1575595
>>>>> "Colin" == Colin King <colin.king@canonical.com> writes:

Colin> aac_fib_send can return -ve error returns and hence rcode should
Colin> be signed. Currently the rcode >= 0 check is always true and -ve
Colin> errors are not being checked.

Colin> Thanks to Dan Carpenter for spotting my original broken fix to
Colin> this issue.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web