Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10706810rwp; Fri, 21 Jul 2023 03:49:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBugEs2O7yzh92SDc+hXw0vAivisYuZHlHm70UYCJsnXdjviddxFuZNfbV3Ldpv3Cl68KI X-Received: by 2002:a05:6e02:df0:b0:348:89ae:5a80 with SMTP id m16-20020a056e020df000b0034889ae5a80mr1481294ilj.7.1689936559801; Fri, 21 Jul 2023 03:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689936559; cv=none; d=google.com; s=arc-20160816; b=isjhyGYTJhTrnrOnfN6f+hT2A1Zp80YIwJhiZGZ3D8p4mVXMmr5aKf5mCrQ/gLj9D8 3RHruEMvy8jyh+6/xrBhErFyMKtOpBUQJ1sK4mACkk0pcXqjfJcN/DuTNdGYifskukk5 jdi4TwC9Cf01Ib1zEjbQblX6EDSoLKWV1NZqnHGV8+XADUyiZDv5fB65HZqTxpjOImHN /NaLocW0eCqKd/MED/mKYcFWfCCSrdYpbDUJfOx6xHFm3APMzddhVw0OxyITrzcBsv9X S3YHnhEStZHm62j+YYE81JVnNTkeC1eSSbmHy7cNLVU3a5PIKmdw6w7F0YQ8VGatpgQJ 3Z2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=B8BGX105vE3y20E5pOXQQ6y5jab79g2GYTfAWLMqHI4=; fh=ObaesnE7+fOc7GjIgiCAg3X2mpxBUEZEqd2HJCeQq0A=; b=uTjFBqp2Vebx2R20k/c4DIlKLuArxBUlRl3QY6Nc7yKpfqWBKLMZwXAvbHOySI27UK CsuYCiirec4oGMjIRGvBV9N2iB/W9Jze1GZJWYr1E0ZrBVOO/pvpadvyjhTn5bxUvqEd rSN99qs8fBxhD5Fp33guGMqUj2Lc5FllRwrQL1znQUza7DRL/oG+mdjMWiqTfiKHufDY vIMwtu5qT9JUB31GG4FIWYQ83kqf6qsNI8nwB3086kBGvXnGDtthA9ynnZ6Ofzg4kBfA zG5FNs4ehCOMm8cx+ZV/cg7ew5IQDlrercncAOmkp0s9LN0OBNA9puFCI/ly5AHKmNIK aPnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020a65498b000000b00553813c2df0si2647009pgs.513.2023.07.21.03.49.07; Fri, 21 Jul 2023 03:49:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231418AbjGUKAi (ORCPT + 99 others); Fri, 21 Jul 2023 06:00:38 -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: 7BIT Content-Type: text/plain; charset=US-ASCII 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_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