* [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c
@ 2018-01-05 15:31 Colin King
2018-01-05 16:42 ` Raghava Aditya Renukunta
2018-01-09 2:50 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-01-05 15:31 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>
A previous commit no longer stores the contents of c, so we now have
a situation where c is being updated but the value is never read. Clean
up the code by removing the now redundant setting of variable c.
Cleans up clang warning:
drivers/scsi/aacraid/aachba.c:943:3: warning: Value stored to 'c' is
never read
Fixes: f4e8708d3104 ("scsi: aacraid: Fix udev inquiry race condition")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/aacraid/aachba.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index a2bdd7931cf1..525d72fcbf3e 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -940,11 +940,8 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex)
while (*cp == ' ')
++cp;
/* last six chars reserved for vol type */
- c = 0;
- if (strlen(cp) > sizeof(str->pid)) {
- c = cp[sizeof(str->pid)];
+ if (strlen(cp) > sizeof(str->pid))
cp[sizeof(str->pid)] = '\0';
- }
inqstrcpy (cp, str->pid);
kfree(cname);
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c
2018-01-05 15:31 [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c Colin King
@ 2018-01-05 16:42 ` Raghava Aditya Renukunta
2018-01-09 2:50 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Raghava Aditya Renukunta @ 2018-01-05 16:42 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: Friday, January 5, 2018 7:31 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][scsi-next] scsi: aacraid: remove redundant setting of
> variable c
>
> EXTERNAL EMAIL
>
>
> From: Colin Ian King <colin.king@canonical.com>
>
> A previous commit no longer stores the contents of c, so we now have
> a situation where c is being updated but the value is never read. Clean
> up the code by removing the now redundant setting of variable c.
>
> Cleans up clang warning:
> drivers/scsi/aacraid/aachba.c:943:3: warning: Value stored to 'c' is
> never read
>
> Fixes: f4e8708d3104 ("scsi: aacraid: Fix udev inquiry race condition")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Reviewed-by :Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c
2018-01-05 15:31 [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c Colin King
2018-01-05 16:42 ` Raghava Aditya Renukunta
@ 2018-01-09 2:50 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-01-09 2:50 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,
> A previous commit no longer stores the contents of c, so we now have a
> situation where c is being updated but the value is never read. Clean
> up the code by removing the now redundant setting of variable c.
Applied to 4.16/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-09 2:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 15:31 [PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c Colin King
2018-01-05 16:42 ` Raghava Aditya Renukunta
2018-01-09 2:50 ` Martin K. Petersen
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).