Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3431473imu; Mon, 24 Dec 2018 01:38:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN47o/NhEt1s3d5M3M5xdGsqPzGYgWQ/HrkGDnkMTJd4V7w+PAHi7okjvl3JIDPgV9mjwigg X-Received: by 2002:a17:902:8d95:: with SMTP id v21mr12378922plo.162.1545644307973; Mon, 24 Dec 2018 01:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545644307; cv=none; d=google.com; s=arc-20160816; b=O5zuOxqFaPtbMcvisrJgc5X4pfVYc7iBdPxbre9g74z4C8PMPFqYxazra12To0RF0s cx57c39ZWLM1Km3A0zQYYcFOBuWyWtDHPzXmExy2DBrO+sqQCwYWrFWc0L54FdCA87RP jVprFhZqZKORplZsm/UnIk7RXWEPz88SOUqK0m369aBC0gQp3I3CR/aYiVQUTxJU58mt EMM66KAoQ7u147vOeGmQjFELhy2Pgeba7Iht1eSse0j9U3c9TkT4ZJk7mvWG+GObNtzF acGQTzhLJTaF1XIIH6/jxR5wPMjJ+lRYiHibBxIFb4I8pJ5xIAZD2PkzfieVWyjawEB+ j0uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=sCEFS1iPIVNXMOKrEybHFxaP+jZkKurDWG8VC2LonFQ=; b=AHwrzsG6WjQ5uHpvRw290L/5WXdUPCG0urJAbTTb2XDwV1xJO+U8PysbIqQA2sgk3g qPLsRslV9jOGvWIbi3aNXlDYAi3UIyZ1UOPxW+7s/ChYbcKhjuckKAZbmTrvsRsoWS1q jIIVOE098AGAF8A+DFGWzXql9LVwfQF7bmHm2TC9gmeysc/ll9+3uVjS6gFOPs1QiJVA yj+vZjjxkkMPAo9kP5nHTAOvH9E0ZM4+U92fqErxwD1a5SHq+IjHXNuqbxI4akWGgKdJ nigrpbPatujY5X/X6J22kAdbRPVeDn7eAomh/ap+q+QM/B5K9sr896fFuhXmxhJVOh+Y U+nw== 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 bg7si6108883plb.149.2018.12.24.01.38.13; Mon, 24 Dec 2018 01:38:27 -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 S1725882AbeLXJgB (ORCPT + 99 others); Mon, 24 Dec 2018 04:36:01 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:36198 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725294AbeLXJgB (ORCPT ); Mon, 24 Dec 2018 04:36:01 -0500 X-IronPort-AV: E=Sophos;i="5.56,391,1539673200"; d="scan'208";a="21870182" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 24 Dec 2018 02:36:00 -0700 Received: from localhost (10.10.76.4) by CHN-SV-EXCH01.mchp-main.com (10.10.76.37) with Microsoft SMTP Server id 14.3.352.0; Mon, 24 Dec 2018 02:36:20 -0700 Date: Mon, 24 Dec 2018 10:36:00 +0100 From: Ludovic Desroches To: Julia Lawall CC: , Vinod Koul , "Dan Williams" , , , Subject: Re: [PATCH 07/20] dmaengine: at_hdmac: drop useless LIST_HEAD Message-ID: <20181224093600.elloyxqa6lx7rw33@M43218.corp.atmel.com> Mail-Followup-To: Julia Lawall , kernel-janitors@vger.kernel.org, Vinod Koul , Dan Williams , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org References: <1545555435-24576-1-git-send-email-Julia.Lawall@lip6.fr> <1545555435-24576-8-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1545555435-24576-8-git-send-email-Julia.Lawall@lip6.fr> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 23, 2018 at 09:57:02AM +0100, Julia Lawall wrote: > 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 Acked-by: Ludovic Desroches Thanks > > --- > 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)) >