* [PATCH] scsi: pm80xx: remove redundant assignments to status
@ 2020-04-29 15:40 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-04-29 15:40 UTC (permalink / raw)
To: Jack Wang, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable status is being assigned with a value that is never read
hence the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/pm8001/pm80xx_hwi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 4d205ebaee87..f5e36375a68f 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -235,7 +235,6 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
pm8001_ha->forensic_fatal_step = 1;
pm8001_ha->fatal_forensic_shift_offset = 0;
pm8001_ha->forensic_last_offset = 0;
- status = 0;
offset = (int)
((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
@@ -258,7 +257,6 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
forensic_info.data_buf.direct_data,
"%08x ", *(temp + index));
}
- status = 0;
offset = (int)
((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
@@ -285,7 +283,6 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
pm8001_cw32(pm8001_ha, 0, MEMBASE_II_SHIFT_REGISTER,
pm8001_ha->fatal_forensic_shift_offset);
pm8001_ha->fatal_bar_loc = 0;
- status = 0;
offset = (int)
((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] scsi: pm80xx: remove redundant assignments to status
@ 2020-04-29 15:40 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-04-29 15:40 UTC (permalink / raw)
To: Jack Wang, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable status is being assigned with a value that is never read
hence the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/pm8001/pm80xx_hwi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 4d205ebaee87..f5e36375a68f 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -235,7 +235,6 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
pm8001_ha->forensic_fatal_step = 1;
pm8001_ha->fatal_forensic_shift_offset = 0;
pm8001_ha->forensic_last_offset = 0;
- status = 0;
offset = (int)
((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
@@ -258,7 +257,6 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
forensic_info.data_buf.direct_data,
"%08x ", *(temp + index));
}
- status = 0;
offset = (int)
((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
@@ -285,7 +283,6 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
pm8001_cw32(pm8001_ha, 0, MEMBASE_II_SHIFT_REGISTER,
pm8001_ha->fatal_forensic_shift_offset);
pm8001_ha->fatal_bar_loc = 0;
- status = 0;
offset = (int)
((char *)pm8001_ha->forensic_info.data_buf.direct_data
- (char *)buf);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: pm80xx: remove redundant assignments to status
2020-04-29 15:40 ` Colin King
@ 2020-04-29 19:54 ` Dan Carpenter
-1 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-04-29 19:54 UTC (permalink / raw)
To: Colin King
Cc: Jack Wang, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
On Wed, Apr 29, 2020 at 04:40:55PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable status is being assigned with a value that is never read
> hence the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Better to remove the "status" variable entirely.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: pm80xx: remove redundant assignments to status
@ 2020-04-29 19:54 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-04-29 19:54 UTC (permalink / raw)
To: Colin King
Cc: Jack Wang, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
On Wed, Apr 29, 2020 at 04:40:55PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable status is being assigned with a value that is never read
> hence the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Better to remove the "status" variable entirely.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-29 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 15:40 [PATCH] scsi: pm80xx: remove redundant assignments to status Colin King
2020-04-29 15:40 ` Colin King
2020-04-29 19:54 ` Dan Carpenter
2020-04-29 19:54 ` Dan Carpenter
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.