public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: fix Wunused-but-set-variable buildwarning
@ 2015-05-14 18:12 Nicholas Mc Guire
       [not found] ` <1431627166-12729-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
  2015-05-14 23:24 ` [Open-FCoE] " Prasad Gondi
  0 siblings, 2 replies; 6+ messages in thread
From: Nicholas Mc Guire @ 2015-05-14 18:12 UTC (permalink / raw)
  To: Vasu Dev
  Cc: James E.J. Bottomley, fcoe-devel, linux-scsi, linux-kernel,
	Nicholas Mc Guire

commit "[SCSI] libfc: remove tgt_flags from fc_fcp_pkt struct"
removed the last usage of rpriv (rpriv->flags) but forgot to remove
the unused rpriv struct resulting in:
  drivers/scsi/libfc/fc_fcp.c: In function 'fc_queuecommand':
  drivers/scsi/libfc/fc_fcp.c:1795:30: warning: variable 'rpriv' set 
  but not used [-Wunused-but-set-variable]
so simply drop its declaration and setting.

Patch was compile tested with x86_64_defconfig + SCSI_LOWLEVEL=y,
CONFIG_SCSI_FC_ATTRS=m, CONFIG_LIBFC=m

Patch is against 4.1-rc3 (localversion-next is -next-20150514)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

 drivers/scsi/libfc/fc_fcp.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index c438b81..fee6928 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1792,7 +1792,6 @@ int fc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc_cmd)
 	struct fc_lport *lport = shost_priv(shost);
 	struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
 	struct fc_fcp_pkt *fsp;
-	struct fc_rport_libfc_priv *rpriv;
 	int rval;
 	int rc = 0;
 	struct fc_stats *stats;
@@ -1814,8 +1813,6 @@ int fc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc_cmd)
 		goto out;
 	}
 
-	rpriv = rport->dd_data;
-
 	if (!fc_fcp_lport_queue_ready(lport)) {
 		if (lport->qfull)
 			fc_fcp_can_queue_ramp_down(lport);
-- 
1.7.10.4

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

end of thread, other threads:[~2015-05-15 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14 18:12 [PATCH] scsi: fix Wunused-but-set-variable buildwarning Nicholas Mc Guire
     [not found] ` <1431627166-12729-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
2015-05-14 22:39   ` vasu.dev-VuQAYsv1563Yd54FQh9/CA
2015-05-14 23:24 ` [Open-FCoE] " Prasad Gondi
2015-05-15  7:14   ` Nicholas Mc Guire
2015-05-15 17:09     ` vasu.dev
2015-05-15 17:12       ` Prasad Gondi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox