From patchwork Sun Dec 23 08:56:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10741647 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 4C0651399 for ; Sun, 23 Dec 2018 09:35:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3929728A81 for ; Sun, 23 Dec 2018 09:35:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29E0A28AE0; Sun, 23 Dec 2018 09:35: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=-7.9 required=2.0 tests=BAYES_00,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 C4DA528A81 for ; Sun, 23 Dec 2018 09:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727243AbeLWJd6 (ORCPT ); Sun, 23 Dec 2018 04:33:58 -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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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));