From mboxrd@z Thu Jan 1 00:00:00 1970 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=-20.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 09671C11F66 for ; Tue, 29 Jun 2021 13:29:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE6E161DC2 for ; Tue, 29 Jun 2021 13:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234068AbhF2NcS (ORCPT ); Tue, 29 Jun 2021 09:32:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:55804 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233665AbhF2NcM (ORCPT ); Tue, 29 Jun 2021 09:32:12 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10029"; a="205137198" X-IronPort-AV: E=Sophos;i="5.83,308,1616482800"; d="scan'208";a="205137198" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2021 06:29:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,308,1616482800"; d="scan'208";a="557939978" Received: from lkp-server01.sh.intel.com (HELO 4aae0cb4f5b5) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 29 Jun 2021 06:29:35 -0700 Received: from kbuild by 4aae0cb4f5b5 with local (Exim 4.92) (envelope-from ) id 1lyDnz-00099q-5b; Tue, 29 Jun 2021 13:29:35 +0000 Date: Tue, 29 Jun 2021 21:29:09 +0800 From: kernel test robot To: Srinivas Kandagatla Cc: kbuild-all@lists.01.org, Linux Memory Management List , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: codecs: wcd938x: fix returnvar.cocci warnings Message-ID: <20210629132909.GA7935@233d919f385f> References: <202106292156.mWNAaVQA-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106292156.mWNAaVQA-lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kernel test robot sound/soc/codecs/wcd938x.c:1628:5-8: Unneeded variable: "ret". Return "0" on line 1656 sound/soc/codecs/wcd938x.c:1871:5-8: Unneeded variable: "ret". Return "0" on line 1907 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig") CC: Srinivas Kandagatla Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 73748627df83aab934c81332ca83a44ab8c7b3e3 commit: 04544222886881cb0865040dcdf747fe7e025947 [8525/14055] ASoC: codecs: wcd938x: add audio routing and Kconfig :::::: branch date: 4 hours ago :::::: commit date: 2 weeks ago wcd938x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -1625,7 +1625,6 @@ static int wcd938x_codec_aux_dac_event(s { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); - int ret = 0; switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -1653,7 +1652,7 @@ static int wcd938x_codec_aux_dac_event(s WCD938X_ANA_RX_DIV4_CLK_EN_MASK, 0); break; } - return ret; + return 0; } @@ -1868,7 +1867,6 @@ static int wcd938x_codec_enable_aux_pa(s struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); int hph_mode = wcd938x->hph_mode; - int ret = 0; switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -1904,7 +1902,7 @@ static int wcd938x_codec_enable_aux_pa(s WCD938X_EN_CUR_DET_MASK, 1); break; } - return ret; + return 0; } static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,