* [PATCH] scsi: qedf: remove redundant initialization of 'fcport'
@ 2018-02-06 14:03 Colin King
2018-02-06 21:58 ` Chad Dupuis
2018-02-07 1:25 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-02-06 14:03 UTC (permalink / raw)
To: QLogic-Storage-Upstream, James E . J . Bottomley,
Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer fcport is initialized with a value that is never read, it is
re-assigned a new value later on, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
drivers/scsi/qedf/qedf_io.c:920:21: warning: Value stored to 'fcport'
during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/qedf/qedf_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index b15e69586a36..50a50c4249d0 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -917,7 +917,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd)
struct qedf_ctx *qedf = lport_priv(lport);
struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
struct fc_rport_libfc_priv *rp = rport->dd_data;
- struct qedf_rport *fcport = rport->dd_data;
+ struct qedf_rport *fcport;
struct qedf_ioreq *io_req;
int rc = 0;
int rval;
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: qedf: remove redundant initialization of 'fcport'
2018-02-06 14:03 [PATCH] scsi: qedf: remove redundant initialization of 'fcport' Colin King
@ 2018-02-06 21:58 ` Chad Dupuis
2018-02-07 1:25 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Chad Dupuis @ 2018-02-06 21:58 UTC (permalink / raw)
To: Colin King
Cc: QLogic-Storage-Upstream, James E . J . Bottomley,
Martin K . Petersen, linux-scsi, kernel-janitors, linux-kernel
On Tue, 6 Feb 2018, 9:03am, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer fcport is initialized with a value that is never read, it is
> re-assigned a new value later on, hence the initialization is redundant
> and can be removed.
>
> Cleans up clang warning:
> drivers/scsi/qedf/qedf_io.c:920:21: warning: Value stored to 'fcport'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/scsi/qedf/qedf_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
> index b15e69586a36..50a50c4249d0 100644
> --- a/drivers/scsi/qedf/qedf_io.c
> +++ b/drivers/scsi/qedf/qedf_io.c
> @@ -917,7 +917,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd)
> struct qedf_ctx *qedf = lport_priv(lport);
> struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
> struct fc_rport_libfc_priv *rp = rport->dd_data;
> - struct qedf_rport *fcport = rport->dd_data;
> + struct qedf_rport *fcport;
> struct qedf_ioreq *io_req;
> int rc = 0;
> int rval;
>
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: qedf: remove redundant initialization of 'fcport'
2018-02-06 14:03 [PATCH] scsi: qedf: remove redundant initialization of 'fcport' Colin King
2018-02-06 21:58 ` Chad Dupuis
@ 2018-02-07 1:25 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-02-07 1:25 UTC (permalink / raw)
To: Colin King
Cc: QLogic-Storage-Upstream, James E . J . Bottomley,
Martin K . Petersen, linux-scsi, kernel-janitors, linux-kernel
Colin,
> Pointer fcport is initialized with a value that is never read, it is
> re-assigned a new value later on, hence the initialization is redundant
> and can be removed.
Applied to 4.17/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-07 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 14:03 [PATCH] scsi: qedf: remove redundant initialization of 'fcport' Colin King
2018-02-06 21:58 ` Chad Dupuis
2018-02-07 1:25 ` 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).