* [PATCH] ASoC: codecs: Fix unsigned comparison with less than zero
@ 2023-02-06 7:55 Jiapeng Chong
2023-02-06 8:30 ` Herve Codina
2023-02-06 14:36 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2023-02-06 7:55 UTC (permalink / raw)
To: herve.codina
Cc: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
Jiapeng Chong, Abaci Robot
The val is defined as unsigned int type, if(val<0) is redundant, so
delete it.
sound/soc/codecs/idt821034.c:449 idt821034_kctrl_gain_put() warn: unsigned 'val' is never less than zero.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
sound/soc/codecs/idt821034.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
index 5d01787b1c1f..2cc7b9166e69 100644
--- a/sound/soc/codecs/idt821034.c
+++ b/sound/soc/codecs/idt821034.c
@@ -446,8 +446,6 @@ static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol,
u8 ch;
val = ucontrol->value.integer.value[0];
- if (val < 0)
- return -EINVAL;
if (val > max - min)
return -EINVAL;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: codecs: Fix unsigned comparison with less than zero
2023-02-06 7:55 [PATCH] ASoC: codecs: Fix unsigned comparison with less than zero Jiapeng Chong
@ 2023-02-06 8:30 ` Herve Codina
2023-02-06 14:36 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Herve Codina @ 2023-02-06 8:30 UTC (permalink / raw)
To: Jiapeng Chong
Cc: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
Abaci Robot
On Mon, 6 Feb 2023 15:55:18 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> The val is defined as unsigned int type, if(val<0) is redundant, so
> delete it.
>
> sound/soc/codecs/idt821034.c:449 idt821034_kctrl_gain_put() warn: unsigned 'val' is never less than zero.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> sound/soc/codecs/idt821034.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
> index 5d01787b1c1f..2cc7b9166e69 100644
> --- a/sound/soc/codecs/idt821034.c
> +++ b/sound/soc/codecs/idt821034.c
> @@ -446,8 +446,6 @@ static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol,
> u8 ch;
>
> val = ucontrol->value.integer.value[0];
> - if (val < 0)
> - return -EINVAL;
> if (val > max - min)
> return -EINVAL;
>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Thanks,
Hervé
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: codecs: Fix unsigned comparison with less than zero
2023-02-06 7:55 [PATCH] ASoC: codecs: Fix unsigned comparison with less than zero Jiapeng Chong
2023-02-06 8:30 ` Herve Codina
@ 2023-02-06 14:36 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-02-06 14:36 UTC (permalink / raw)
To: herve.codina, Jiapeng Chong
Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel, Abaci Robot
On Mon, 06 Feb 2023 15:55:18 +0800, Jiapeng Chong wrote:
> The val is defined as unsigned int type, if(val<0) is redundant, so
> delete it.
>
> sound/soc/codecs/idt821034.c:449 idt821034_kctrl_gain_put() warn: unsigned 'val' is never less than zero.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: Fix unsigned comparison with less than zero
commit: 05f5504b161054bdce74eef5d9ff602bbebaeca8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-06 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 7:55 [PATCH] ASoC: codecs: Fix unsigned comparison with less than zero Jiapeng Chong
2023-02-06 8:30 ` Herve Codina
2023-02-06 14:36 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox