All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: libfc: remove redundant initialization of 'disc'
@ 2018-02-06 14:21 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-02-06 14:21 UTC (permalink / raw)
  To: Johannes Thumshirn, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer disc is being intializated a value that is never read and then
re-assigned the same value later on, hence the initialization is redundant
and can be removed.

Cleans up clang warning:
drivers/scsi/libfc/fc_disc.c:734:18: warning: Value stored to 'disc'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/libfc/fc_disc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 8660f923ace0..3f3569ec5ce3 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -731,7 +731,7 @@ static void fc_disc_stop_final(struct fc_lport *lport)
  */
 void fc_disc_config(struct fc_lport *lport, void *priv)
 {
-	struct fc_disc *disc = &lport->disc;
+	struct fc_disc *disc;
 
 	if (!lport->tt.disc_start)
 		lport->tt.disc_start = fc_disc_start;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] scsi: libfc: remove redundant initialization of 'disc'
@ 2018-02-06 14:21 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-02-06 14:21 UTC (permalink / raw)
  To: Johannes Thumshirn, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer disc is being intializated a value that is never read and then
re-assigned the same value later on, hence the initialization is redundant
and can be removed.

Cleans up clang warning:
drivers/scsi/libfc/fc_disc.c:734:18: warning: Value stored to 'disc'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/libfc/fc_disc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 8660f923ace0..3f3569ec5ce3 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -731,7 +731,7 @@ static void fc_disc_stop_final(struct fc_lport *lport)
  */
 void fc_disc_config(struct fc_lport *lport, void *priv)
 {
-	struct fc_disc *disc = &lport->disc;
+	struct fc_disc *disc;
 
 	if (!lport->tt.disc_start)
 		lport->tt.disc_start = fc_disc_start;
-- 
2.15.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: libfc: remove redundant initialization of 'disc'
  2018-02-06 14:21 ` Colin King
@ 2018-02-06 14:39   ` Johannes Thumshirn
  -1 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2018-02-06 14:39 UTC (permalink / raw)
  To: Colin King
  Cc: Johannes Thumshirn, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi, kernel-janitors, linux-kernel

Looks good,
Acked-by: Johannes Thumshirn <jth@kernel.org>
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: libfc: remove redundant initialization of 'disc'
@ 2018-02-06 14:39   ` Johannes Thumshirn
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2018-02-06 14:39 UTC (permalink / raw)
  To: Colin King
  Cc: Johannes Thumshirn, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi, kernel-janitors, linux-kernel

Looks good,
Acked-by: Johannes Thumshirn <jth@kernel.org>
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: libfc: remove redundant initialization of 'disc'
  2018-02-06 14:21 ` Colin King
@ 2018-02-07  1:26   ` Martin K. Petersen
  -1 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2018-02-07  1:26 UTC (permalink / raw)
  To: Colin King
  Cc: Johannes Thumshirn, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi, kernel-janitors, linux-kernel


Colin,

> Pointer disc is being intializated a value that is never read and then
> re-assigned the same value later on, hence the initialization is redundant
> and can be removed.

Applied to 4.17/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: libfc: remove redundant initialization of 'disc'
@ 2018-02-07  1:26   ` Martin K. Petersen
  0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2018-02-07  1:26 UTC (permalink / raw)
  To: Colin King
  Cc: Johannes Thumshirn, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi, kernel-janitors, linux-kernel


Colin,

> Pointer disc is being intializated a value that is never read and then
> re-assigned the same value later on, hence the initialization is redundant
> and can be removed.

Applied to 4.17/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-07  1:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 14:21 [PATCH] scsi: libfc: remove redundant initialization of 'disc' Colin King
2018-02-06 14:21 ` Colin King
2018-02-06 14:39 ` Johannes Thumshirn
2018-02-06 14:39   ` Johannes Thumshirn
2018-02-07  1:26 ` Martin K. Petersen
2018-02-07  1:26   ` Martin K. Petersen

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.