提交 91814744 编写于 作者: C Colin Ian King 提交者: Martin K. Petersen

scsi: aacraid: remove redundant setting of variable c

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: f4e8708d ("scsi: aacraid: Fix udev inquiry race condition")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 dd04b0f3
...@@ -940,11 +940,8 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex) ...@@ -940,11 +940,8 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex)
while (*cp == ' ') while (*cp == ' ')
++cp; ++cp;
/* last six chars reserved for vol type */ /* last six chars reserved for vol type */
c = 0; if (strlen(cp) > sizeof(str->pid))
if (strlen(cp) > sizeof(str->pid)) {
c = cp[sizeof(str->pid)];
cp[sizeof(str->pid)] = '\0'; cp[sizeof(str->pid)] = '\0';
}
inqstrcpy (cp, str->pid); inqstrcpy (cp, str->pid);
kfree(cname); kfree(cname);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册