From patchwork Sat Feb 13 10:19:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12086633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8663CC433DB for ; Sat, 13 Feb 2021 10:20:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04E6864DB1 for ; Sat, 13 Feb 2021 10:20:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04E6864DB1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oa6q5aaGMvXuimt/IibJem7r6PSPouAzAtdVvv30FMA=; b=QnDmBw5Zk5nVfM/gqojH6B729 gl/BUJH7yHXPPkOf68A9oYnlgJSSPRbuO4M3oVYRWLv6um6qVufjnUlTfi2Ny+RQfUSWLpotF2opI /aYmz0fmrWyCozhNwPV5VrEdJc0eJSWG/75/SO+NmF3zhwPToxQTiWTOHueQ+IOTcvElDq3XsTpyz 91f4lrNuznuOIHwxQZeNoDP14Q5okImv6sfaHWurTLEgSTpJkRZZmlo1Zi8ZoHwM71hwXwOFW+Zk0 HThiHmnaBGb/lfnWutWJ+nLTcfd1u7lP1o+Xb7S8dqYEizqs2iNaVearTcyGlstT/jjTnQnkew1IA U8Nv1OTSQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAs1L-0001rW-O0; Sat, 13 Feb 2021 10:19:23 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAs1G-0001qS-RW for linux-arm-kernel@lists.infradead.org; Sat, 13 Feb 2021 10:19:20 +0000 X-IronPort-AV: E=Sophos;i="5.81,175,1610406000"; d="scan'208";a="372960477" 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: Daniel Mack Subject: [PATCH 1/4] ASoC: mmp-sspa: drop unneeded snd_soc_dai_set_drvdata Date: Sat, 13 Feb 2021 11:19:04 +0100 Message-Id: <20210213101907.1318496-2-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210213_051919_098994_18F5A9DC X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , kernel-janitors@vger.kernel.org, Liam Girdwood , Haojian Zhuang , Jaroslav Kysela , Mark Brown , Robert Jarzmik , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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/pxa/mmp-sspa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c index 4803972ee655..7e39210a0b38 100644 --- a/sound/soc/pxa/mmp-sspa.c +++ b/sound/soc/pxa/mmp-sspa.c @@ -330,7 +330,6 @@ static int mmp_sspa_probe(struct snd_soc_dai *dai) &sspa->playback_dma_data, &sspa->capture_dma_data); - snd_soc_dai_set_drvdata(dai, sspa); return 0; } From patchwork Sat Feb 13 10:19:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12086637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65F3BC433E6 for ; Sat, 13 Feb 2021 10:20:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04B2264E4C for ; Sat, 13 Feb 2021 10:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04B2264E4C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=F+4+vrzOc5xs8rGTGQf5Xem3dIvq87iVrq/6E+t6liA=; b=mMdPn12jaHJrODSB2oq3IF22F pXA3yEedyIGVWpHZHpprTPA8Udn7EeLK3rjDw34iIEBKTY1qO24rRgIsopn6vHFnmwiVI72uMCGtj oiRmUmNUhMbue+g2Th5jNCL/E66T+qC8FgpPUphuxyxm5+Tlk/mERKA5QChWEyjGpz7a3EfbBJbT/ ycIp7YgEm21E4LlSHYRsy6arot6HAjGqiAjoCkok3oXlEDLi++7wDvyPnxmOsqCHLvVIq7sojPl4w jy/WupnRw2ggXVOFjPL7SD398uUywEeV6Ko2tTR0Csy9NTACuoMUCHwtnQbuJcTyc0fUB5muZP6Gr lnajBriFA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAs1Q-0001sR-0w; Sat, 13 Feb 2021 10:19:28 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAs1J-0001r1-Va for linux-arm-kernel@lists.infradead.org; Sat, 13 Feb 2021 10:19:23 +0000 X-IronPort-AV: E=Sophos;i="5.81,175,1610406000"; d="scan'208";a="372960478" 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 Subject: [PATCH 2/4] ASoC: mxs-saif: drop unneeded snd_soc_dai_set_drvdata Date: Sat, 13 Feb 2021 11:19:05 +0100 Message-Id: <20210213101907.1318496-3-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210213_051922_260573_E53B605C X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Fabio Estevam , Sascha Hauer , kernel-janitors@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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); // In this case, the whole probe function then does nothing, so drop it. Signed-off-by: Julia Lawall --- sound/soc/mxs/mxs-saif.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 07f8cf9980e3..6a2d24d48964 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -642,18 +642,8 @@ static const struct snd_soc_dai_ops mxs_saif_dai_ops = { .set_fmt = mxs_saif_set_dai_fmt, }; -static int mxs_saif_dai_probe(struct snd_soc_dai *dai) -{ - struct mxs_saif *saif = dev_get_drvdata(dai->dev); - - snd_soc_dai_set_drvdata(dai, saif); - - return 0; -} - static struct snd_soc_dai_driver mxs_saif_dai = { .name = "mxs-saif", - .probe = mxs_saif_dai_probe, .playback = { .channels_min = 2, .channels_max = 2, From patchwork Sat Feb 13 10:19:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12086635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B7EC433E0 for ; Sat, 13 Feb 2021 10:20:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6810864DB1 for ; Sat, 13 Feb 2021 10:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6810864DB1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=91QRIieHbmloNbuh1OmcoqTOTQ7X+A8kpeEoZMahKf4=; b=OIkFzSNRJvPOpgfDYbSLWp5lC o8SaitvjADHii08LWCoE9O0SSOeo6hDAInVmhH+pasD9qHYXp41T8cpOGj20LDL2tC+WpFyIEpl39 x+ODAZaQ11FxwAQq1yVjBuMQEyqzwT1mvALbNblDLCLrxMEq4g57B56y0GCADZNiIQ4Nwo8jTScDH xziLdIIkmkKDEg10/GbuGxEhEmOkexP5fWHqXHroN8EL18afeos67GAKOBC5evgS9sV9TXTvNxez5 CwfuO5kpWEoewe0eXdbdUzyZOtzc0zg0J0A8m3qfuryD8XA0RKdHxoblFiXrwsqy/eSsO2qveJNHd BJipJYHXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAs1R-0001sd-Hy; Sat, 13 Feb 2021 10:19:29 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAs1L-0001qS-K6 for linux-arm-kernel@lists.infradead.org; Sat, 13 Feb 2021 10:19:24 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210213_051923_903132_C10134C7 X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Takashi Iwai , Maxime Ripard , Jaroslav Kysela , Chen-Yu Tsai , Mark Brown , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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; }