From nobody Sat Feb 7 10:15:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D452C001DC for ; Fri, 21 Jul 2023 10:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231394AbjGUKAk (ORCPT ); Fri, 21 Jul 2023 06:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbjGUKAh (ORCPT ); Fri, 21 Jul 2023 06:00:37 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 470713A9C for ; Fri, 21 Jul 2023 03:00:16 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R6lQP6nvYzrRsG; Fri, 21 Jul 2023 17:59:25 +0800 (CST) Received: from octopus.huawei.com (10.67.174.191) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 21 Jul 2023 18:00:12 +0800 From: Wang Weiyang To: , CC: , , Subject: [PATCH -next] ALSA: seq: remove redundant unsigned comparison to zero Date: Fri, 21 Jul 2023 18:31:24 +0800 Message-ID: <20230721103124.18522-1-wangweiyang2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.174.191] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since struct snd_ump_block_info::first_group is unsigned char, comparison to zero is redundant Signed-off-by: Wang Weiyang --- 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_clien= t.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 *c= lient) } =20 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 =3D &client->groups[fb->info.first_group]; for (i =3D 0; i < fb->info.num_groups; i++, group++) { --=20 2.25.1