Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2827414imu; Sun, 23 Dec 2018 08:40:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN7knhPZ1UleVIcV5Yn8dwShKz0MddGkeYx7iTGWvlbxAebg6EbBhEwtdU2E0uGDjmHNCXyd X-Received: by 2002:a17:902:4523:: with SMTP id m32mr10141935pld.53.1545583238904; Sun, 23 Dec 2018 08:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545583238; cv=none; d=google.com; s=arc-20160816; b=R1iLMR1LkMII/J4iE7wea7VeQVXpmv4GE6Xi0Ls8YwOmwqz9ZTjG21jPeam/9YNPfR YrTyD+NEezfeh0fInCk1IRYKIFm1K4dX/rUoUlF0LNdTW+vXX6NjB70bXa7aBB9EGZk3 ufw4dOMlAiRvOhBTANvOI4awyxGp3DGg9DcJg+2dtgSorVkP5/0Pxk9+EELZD12hUXkM 85p7HKLJV9Wo4wT7RXePz6DNBimcNH6fjiOjHaxhma9UEdaWnutmDtU4UgjKUClJ9uXf yP7t+d+iRO9/n/IxwXOM3uAVgW58kyDFfTzAejZskabucE08h51drfP2abeCBavmNdDU 29QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=NOY5CVcN50G/WVxZFkvzX5psijguLawikfwxSHkNvzk=; b=VnLnlLzuOaPJa9E3hOZ9fsg0x1nXxmDZSlbPWitSIjp68pKIwQ3A67phKB6S43ip3Y Fn5NRxpLL98O1/Ebtw+eTNW+SeE5RoomuyGS+hPeqbn8RkugGF2XHAmsMADxoSAxOMQZ 9jyxoLUqUFdXLHUvMxf16NAwvznG0FmwQ6ljDVVXaKHYdr+cOW7eDYq7dDOizr7pRN5w bqSkh5Fzcqanr4xjbam5zktyQlRUOM3gA9thG9VXBWzdugsjvv6ab/c/2OyAFv84xRYv c3/vE/uTEn0iXowWrdThnOEulokxZJdSbV7qOyCMO8mgcHMkJjeQztNaNL5ICLr76vus Vc/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x64si26426504pfb.120.2018.12.23.08.40.23; Sun, 23 Dec 2018 08:40:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727270AbeLWJeA (ORCPT + 99 others); Sun, 23 Dec 2018 04:34:00 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:44311 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727199AbeLWJd5 (ORCPT ); Sun, 23 Dec 2018 04:33:57 -0500 X-IronPort-AV: E=Sophos;i="5.56,386,1539640800"; d="scan'208";a="289991766" Received: from palace.lip6.fr ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 23 Dec 2018 10:33:53 +0100 From: Julia Lawall To: James Smart Cc: kernel-janitors@vger.kernel.org, Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/20] scsi: lpfc: lpfc_scsi: drop useless LIST_HEAD Date: Sun, 23 Dec 2018 09:56:59 +0100 Message-Id: <1545555435-24576-5-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1545555435-24576-1-git-send-email-Julia.Lawall@lip6.fr> References: <1545555435-24576-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop LIST_HEAD where the variable it declares is never used. These were introduced in 8a9d2e8003040 ("[SCSI] lpfc 8.3.31: Correct handling of SLI4-port XRI resource-provisioning profile change"), but were not even used at that time. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 8a9d2e8003040 ("[SCSI] lpfc 8.3.31: Correct handling of SLI4-port XRI resource-provisioning profile change") Signed-off-by: Julia Lawall --- Successfully 0-day tested on 151 configurations. drivers/scsi/lpfc/lpfc_scsi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b4f1a840b3b4..dd415d783593 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -805,9 +805,7 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport *vport, int num_to_alloc) dma_addr_t pdma_phys_bpl; uint16_t iotag, lxri = 0; int bcnt, num_posted, sgl_size; - LIST_HEAD(prep_sblist); LIST_HEAD(post_sblist); - LIST_HEAD(scsi_sblist); sgl_size = phba->cfg_sg_dma_buf_size - (sizeof(struct fcp_cmnd) + sizeof(struct fcp_rsp));