mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: open list <linux-kernel@vger.kernel.org>,
	tiwai@suse.de, Kevin Hilman <khilman@baylibre.com>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	broonie@kernel.org,
	"open list:ARM/Amlogic Meson SoC support"
	<linux-amlogic@lists.infradead.org>,
	Jaroslav Kysela <perex@perex.cz>,
	Lee Jones <lee.jones@linaro.org>,
	"moderated list:ARM/Amlogic Meson SoC support"
	<linux-arm-kernel@lists.infradead.org>,
	Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH 2/3] ASoC: meson: axg-pdm: remove comparison always false warning
Date: Tue,  7 Jul 2020 14:23:09 -0500	[thread overview]
Message-ID: <20200707192310.98663-3-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20200707192310.98663-1-pierre-louis.bossart@linux.intel.com>

Fix W=1 warning.

sound/soc/meson/axg-pdm.c: In function ‘axg_pdm_set_channel_mask’:
include/linux/bits.h:26:28: warning: comparison of unsigned expression
< 0 is always false [-Wtype-limits]

cast the channel number to an int to avoid checking if an unsigned
value is lower than zero.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/meson/axg-pdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/meson/axg-pdm.c b/sound/soc/meson/axg-pdm.c
index bfd37d49a73e..8fe5b2563619 100644
--- a/sound/soc/meson/axg-pdm.c
+++ b/sound/soc/meson/axg-pdm.c
@@ -206,7 +206,7 @@ static int axg_pdm_set_sample_pointer(struct axg_pdm *priv)
 static void axg_pdm_set_channel_mask(struct axg_pdm *priv,
 				     unsigned int channels)
 {
-	unsigned int mask = GENMASK(channels - 1, 0);
+	unsigned int mask = GENMASK((int)channels - 1, 0);
 
 	/* Put all channel in reset */
 	regmap_update_bits(priv->map, PDM_CTRL,
-- 
2.25.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

       reply	other threads:[~2020-07-07 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200707192310.98663-1-pierre-louis.bossart@linux.intel.com>
2020-07-07 19:23 ` Pierre-Louis Bossart [this message]
2020-07-07 19:23 ` [PATCH 3/3] ASoC: meson: axg-spdifin: " Pierre-Louis Bossart

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=20200707192310.98663-3-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®