Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp226327rwd; Tue, 30 May 2023 19:20:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KCyqi/mmnuzKH1UcRoUcUtIWeL+t7YOo5+r36aznbEmRhR08WI6T1afWWG+4dn0vxLVRL X-Received: by 2002:a05:6808:1449:b0:39a:427a:a315 with SMTP id x9-20020a056808144900b0039a427aa315mr2079304oiv.2.1685499654635; Tue, 30 May 2023 19:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685499654; cv=none; d=google.com; s=arc-20160816; b=kAO5+WzRW1ZlwD4tjuxjaKkkij9M5Smkvf3dHQepG2jcNSdhsMLEAf3fz3aMJDsTz3 bThuTG4B4wSPx2mF0dVQ3iM2zTx6lIXTiFySPT5mG7RQ1qDDM52SHUy6FMkHjZdUFy9W biITnYPvIZz2vARVleQFjCBganpFgFmQoR6dDK/4/XPPFfKHDmHz+HJ7viKMEfNA4LZr ZbeG8ppMat7XW28DSvNFTPyIoaX8jTG7gmT2bZnKYWETq21DR3/b1CumiqqUkIOUa8Qa GAUKspUKQs6kRCrgJQdimWpO0bC/Mi5KyjMfwlPfyn/0RpS68BrcWeFLAPWuMRFs7Pb5 tWPQ== 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=5dIMSxT5dnXEnC+hwg+bswaYrkmq5LLbNGr9eWMYYMk=; b=GVZ9X0YeYdStMABWC33i+EgUM/+kbfeRvvs8mlDzTGuFe7AMOt/eBGEkDfOu+1JJg/ EkWJdfdLb21u2ek1kN8y/QAaeZ3G6eSHQX342BBAJnAV9m4OwRvW9Q5euMolGktL1CjQ hhLVm6RZ9i2UyHWNLRXS4lXcbYDIEWJdldpGcUIiJgE7H4qxqf4VmpFlN0Rojjhuivpu MrtqoTxqHN5MJr06mbxJ6wCMQXNXbhjqlAxDHwbxR2XyBv73aErSIZfxWVXZxzCfPPG5 TrIR7XhW9pyAkn46rQDATytOa8+hpI1fXA//H4EZS8ivDVV4ZrwgXlWVmx+dSKaDolwH YwKg== 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 cp8-20020a17090afb8800b0024bd4a6e728si125044pjb.92.2023.05.30.19.20.40; Tue, 30 May 2023 19:20:54 -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 S233622AbjEaCCr (ORCPT + 99 others); Tue, 30 May 2023 22:02:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbjEaCCp (ORCPT ); Tue, 30 May 2023 22:02:45 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB7CEEC; Tue, 30 May 2023 19:02:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R481e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VjvXqog_1685498559; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VjvXqog_1685498559) by smtp.aliyun-inc.com; Wed, 31 May 2023 10:02:40 +0800 From: Yang Li To: pavel@ucw.cz Cc: lee@kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] leds: cht-wcove: Fix an unsigned comparison which can never be negative Date: Wed, 31 May 2023 10:02:38 +0800 Message-Id: <20230531020238.102684-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, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED, 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 value from the call to cht_wc_leds_find_freq() is int. However, the return value is being assigned to an unsigned int variable 'ctrl', so making it an int. Eliminate the following warning: drivers/leds/leds-cht-wcove.c:236 cht_wc_leds_set_effect() warn: unsigned 'ctrl' is never less than zero. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5341 Signed-off-by: Yang Li --- drivers/leds/leds-cht-wcove.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/leds/leds-cht-wcove.c b/drivers/leds/leds-cht-wcove.c index 0cfebee98910..10afd03164b4 100644 --- a/drivers/leds/leds-cht-wcove.c +++ b/drivers/leds/leds-cht-wcove.c @@ -223,8 +223,7 @@ static int cht_wc_leds_set_effect(struct led_classdev *cdev, u8 effect) { struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); - unsigned int ctrl; - int ret; + int ctrl, ret; mutex_lock(&led->mutex); -- 2.20.1.7.g153144c