scsi: libfc: remove redundant initialization of 'disc'
Subsystems (3)
PATCH 1/1 scsi: libfc: remove redundant initialization of 'disc'
From: Colin Ian King <[email protected]>
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 <[email protected]>
--- drivers/scsi/libfc/fc_disc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/libfc/fc_disc.c +1 -1
@@ -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;
Signature · 1 line
2.15.1
Looks good,
Signature · 10 lines
Johannes Thumshirn Storage [email protected] +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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Martin K. Petersen
AppliedColin,
Quoted 3 lines
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.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering