Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934794AbbEORJi (ORCPT ); Fri, 15 May 2015 13:09:38 -0400 Received: from mga14.intel.com ([192.55.52.115]:56666 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934091AbbEORJf (ORCPT ); Fri, 15 May 2015 13:09:35 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,435,1427785200"; d="scan'208";a="571982228" Subject: Re: [Open-FCoE] [PATCH] scsi: fix Wunused-but-set-variable buildwarning From: "vasu.dev@linux.intel.com" To: Nicholas Mc Guire Cc: Prasad Gondi , "linux-scsi@vger.kernel.org" , "James E.J. Bottomley" , "linux-kernel@vger.kernel.org" , Nicholas Mc Guire , "fcoe-devel@open-fcoe.org" In-Reply-To: <20150515071415.GC24293@opentech.at> References: <1431627166-12729-1-git-send-email-hofrat@osadl.org> <1488e7d0337944d98996c115cd0baefc@EX13-MBX-026.vmware.com> <20150515071415.GC24293@opentech.at> Content-Type: text/plain; charset="UTF-8" Date: Fri, 15 May 2015 10:09:33 -0700 Message-ID: <1431709773.4358.14.camel@lin-nd1-054.jf.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 39 On Fri, 2015-05-15 at 09:14 +0200, Nicholas Mc Guire wrote: > On Thu, 14 May 2015, Prasad Gondi wrote: > > > 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? > > > thats something I can't say - but the commit message indicated that the > removal of tgt_flags was intentional. > It was intentional and good cleanup since now rpriv->flags is used directly with that change instead of storing in fsp->tgt_flags as it was before. > > Once we clear that out we can see whether this change make sense? > > Anycase the patch under discussion is straight forward clean up patch since it just removes a local stack variable which is not used. Thanks, Vasu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/