Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3578514pxb; Sat, 13 Feb 2021 02:24:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/p0+g+DvTNiDc5+g0v1/rnn/mudWozinrRni7wVND28l1qS65DPlKF7WfjfCiTdCzrx1Q X-Received: by 2002:a17:906:4057:: with SMTP id y23mr7085941ejj.476.1613211886641; Sat, 13 Feb 2021 02:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613211886; cv=none; d=google.com; s=arc-20160816; b=d6gtgF+yqxCp5s0d9FwwQLM2Nfnuyi3umLswiQC8bTGD2w9PGoLCxVDLqzJWsTiS7k 50oAjXgEp2Lfah+vV1RzktXDnvj7E/3GQT7jlw5IgpYcqUGIFY86I6O61FIb4LBwPvnJ RnLyx7xu5dIJar+GMKqJVZLrw23V9J5HYVWHLIBhlago8kOwp48Vi37VRfqSCMqrdMXw /2Qz9utfuVVKH923KOGwESxOxczdMe4808bPqAgCGxBPyydPlH4nDZUuRw2zx0Tsw64R KE5H7M9nd6OL57ffdM0ddck4+mnxO4zpoyuDyQuMB1CNCBS+ffhFucHUr1coVGFRe2m3 NZZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=s9HZqsuYAuKyTpAE4TiNcjerGBTottD5RLWk38Pg0Og=; b=pvhP0cGjeS0i/MJCFS91D+rmyWCSVtVcCjoaIB25Zg90/z1I/YIWmVV2v5rF4kVSo5 xi5C9WBJ3E6XwtZVFBgCGJn4jUX24By2268KnxaXkfdfB1haZsfEHXsUUGhOWHUOf2K4 NvshX7juqrxSY72WeXquza7xghPd9zhjgEMqcRVZqxCHlVv4w7oLoYtP1HAue9D0T8JX 5Mx9MqXGMybdvfqYsKtr/NNkbFfWHKjEmTC9ruLqrWbUS0AQxPhqRttfkPUXCa6bekER sfv1zhssJrTpKJlA1cJHbGZ6nR+7rNxa5kp3UagvBhcgxAZiAIgm+Q/LJiLOpBAGQTAW TjAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z102si7882795ede.224.2021.02.13.02.24.23; Sat, 13 Feb 2021 02:24:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbhBMKVV (ORCPT + 99 others); Sat, 13 Feb 2021 05:21:21 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:43958 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhBMKUi (ORCPT ); Sat, 13 Feb 2021 05:20:38 -0500 X-IronPort-AV: E=Sophos;i="5.81,175,1610406000"; d="scan'208";a="372960479" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Feb 2021 11:19:14 +0100 From: Julia Lawall To: Liam Girdwood Cc: kernel-janitors@vger.kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] ASoC: sun4i-i2s: drop unneeded snd_soc_dai_set_drvdata Date: Sat, 13 Feb 2021 11:19:06 +0100 Message-Id: <20210213101907.1318496-4-Julia.Lawall@inria.fr> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210213101907.1318496-1-Julia.Lawall@inria.fr> References: <20210213101907.1318496-1-Julia.Lawall@inria.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // Signed-off-by: Julia Lawall --- sound/soc/sunxi/sun4i-i2s.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 78506c3811dc..c57feae3396e 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1079,8 +1079,6 @@ static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai) &i2s->playback_dma_data, &i2s->capture_dma_data); - snd_soc_dai_set_drvdata(dai, i2s); - return 0; }