Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbdCDRmj (ORCPT ); Sat, 4 Mar 2017 12:42:39 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37447 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbdCDRmh (ORCPT ); Sat, 4 Mar 2017 12:42:37 -0500 Subject: Re: [PATCH] scsi: lpfc: remove redundant assignment of sgel To: Colin King , Dick Kennedy , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org References: <20170224134523.5385-1-colin.king@canonical.com> Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org From: James Smart Message-ID: <7eb92880-0cd8-3260-a890-8ef970ef2568@broadcom.com> Date: Sat, 4 Mar 2017 09:42:31 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170224134523.5385-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 958 Lines: 31 Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:45 AM, Colin King wrote: > From: Colin Ian King > > In the NVMET_FCOP_RSP case, sgel is assigned but never used and > hence is redundant and can be removed. > > Detected by CoverityScan, CID#1411658 ("Unused value") > > Signed-off-by: Colin Ian King > --- > drivers/scsi/lpfc/lpfc_nvmet.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c > index c421e17..e59a0a8 100644 > --- a/drivers/scsi/lpfc/lpfc_nvmet.c > +++ b/drivers/scsi/lpfc/lpfc_nvmet.c > @@ -1445,7 +1445,6 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, > > case NVMET_FCOP_RSP: > /* Words 0 - 2 */ > - sgel = &rsp->sg[0]; > physaddr = rsp->rspdma; > wqe->fcp_trsp.bde.tus.f.bdeFlags = BUFF_TYPE_BDE_64; > wqe->fcp_trsp.bde.tus.f.bdeSize = rsp->rsplen;