* [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero
@ 2023-07-21 10:31 Wang Weiyang
2023-07-21 11:03 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Wang Weiyang @ 2023-07-21 10:31 UTC (permalink / raw)
To: perex, tiwai; +Cc: alsa-devel, linux-kernel, wangweiyang2
Since struct snd_ump_block_info::first_group is unsigned char, comparison
to zero is redundant
Signed-off-by: Wang Weiyang <wangweiyang2@huawei.com>
---
sound/core/seq/seq_ump_client.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c
index fe21c801af74..f26a1812dfa7 100644
--- a/sound/core/seq/seq_ump_client.c
+++ b/sound/core/seq/seq_ump_client.c
@@ -298,8 +298,7 @@ static void update_group_attrs(struct seq_ump_client *client)
}
list_for_each_entry(fb, &client->ump->block_list, list) {
- if (fb->info.first_group < 0 ||
- fb->info.first_group + fb->info.num_groups > SNDRV_UMP_MAX_GROUPS)
+ if (fb->info.first_group + fb->info.num_groups > SNDRV_UMP_MAX_GROUPS)
break;
group = &client->groups[fb->info.first_group];
for (i = 0; i < fb->info.num_groups; i++, group++) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero
2023-07-21 10:31 [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero Wang Weiyang
@ 2023-07-21 11:03 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-07-21 11:03 UTC (permalink / raw)
To: Wang Weiyang; +Cc: perex, tiwai, alsa-devel, linux-kernel
On Fri, 21 Jul 2023 12:31:24 +0200,
Wang Weiyang wrote:
>
> Since struct snd_ump_block_info::first_group is unsigned char, comparison
> to zero is redundant
>
> Signed-off-by: Wang Weiyang <wangweiyang2@huawei.com>
Thanks, applied with a proper Fix tag now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-21 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 10:31 [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero Wang Weiyang
2023-07-21 11:03 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox