Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1547034lkv; Wed, 19 May 2021 12:28:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxomL2G3gS2/Tuqlmxu5XcJxR3JoWB1cIPoy4G7yD5ZcTdVO1McMfjYbLYJLr0UYMnXW7I2 X-Received: by 2002:a17:906:ccdd:: with SMTP id ot29mr799838ejb.72.1621452517974; Wed, 19 May 2021 12:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452517; cv=none; d=google.com; s=arc-20160816; b=dwNpAdS4ufS8AFKn7Ox3Baq7YLwaShdsjCODTtojpetilN53MvEcqZ5F4uy2eTN8Va 4s7hOn0ashZhiGxIqaccFY9jBmsAC2xzDrXfGnYI5M5fu4FuznHp5ocZukGJeIIB34N1 /PGDcPMG16cAe5asfeFSpzSfiRBwUQJeFWgU4wtJdx6I6WiANrmCemZ82sIATH/7+MQ+ CmSsvgGLvwt+MKBocqJzJ1yX46octtD5HUzh2ytASd/lFJPaczaOyPNhy0lobE6ONjvX AvsIM6T8AWJHLA+UWj/gyAXCq/fi/IFxJCKQr35wunWFe+eV7/7LKw71/bhIH8AQ2RBT RgwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=dgXlUiAKWafOYfzyLjkt1EGz6if2dmW7WgLRTR/kepE=; b=BMmreJ1bPwLpIDvj57K+BryoiJ4ZWRduDh4k4+v4+vqXPpp8S0G7y2eiECfYIE7yiz GX7H+QASnoqh43iKO+dN4G0WYtOIN1//tvmcacpmhQI0Hhj8KceVQW0ncNSMJkYCj9oI 8POTse48V6l7zR5y0EKzOF7cmP/iZhSGv+k5WHSUov+ZwXuwjnOGIPzAzx7eXZCOo3Cb PP1GhRr6Bx100NlUz95grJCjy476a3YiZteXj86vsr8+b+khOfZ0230SXv44egF3YfaQ f3rVNyI5ips7cKU9QhY3EUtBTdP0IQpHgiBIBV5M6YK0VtKMApCF73NZBmXv1jWKbtMF rgqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga4si386056ejc.497.2021.05.19.12.28.13; Wed, 19 May 2021 12:28:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345916AbhESKvi (ORCPT + 99 others); Wed, 19 May 2021 06:51:38 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:26159 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346022AbhESKvW (ORCPT ); Wed, 19 May 2021 06:51:22 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UZPQYA2_1621421393; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UZPQYA2_1621421393) by smtp.aliyun-inc.com(127.0.0.1); Wed, 19 May 2021 18:50:01 +0800 From: Jiapeng Chong To: andrew@lunn.ch Cc: vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] net: dsa: Remove unsigned expression compared with zero Date: Wed, 19 May 2021 18:49:51 +0800 Message-Id: <1621421391-36681-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable val is "u32" always >= 0, so val >= 0 condition are redundant. Clean up the following coccicheck warning: ./drivers/net/dsa/qca8k.c:732:5-8: WARNING: Unsigned expression compared with zero: val >= 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/dsa/qca8k.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 4753228..7b38b8d 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -729,8 +729,7 @@ mutex_unlock(&bus->mdio_lock); - if (val >= 0) - val &= QCA8K_MDIO_MASTER_DATA_MASK; + val &= QCA8K_MDIO_MASTER_DATA_MASK; return val; } -- 1.8.3.1