Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Weiyang <wangweiyang2@huawei.com>
To: <perex@perex.cz>, <tiwai@suse.com>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
	<wangweiyang2@huawei.com>
Subject: [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero
Date: Fri, 21 Jul 2023 18:31:24 +0800	[thread overview]
Message-ID: <20230721103124.18522-1-wangweiyang2@huawei.com> (raw)

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


             reply	other threads:[~2023-07-21 12:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 10:31 Wang Weiyang [this message]
2023-07-21 11:03 ` [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero Takashi Iwai

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=20230721103124.18522-1-wangweiyang2@huawei.com \
    --to=wangweiyang2@huawei.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox