Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2828406imu; Sun, 23 Dec 2018 08:42:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN6XTIfuxrlQ4v9xl9iX/N7kCYP2WttXp6ZFfWrJqemQFNPb7cRkfX1P4Spi33zWWY9VlbUz X-Received: by 2002:a65:6542:: with SMTP id a2mr9563960pgw.389.1545583331500; Sun, 23 Dec 2018 08:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545583331; cv=none; d=google.com; s=arc-20160816; b=OXAHk3WnJ6wDlHNY7mRm26LaIPxXIOGG6pkprDqDS1WACSX5wyX9s5uRNnoNMF9qCg zo8PFrCkUh5dClIppCnPcKr1MJKCN8h2EOzoSXlPGkOxro7QS80zK4e3wACEmZbjYmYK ceQsCkfnOCTuKAeprOoei8TD9Y+P8IqPLk7E6t3CuEOy31ybjKTFSGr9FTWOkjhu9rE0 SK9aeD+jX/ibnSCQWe6paFbrLO9ubq4poplEIwakiQw8DqHt1t7saLoU7Sr1sXeckDRm iR/Y6b/0QGcPki48aOl8iDNwtz1NlfGFzMW89PJ59IULCerQcoyDAIsL2HoUE1THCT8h xvJw== 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=GdEpE/eEXDDb22m2TT3h4LOan56Vb9UjypcdUa9npIM=; b=Q0N67sz+6c2XC7MRNseH9fr4GTjfv8Uoq2EyKx71my7lNGv3hyXuiBs8LyvoFA45kN ekxbxIKJxx+cTxQb51tnX2sn0V8/VBDuX1LBdkmPFDODs3rdO+RXT/ohhp8cmzGPiI25 ATnfo8QD0DYYDePHCu/G3IId+I2HZKEVLEnIk8QsR0enF6c9F87ai4QBB3PvFi3xS13V 2X9i5L4uL2AxNOnlTDqzEMYVfZp6Ppm+UnGeeAvxBoZY1/qDO56J88u/p3prabUHmNSC qyYXwQWZ1sK+qxOO7oIlJ2dXS0Y/IjDxhhRnEw3RjIR0rgJd0ES2vHB5cSSvXKVqqj9I bS/A== 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 e2si24578133pgs.94.2018.12.23.08.41.56; Sun, 23 Dec 2018 08:42:11 -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 S1727658AbeLWJfb (ORCPT + 99 others); Sun, 23 Dec 2018 04:35:31 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:44293 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727249AbeLWJeA (ORCPT ); Sun, 23 Dec 2018 04:34:00 -0500 X-IronPort-AV: E=Sophos;i="5.56,386,1539640800"; d="scan'208";a="289991771" 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: Ludovic Desroches Cc: kernel-janitors@vger.kernel.org, Vinod Koul , Dan Williams , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/20] dmaengine: at_hdmac: drop useless LIST_HEAD Date: Sun, 23 Dec 2018 09:57:02 +0100 Message-Id: <1545555435-24576-8-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. tmp_list has been declared since the introduction of the driver and has never been used. The two declarations of list were introduced with the containing functions but were also not used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: dc78baa2b90b ("dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller") Fixes: 4facfe7f09f2b ("dmaengine: hdmac: Split device_control") Signed-off-by: Julia Lawall --- Successfully 0-day tested on 151 configurations. drivers/dma/at_hdmac.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 01d936c9fe89..a0a9cd76c1d4 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -134,7 +134,6 @@ static struct at_desc *atc_desc_get(struct at_dma_chan *atchan) struct at_desc *ret = NULL; unsigned long flags; unsigned int i = 0; - LIST_HEAD(tmp_list); spin_lock_irqsave(&atchan->lock, flags); list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) { @@ -1387,8 +1386,6 @@ static int atc_pause(struct dma_chan *chan) int chan_id = atchan->chan_common.chan_id; unsigned long flags; - LIST_HEAD(list); - dev_vdbg(chan2dev(chan), "%s\n", __func__); spin_lock_irqsave(&atchan->lock, flags); @@ -1408,8 +1405,6 @@ static int atc_resume(struct dma_chan *chan) int chan_id = atchan->chan_common.chan_id; unsigned long flags; - LIST_HEAD(list); - dev_vdbg(chan2dev(chan), "%s\n", __func__); if (!atc_chan_is_paused(atchan))