From patchwork Thu May 14 23:24:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasad Gondi X-Patchwork-Id: 6410461 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7B3A7C0432 for ; Thu, 14 May 2015 23:25:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8889620498 for ; Thu, 14 May 2015 23:25:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B8B720481 for ; Thu, 14 May 2015 23:25:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422985AbbENXYu (ORCPT ); Thu, 14 May 2015 19:24:50 -0400 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]:45754 "EHLO smtp-outbound-1.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422971AbbENXYt convert rfc822-to-8bit (ORCPT ); Thu, 14 May 2015 19:24:49 -0400 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 0728F29079; Thu, 14 May 2015 16:24:48 -0700 (PDT) Received: from EX13-CAS-011.vmware.com (EX13-CAS-011.vmware.com [10.113.191.63]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id EB94A40272; Thu, 14 May 2015 16:24:47 -0700 (PDT) Received: from EX13-MBX-026.vmware.com (10.113.191.46) by EX13-MBX-023.vmware.com (10.113.191.43) with Microsoft SMTP Server (TLS) id 15.0.913.22; Thu, 14 May 2015 16:24:35 -0700 Received: from EX13-MBX-026.vmware.com ([fe80::858b:7f42:fd7c:703d]) by EX13-MBX-026.vmware.com ([fe80::858b:7f42:fd7c:703d%17]) with mapi id 15.00.0913.011; Thu, 14 May 2015 16:24:29 -0700 From: Prasad Gondi To: Nicholas Mc Guire , Vasu Dev CC: "fcoe-devel@open-fcoe.org" , "James E.J. Bottomley" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" Subject: RE: [Open-FCoE] [PATCH] scsi: fix Wunused-but-set-variable buildwarning Thread-Topic: [Open-FCoE] [PATCH] scsi: fix Wunused-but-set-variable buildwarning Thread-Index: AQHQjnkZMtO081BMjUeToQ0DaD+reZ18GmQQ Date: Thu, 14 May 2015 23:24:28 +0000 Message-ID: <1488e7d0337944d98996c115cd0baefc@EX13-MBX-026.vmware.com> References: <1431627166-12729-1-git-send-email-hofrat@osadl.org> In-Reply-To: <1431627166-12729-1-git-send-email-hofrat@osadl.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.113.160.246] MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It seems like rpriv is used to set the fsp->tgt_flags originally > fsp->tgt_flags = rpriv->flags And fsp->tgt_flags are used in "fc_fcp_cmd_send" like this setup_timer(&fsp->timer, fc_fcp_timeout, (unsigned long)fsp); if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); Main purpose of this flags used is to set the correct TimeOut Value for fc_fcp_timer. So is the removal of the "fsp->tgt_flags = rpriv->flags" in fc_queuecommand() is intentional? Or by mistake? Once we clear that out we can see whether this change make sense? Thanks, Prasad Gondi -----Original Message----- From: fcoe-devel [mailto:fcoe-devel-bounces@open-fcoe.org] On Behalf Of Nicholas Mc Guire Sent: Thursday, May 14, 2015 11:13 AM To: Vasu Dev Cc: fcoe-devel@open-fcoe.org; James E.J. Bottomley; linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Nicholas Mc Guire Subject: [Open-FCoE] [PATCH] scsi: fix Wunused-but-set-variable buildwarning 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 --- drivers/scsi/libfc/fc_fcp.c | 3 --- 1 file changed, 3 deletions(-) -- 1.7.10.4 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);