Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp140501imi; Thu, 21 Jul 2022 17:53:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sOKUYxvjWW5O3UkIO7/xfIRxEIbpD1I9mqn7JjyKCJzCMQ8V9qaGRJfuG+ofK0C84BiLoV X-Received: by 2002:a17:903:2d0:b0:16c:39bc:876 with SMTP id s16-20020a17090302d000b0016c39bc0876mr1121703plk.42.1658451235545; Thu, 21 Jul 2022 17:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658451235; cv=none; d=google.com; s=arc-20160816; b=vRzIEmnqIwlbtg/YK/VeTNNvfo1Nkh8scK5sIk+pvx0Phd8CcuxY0A13UXoVxERtWI kZyE9KxgSZdZkFVnwUJNIxFyjPgrnzqBDwEDtyYUzZ0WiNmtDRzD5IZaMx04qoZhQH2c LakFIIDOLVZWNF+MIRsH1ZmDz/799uGzJBF06PpeFu0fiNPzAY8di/O/LipnCmzEBpbP 9f/I2cOTIaEGtPJHFzpWXSh2ftW7TIYqE2sbP9lbIs8ThBv7iKN8X2lBDgObQvs4HQVq 6/G/0S9IXCRVwRPYY30ON8QCHjaVXVim3f29Ag0ZL/L3d276R6xPzZtULzmTGKKx6uxE PK4w== 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=dA4ocmviZtJLwgCNXblUgMEplVG0bn2Mak8vF99OLAQ=; b=wsxXjFHpVFwY7Kzr4NIThDUHY2bqsszSZRQN6Unecr6ZGEaOYwtyStGIBeaPQgqi1V dPpcpBU2AMrd+d3bq3Il9gBe0VeYyWxglxDdwlNNoJJAeigLzJfkZlkCZfZ3opXQiFdn bPXxtBSXBF600dD4ou1kzcow/a35Tukr5OLfoAHfPaovIu+FuLKSgCOWFrs3NOVSn97j iauTbrCFRwjk6TfI0v75jPwp5zqXx6E619q0KOg8xJEFlOzEz6tF6iQkXC1+s/zysq/i 35v8ZtGBtsp+K+81BXSE3EYKz+BlYGz4/X2mDAq95PABtNPLdrL5S+A0XznpEFF7fOhD vByg== 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=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a170902db0100b0016d1522a783si4674230plx.23.2022.07.21.17.53.39; Thu, 21 Jul 2022 17:53:55 -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=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233896AbiGVAmh (ORCPT + 99 others); Thu, 21 Jul 2022 20:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiGVAmg (ORCPT ); Thu, 21 Jul 2022 20:42:36 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4900C91CD4 for ; Thu, 21 Jul 2022 17:42:35 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R821e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VK2qfq8_1658450552; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VK2qfq8_1658450552) by smtp.aliyun-inc.com; Fri, 22 Jul 2022 08:42:33 +0800 From: Yang Li To: chenhuacai@kernel.org Cc: kernel@xen0n.name, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] LoongArch: Fix unsigned comparison with less than zero Date: Fri, 22 Jul 2022 08:42:31 +0800 Message-Id: <20220722004231.91114-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 The return from the call to get_timer_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int. Eliminate the following coccicheck warning: ./arch/loongarch/kernel/time.c:146:5-8: WARNING: Unsigned expression compared with zero: irq < 0 Reported-by: Abaci Robot Signed-off-by: Yang Li --- arch/loongarch/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/time.c b/arch/loongarch/kernel/time.c index 79dc5eddf504..786735dcc8d6 100644 --- a/arch/loongarch/kernel/time.c +++ b/arch/loongarch/kernel/time.c @@ -135,7 +135,7 @@ static int get_timer_irq(void) int constant_clockevent_init(void) { - unsigned int irq; + int irq; unsigned int cpu = smp_processor_id(); unsigned long min_delta = 0x600; unsigned long max_delta = (1UL << 48) - 1; -- 2.20.1.7.g153144c