All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
@ 2017-02-07 11:51 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-02-07 11:51 UTC (permalink / raw)
  To: Adaptec OEM Raid Solutions, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
@ 2017-02-07 11:51 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-02-07 11:51 UTC (permalink / raw)
  To: Adaptec OEM Raid Solutions, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
  2017-02-07 11:51 ` Colin King
@ 2017-02-07 19:35   ` Raghava Aditya Renukunta
  -1 siblings, 0 replies; 6+ messages in thread
From: Raghava Aditya Renukunta @ 2017-02-07 19:35 UTC (permalink / raw)
  To: Colin King, dl-esc-Aacraid Linux Driver, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel



> -----Original Message-----
> From: Colin King [mailto:colin.king@canonical.com]
> Sent: Tuesday, February 7, 2017 3:51 AM
> To: dl-esc-Aacraid Linux Driver <aacraid@microsemi.com>; James E . J .
> Bottomley <jejb@linux.vnet.ibm.com>; Martin K . Petersen
> <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
> 
> EXTERNAL EMAIL
> 
> 
> 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>
> ---

Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
@ 2017-02-07 19:35   ` Raghava Aditya Renukunta
  0 siblings, 0 replies; 6+ messages in thread
From: Raghava Aditya Renukunta @ 2017-02-07 19:35 UTC (permalink / raw)
  To: Colin King, dl-esc-Aacraid Linux Driver, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQ29saW4gS2luZyBbbWFp
bHRvOmNvbGluLmtpbmdAY2Fub25pY2FsLmNvbV0NCj4gU2VudDogVHVlc2RheSwgRmVicnVhcnkg
NywgMjAxNyAzOjUxIEFNDQo+IFRvOiBkbC1lc2MtQWFjcmFpZCBMaW51eCBEcml2ZXIgPGFhY3Jh
aWRAbWljcm9zZW1pLmNvbT47IEphbWVzIEUgLiBKIC4NCj4gQm90dG9tbGV5IDxqZWpiQGxpbnV4
LnZuZXQuaWJtLmNvbT47IE1hcnRpbiBLIC4gUGV0ZXJzZW4NCj4gPG1hcnRpbi5wZXRlcnNlbkBv
cmFjbGUuY29tPjsgbGludXgtc2NzaUB2Z2VyLmtlcm5lbC5vcmcNCj4gQ2M6IGtlcm5lbC1qYW5p
dG9yc0B2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmcNCj4gU3Vi
amVjdDogW1BBVENIXVtWMl0gc2NzaTogYWFjcmFpZDogcmNvZGUgaXMgdW5zaWduZWQgYW5kIHNo
b3VsZCBiZSBzaWduZWQgaW50DQo+IA0KPiBFWFRFUk5BTCBFTUFJTA0KPiANCj4gDQo+IEZyb206
IENvbGluIElhbiBLaW5nIDxjb2xpbi5raW5nQGNhbm9uaWNhbC5jb20+DQo+IA0KPiBhYWNfZmli
X3NlbmQgY2FuIHJldHVybiAtdmUgZXJyb3IgcmV0dXJucyBhbmQgaGVuY2UgcmNvZGUgc2hvdWxk
DQo+IGJlIHNpZ25lZC4gQ3VycmVudGx5IHRoZSByY29kZSA+PSAwIGNoZWNrIGlzIGFsd2F5cyB0
cnVlIGFuZCAtdmUNCj4gZXJyb3JzIGFyZSBub3QgYmVpbmcgY2hlY2tlZC4NCj4gDQo+IFRoYW5r
cyB0byBEYW4gQ2FycGVudGVyIGZvciBzcG90dGluZyBteSBvcmlnaW5hbCBicm9rZW4gZml4IHRv
IHRoaXMNCj4gaXNzdWUuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBDb2xpbiBJYW4gS2luZyA8Y29s
aW4ua2luZ0BjYW5vbmljYWwuY29tPg0KPiAtLS0NCg0KUmV2aWV3ZWQtYnk6IFJhZ2hhdmEgQWRp
dHlhIFJlbnVrdW50YSA8UmFnaGF2YUFkaXR5YS5SZW51a3VudGFAbWljcm9zZW1pLmNvbT4NCg0K

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
  2017-02-07 11:51 ` Colin King
@ 2017-02-07 22:23   ` Martin K. Petersen
  -1 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-02-07 22:23 UTC (permalink / raw)
  To: Colin King
  Cc: Adaptec OEM Raid Solutions, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi, kernel-janitors, linux-kernel

>>>>> "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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int
@ 2017-02-07 22:23   ` Martin K. Petersen
  0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-02-07 22:23 UTC (permalink / raw)
  To: Colin King
  Cc: Adaptec OEM Raid Solutions, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi, kernel-janitors, linux-kernel

>>>>> "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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-07 22:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 11:51 [PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int Colin King
2017-02-07 11:51 ` Colin King
2017-02-07 19:35 ` Raghava Aditya Renukunta
2017-02-07 19:35   ` Raghava Aditya Renukunta
2017-02-07 22:23 ` Martin K. Petersen
2017-02-07 22:23   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.