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 3/3] ASoC: meson: axg-spdifin: remove comparison always false warning
Date: Tue,  7 Jul 2020 14:23:10 -0500	[thread overview]
Message-ID: <20200707192310.98663-4-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-spdifin.c: In function ‘axg_spdifin_write_mode_param’:
include/linux/bits.h:26:28: warning: comparison of unsigned expression
< 0 is always false [-Wtype-limits]

Cast width 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-spdifin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/meson/axg-spdifin.c b/sound/soc/meson/axg-spdifin.c
index d0d09f945b48..5fa411d4e985 100644
--- a/sound/soc/meson/axg-spdifin.c
+++ b/sound/soc/meson/axg-spdifin.c
@@ -154,7 +154,7 @@ static void axg_spdifin_write_mode_param(struct regmap *map, int mode,
 	reg = offset * regmap_get_reg_stride(map) + base_reg;
 	shift = width * (num_per_reg - 1 - rem);
 
-	regmap_update_bits(map, reg, GENMASK(width - 1, 0) << shift,
+	regmap_update_bits(map, reg, GENMASK((int)width - 1, 0) << shift,
 			   val << shift);
 }
 
-- 
2.25.1


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

      parent 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 ` [PATCH 2/3] ASoC: meson: axg-pdm: " Pierre-Louis Bossart
2020-07-07 19:23 ` Pierre-Louis Bossart [this message]

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-4-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®