All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sandor Yu <Sandor.yu@nxp.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Robert Foss <robert.foss@linaro.org>,
	Shengjiu Wang <shengjiu.wang@nxp.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm: bridge: dw_hdmi: Audio: fix returnvar.cocci warnings
Date: Thu, 21 Apr 2022 23:09:46 +0800	[thread overview]
Message-ID: <YmFzutFV/iDyEQF2@dd18de969aa6> (raw)
In-Reply-To: <202204212311.TnfpcTGm-lkp@intel.com>

From: kernel test robot <lkp@intel.com>

drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:80:5-8: Unneeded variable: "ret". Return "0" on line 94
drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:105:5-8: Unneeded variable: "ret". Return "0" on line 112


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Sandor Yu <Sandor.yu@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
commit: d970ce303ff80ae57bbd3e784f2772dbf3056e0c [4441/5346] drm: bridge: dw_hdmi: Audio: Add General Parallel Audio (GPA) driver
:::::: branch date: 8 hours ago
:::::: commit date: 2 days ago

 drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c
@@ -77,7 +77,6 @@ static int audio_hw_params(struct device
 			   struct hdmi_codec_params *params)
 {
 	struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
-	int ret = 0;
 	u8 ca;
 
 	dw_hdmi_set_sample_rate(dw->data.hdmi, params->sample_rate);
@@ -91,7 +90,7 @@ static int audio_hw_params(struct device
 				   params->iec.status[0] & IEC958_AES0_NONAUDIO);
 	dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width);
 
-	return ret;
+	return 0;
 }
 
 static void audio_shutdown(struct device *dev, void *data)
@@ -102,14 +101,13 @@ static int audio_mute_stream(struct devi
 			     bool enable, int direction)
 {
 	struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
-	int ret = 0;
 
 	if (!enable)
 		dw_hdmi_audio_enable(dw->data.hdmi);
 	else
 		dw_hdmi_audio_disable(dw->data.hdmi);
 
-	return ret;
+	return 0;
 }
 
 static int audio_get_eld(struct device *dev, void *data,

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Sandor Yu <Sandor.yu@nxp.com>
Cc: dri-devel@lists.freedesktop.org,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	kbuild-all@lists.01.org, Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>,
	Shengjiu Wang <shengjiu.wang@nxp.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	linux-kernel@vger.kernel.org,
	Robert Foss <robert.foss@linaro.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>
Subject: [PATCH] drm: bridge: dw_hdmi: Audio: fix returnvar.cocci warnings
Date: Thu, 21 Apr 2022 23:09:46 +0800	[thread overview]
Message-ID: <YmFzutFV/iDyEQF2@dd18de969aa6> (raw)
In-Reply-To: <202204212311.TnfpcTGm-lkp@intel.com>

From: kernel test robot <lkp@intel.com>

drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:80:5-8: Unneeded variable: "ret". Return "0" on line 94
drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:105:5-8: Unneeded variable: "ret". Return "0" on line 112


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Sandor Yu <Sandor.yu@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
commit: d970ce303ff80ae57bbd3e784f2772dbf3056e0c [4441/5346] drm: bridge: dw_hdmi: Audio: Add General Parallel Audio (GPA) driver
:::::: branch date: 8 hours ago
:::::: commit date: 2 days ago

 drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c
@@ -77,7 +77,6 @@ static int audio_hw_params(struct device
 			   struct hdmi_codec_params *params)
 {
 	struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
-	int ret = 0;
 	u8 ca;
 
 	dw_hdmi_set_sample_rate(dw->data.hdmi, params->sample_rate);
@@ -91,7 +90,7 @@ static int audio_hw_params(struct device
 				   params->iec.status[0] & IEC958_AES0_NONAUDIO);
 	dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width);
 
-	return ret;
+	return 0;
 }
 
 static void audio_shutdown(struct device *dev, void *data)
@@ -102,14 +101,13 @@ static int audio_mute_stream(struct devi
 			     bool enable, int direction)
 {
 	struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
-	int ret = 0;
 
 	if (!enable)
 		dw_hdmi_audio_enable(dw->data.hdmi);
 	else
 		dw_hdmi_audio_disable(dw->data.hdmi);
 
-	return ret;
+	return 0;
 }
 
 static int audio_get_eld(struct device *dev, void *data,

  reply	other threads:[~2022-04-21 15:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 15:23 [linux-next:master 4441/5346] drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:80:5-8: Unneeded variable: "ret". Return "0" on line 94 kernel test robot
2022-04-21 15:09 ` kernel test robot [this message]
2022-04-21 15:09   ` [PATCH] drm: bridge: dw_hdmi: Audio: fix returnvar.cocci warnings kernel test robot
2022-04-21 16:47   ` Neil Armstrong
2022-04-21 16:47     ` Neil Armstrong
2022-04-21 16:47     ` Neil Armstrong
2022-04-22  0:15   ` [EXT] " Sandor Yu
2022-04-22  0:15   ` Sandor Yu
2022-04-22  0:15     ` Sandor Yu
2022-04-22  8:44   ` Neil Armstrong
2022-04-22  8:44     ` Neil Armstrong
2022-04-22  8:44     ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YmFzutFV/iDyEQF2@dd18de969aa6 \
    --to=lkp@intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=Sandor.yu@nxp.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    --cc=shengjiu.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.