From patchwork Wed Dec 26 23:33:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10743339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 483FF13AD for ; Wed, 26 Dec 2018 23:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36E382849B for ; Wed, 26 Dec 2018 23:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B5E428524; Wed, 26 Dec 2018 23:33:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05496284ED for ; Wed, 26 Dec 2018 23:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726956AbeLZXdw (ORCPT ); Wed, 26 Dec 2018 18:33:52 -0500 Received: from mail-yb1-f193.google.com ([209.85.219.193]:45150 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726859AbeLZXdw (ORCPT ); Wed, 26 Dec 2018 18:33:52 -0500 Received: by mail-yb1-f193.google.com with SMTP id r11so6810647ybp.12 for ; Wed, 26 Dec 2018 15:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B8d81wt3P+BQVucRRPKU8XoKkJVK6LoowGUHUrPHlEY=; b=MxCn7gfpe5LN9WVarUDaymReIkFYND69n4Cc3wyRj0zgtIgDmogAPaE01XeWCMgJ2H ZjkiswTWunG0rl6zIFVe8NQeeakG2FXVNFFvI5gT8Q+3KWIAUa7b57RjKQx1lhlSr9kd 1pytGkYzn6JUG+kVikhtqb7pinTL9JiesWdDh3zRm2jkNVdd7DLg33/nmSiHw6PJiu6+ YH4uSl05wQfI62CiWfFpHQRSPJVC43etel+n0RXMn93WpBfDElh5X0TVUNegPsctOVeL wIzEMXeV7cj6OwUXxrpEdo/Wcu38GLFMIwEz9QhLM8lrBDuIpNXEGi88euOfZ/4ywGhf sE+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B8d81wt3P+BQVucRRPKU8XoKkJVK6LoowGUHUrPHlEY=; b=If9oer1N3QJJom6Y2CaV4V7RBbNxuaawJ/AqXbx0iXUpwQCvCPwtR3JKr8DAd0L5Ln 5bFGrUeZwukuCy1bh4p8IfG1kBmxczcBi0kTS8QXcfY7bQ6k9c2Mi0Nx3srme8Dd1KsN kl3A41IIichRs0AWKLC0Rr+uiLuzFF1JLtDmVzUzsdtp5twI0ExTG0nU0fYfVy135ROb U9V8ItQNTQVumcy+JNv10a7PwDpnOCFu6nqgRCRhKQm1NOAOpv2MzfUt886x4KOmTEcl KWZb3bzgGd5UYXLl9NgKEv1YJYyv9w6fuJgeMjP9crO5TYTzGUuytHvdl9MX7Blzj+1z TQPg== X-Gm-Message-State: AJcUukcWPFtNr6koedAXXQS7V77qFxYefmMYJPUw+pS9UC32rJfnGdL4 r9SMIezKBCaXLxYS9vF+2hdb/n/U X-Google-Smtp-Source: ALg8bN5IM6fIHKcZ+YAzMs/JvzAn338MOgtssSAHalvcrBW9bZGO+DBYUG+RYoM0GJmOyqaAZAq4OA== X-Received: by 2002:a25:cc51:: with SMTP id l78mr9021542ybf.269.1545867231157; Wed, 26 Dec 2018 15:33:51 -0800 (PST) Received: from os42.localdomain ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id h145sm13616483ywc.72.2018.12.26.15.33.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Dec 2018 15:33:50 -0800 (PST) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Dick Kennedy Subject: [PATCH 02/25] lpfc: cleanup: Remove excess check on NVME io submit code path Date: Wed, 26 Dec 2018 15:33:11 -0800 Message-Id: <20181226233334.27518-3-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20181226233334.27518-1-jsmart2021@gmail.com> References: <20181226233334.27518-1-jsmart2021@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP lpfc_nvme_prep_io_cmd() checks for null pnode, but caller lpfc_nvme_fcp_io_submit() has already ensured it's non-null. remove the pnode null check Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index b59bf37af881..d3e955f70894 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -1190,7 +1190,7 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, union lpfc_wqe128 *wqe = &pwqeq->wqe; uint32_t req_len; - if (!pnode || !NLP_CHK_NODE_ACT(pnode)) + if (!NLP_CHK_NODE_ACT(pnode)) return -EINVAL; /*