Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp754376pxb; Thu, 19 Nov 2020 13:00:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJziF8hT3KF5BcyzS/NbENvSket6r5sxLHbTiiKGBOEFm7HPhl5mxTw7zHX+x1qeOoLs2u+3 X-Received: by 2002:aa7:cc0e:: with SMTP id q14mr31449261edt.326.1605819647863; Thu, 19 Nov 2020 13:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605819647; cv=none; d=google.com; s=arc-20160816; b=mTspbzmXgwdHeYCbmFQj8t9z7h8StQpdK7R5r6/fL411msGan319nwSOXMp/D1eBiU KDKGoTDjjNRhDADI0MEewRMleuLdWYR7vp9ITIVRwZXG2Deib2wN6GRtd3yFH9A4u6La 4AVrb0+UvxhGK7SLLAU2DuZmw2wykBmJ65oOKNbW//qdvLWhXng35CL/3d9ehMS2H/uI wnH5wQ62yFFF+aepdx1FvpxQjePiAQZJAICa4Bv6Xp1gd8/aMfBo5IhYJc6PCOJc0ezB QJlnjQ+dNNYXwJvMZdOsXhsL23RooJVdxU3mfjQaYZzxrCEYgsoR91/nqiaM1sJQd7tu HoJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=X40HjnXY47P3OK3ZWP5IXsX2/VKfnBdOHIQDZE15XlA=; b=O7E0Di/ZdGaBO+syHAUNE1SdXJKjsWr5FYRDjygCkFx/cYPwd8uR7cuTCbkrvMXzPq mQkHvZFJVa+doTN/Cpowi+Uj12YI3JnaW5cTFJltk7XPqm2oMhfYOdYvWRllHZExavLF loAdcXfIkiC4z0CMin1xOxzDpAqghRSwP/Q7/rtL3n0fXD9ULS2P8tAXC6fJxasJVvR5 AkZm0e+yJkj3XLu7MNX8+Iq5Hs6UfYhQZI4sM/GhfN8nMAZs7BIh5MM7anR59Xmksi4g HCoECEo3HXDyQbAs8RVCQqEbydoWJurEl9ZNG+PAj9ip0Ve7P+Rghz5skapUPcefRNAa VFIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=JWkEzZ08; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si472444ejz.76.2020.11.19.13.00.24; Thu, 19 Nov 2020 13:00:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=JWkEzZ08; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbgKSU55 (ORCPT + 99 others); Thu, 19 Nov 2020 15:57:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbgKSU55 (ORCPT ); Thu, 19 Nov 2020 15:57:57 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F1C6C0613CF for ; Thu, 19 Nov 2020 12:57:57 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id 81so5358044pgf.0 for ; Thu, 19 Nov 2020 12:57:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=X40HjnXY47P3OK3ZWP5IXsX2/VKfnBdOHIQDZE15XlA=; b=JWkEzZ08sqi4Os3lLAVuhhQtU2YXysnLa7hwtZtaboYqEheVjCYKjuiZQZU93rNajb MCYw2shuL72gZ6+4giQk2qg0LTcEd+jdfDS8htyihzHVOXHWiqASvJc8CCJM+0wieo3N rbrRlMlmDYhr5RmsFKI/psOVVqWg02/da3fRs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=X40HjnXY47P3OK3ZWP5IXsX2/VKfnBdOHIQDZE15XlA=; b=bneQavPv90otDfN66aAtc593XvqT/8w+yRBZ0IAV8JEd4Vz5NCDOURnT6nIyyrZDP+ JFlRBAN+LUxXvZM2loqbE15ji5ybNqS8ACmBUiAyd+2H/oD3Ncarmbat1D3DljlZuqri LdN4Eill3Gt55O1LXIny3YhY1VbzBt4fwOyhmdlfmxDFdAIUjvTB9IF4CDvJMfU5RcrN gUvsf14vIrKkO5GaFalmDi5PIj+acsmh+lQY72GJ+hjDPmPKSwa/TG7BG9/lUcZnP6v1 ddgYC4dtap0jIBv5SVrI+R1z9XHJ8oOwyQy5AwOBZe8QZRLf6j5E7O9K+T6yYIBkvF7e uStg== X-Gm-Message-State: AOAM533UR/xLnOtM1/Qt1MkeSC8SYEqCanYlGTToePpb8W+D9mo2ukvK 6fLf2preH2VgooBuy/aRLwJIDZwMSCHEU59aC1Zj9A6RTux6mhHrguySLp/YGK5k5hRPZy8e22d 48KCTfZhc7yp+LAd5xOzgq6I34jO7J0BMY17lrwAJz06cWTU5wlC/Z9LI8H09gCFKAmxtlNtpvW VFhKoraA== X-Received: by 2002:a63:b05:: with SMTP id 5mr14044421pgl.267.1605819475934; Thu, 19 Nov 2020 12:57:55 -0800 (PST) Received: from [10.69.69.102] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id q12sm625798pjl.41.2020.11.19.12.57.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2020 12:57:55 -0800 (PST) Subject: Re: [PATCH][next] scsi: lpfc: remove dead code on second !ndlp check To: Colin King , Dick Kennedy , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201118133744.461385-1-colin.king@canonical.com> From: James Smart Message-ID: <1f69784f-989d-a4b2-8d6f-c336916c5731@broadcom.com> Date: Thu, 19 Nov 2020 12:57:52 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20201118133744.461385-1-colin.king@canonical.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000078492505b47bfbda" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000078492505b47bfbda Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 11/18/2020 5:37 AM, Colin King wrote: > From: Colin Ian King > > Currently there is a null check on the pointer ndlp that exits via > error path issue_ct_rsp_exit followed by another null check on the > same pointer that is almost identical to the previous null check > stanza and yet can never can be reached because the previous check > exited via issue_ct_rsp_exit. This is deadcode and can be removed. > > Addresses-Coverity: ("Logically dead code") > Signed-off-by: Colin Ian King > --- > drivers/scsi/lpfc/lpfc_bsg.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c > index 35f4998504c1..41e3657c2d8d 100644 > --- a/drivers/scsi/lpfc/lpfc_bsg.c > +++ b/drivers/scsi/lpfc/lpfc_bsg.c > @@ -1526,12 +1526,6 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct bsg_job *job, uint32_t tag, > goto issue_ct_rsp_exit; > } > > - /* Check if the ndlp is active */ > - if (!ndlp) { > - rc = IOCB_ERROR; > - goto issue_ct_rsp_exit; > - } > - > /* get a refernece count so the ndlp doesn't go away while > * we respond > */ Looks good. Reviewed-by: James Smart -- james --00000000000078492505b47bfbda Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQPwYJKoZIhvcNAQcCoIIQMDCCECwCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2UMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAHsYqMNVL+Ly6RDkaKar7GD8rVtb9nw6tzPFnvXGeOEA4X5xh9wjx9sScVpGR5wkTg1 fgJIXTlrGESmaqXIdPRd9YQ+Yx9xRIIIPu3Jp/bpbiZBKYDJSbr/2Xago7sb9nnfSyjTSnucUcIP ZVChn6hKneVGBI2DT9yyyD3PmCEJmEzA8Y96qT83JmVH2GaPSSbCw0C+Zj1s/zqtKUbwE5zh8uuZ p4vC019QbaIOb8cGlzgvTqGORwK0gwDYpOO6QQdg5d03WvIHwTunnJdoLrfvqUg2vOlpqJmqR+nH 9lHS+bEstsVJtZieU1Pa+3LzfA/4cT7X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