Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932331AbdHWQUV (ORCPT ); Wed, 23 Aug 2017 12:20:21 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:35012 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932187AbdHWQUT (ORCPT ); Wed, 23 Aug 2017 12:20:19 -0400 Subject: Re: [PATCH] scsi: lpfc: remove useless code in lpfc_sli4_bsg_link_diag_test To: "Gustavo A. R. Silva" , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170822205353.GA17794@embeddedgus> From: James Smart Message-ID: Date: Wed, 23 Aug 2017 09:20:15 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170822205353.GA17794@embeddedgus> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 645 Lines: 21 On 8/22/2017 1:53 PM, Gustavo A. R. Silva wrote: > Remove variable assignments. The value stored in local variable _rc_ is > overwritten at line 2448:rc = lpfc_sli4_bsg_set_link_diag_state(phba, 0); > before it can be used. > > Addresses-Coverity-ID: 1226935 > Signed-off-by: Gustavo A. R. Silva > --- > This issue was detected by Coverity and it was tested by compilation only. > Notice that this code has been there since 2011. > > drivers/scsi/lpfc/lpfc_bsg.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > looks good. Thanks Signed-off-by: James Smart -- james