* [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln'
@ 2018-01-24 14:58 Colin King
2018-01-29 15:15 ` Varun Prakash
2018-01-31 2:24 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-01-24 14:58 UTC (permalink / raw)
To: James E . J . Bottomley, Martin K . Petersen, Varun Prakash, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer ln is assigned a value that is never read, it is re-assigned
a new value in the list_for_each loop hence the initialization is
redundant and can be removed.
Cleans up clang warning:
drivers/scsi/csiostor/csio_lnode.c:117:21: warning: Value stored to 'ln'
during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/csiostor/csio_lnode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
index be5ee2d37815..7dbbbb81a1e7 100644
--- a/drivers/scsi/csiostor/csio_lnode.c
+++ b/drivers/scsi/csiostor/csio_lnode.c
@@ -114,7 +114,7 @@ static enum csio_ln_ev fwevt_to_lnevt[] = {
static struct csio_lnode *
csio_ln_lookup_by_portid(struct csio_hw *hw, uint8_t portid)
{
- struct csio_lnode *ln = hw->rln;
+ struct csio_lnode *ln;
struct list_head *tmp;
/* Match siblings lnode with portid */
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln'
2018-01-24 14:58 [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln' Colin King
@ 2018-01-29 15:15 ` Varun Prakash
2018-01-31 2:24 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Varun Prakash @ 2018-01-29 15:15 UTC (permalink / raw)
To: Colin King
Cc: James E . J . Bottomley, Martin K . Petersen, linux-scsi,
kernel-janitors, linux-kernel
On Wed, Jan 24, 2018 at 02:58:01PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer ln is assigned a value that is never read, it is re-assigned
> a new value in the list_for_each loop hence the initialization is
> redundant and can be removed.
>
> Cleans up clang warning:
> drivers/scsi/csiostor/csio_lnode.c:117:21: warning: Value stored to 'ln'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/scsi/csiostor/csio_lnode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
> index be5ee2d37815..7dbbbb81a1e7 100644
> --- a/drivers/scsi/csiostor/csio_lnode.c
> +++ b/drivers/scsi/csiostor/csio_lnode.c
> @@ -114,7 +114,7 @@ static enum csio_ln_ev fwevt_to_lnevt[] = {
> static struct csio_lnode *
> csio_ln_lookup_by_portid(struct csio_hw *hw, uint8_t portid)
> {
> - struct csio_lnode *ln = hw->rln;
> + struct csio_lnode *ln;
> struct list_head *tmp;
>
> /* Match siblings lnode with portid */
Acked-by: Varun Prakash <varun@chelsio.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln'
2018-01-24 14:58 [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln' Colin King
2018-01-29 15:15 ` Varun Prakash
@ 2018-01-31 2:24 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-01-31 2:24 UTC (permalink / raw)
To: Colin King
Cc: James E . J . Bottomley, Martin K . Petersen, Varun Prakash,
linux-scsi, kernel-janitors, linux-kernel
Colin,
> The pointer ln is assigned a value that is never read, it is re-assigned
> a new value in the list_for_each loop hence the initialization is
> redundant and can be removed.
Applied to 4.16/scsi-fixes. Thank you.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-31 2:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 14:58 [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln' Colin King
2018-01-29 15:15 ` Varun Prakash
2018-01-31 2:24 ` 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).