Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp996246rwd; Thu, 8 Jun 2023 10:27:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4m5lpli/Tl+6Plnwpx8SfmIB/RCYIrlsZTk42Ao4X3gN+DsojMwJ6zU1f4WQTFVJ3Ec2vd X-Received: by 2002:a17:902:c411:b0:1b1:753a:49ce with SMTP id k17-20020a170902c41100b001b1753a49cemr6541304plk.53.1686245251186; Thu, 08 Jun 2023 10:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686245251; cv=none; d=google.com; s=arc-20160816; b=EzKfIlwMWDPfutL/MAGG3G+oViB+PCv3EFXPICNfvizqTYsuY6PgUd11C1hUfhPOSV pEeXBDuHDSlZw6nbXoolfUgFWEu+qTvRJWXxSREaiJkZl2DVr3Yx8ZqeKbQydTGjITSg WbrzLIyQ7qzQmgSZO82aaEP30xT3WqoUVXFsSdgAmI+7It5rVwrlF7muYailtxy/F+zL D+L/8Dt/rmhv7Glbe8ku7FrTYbzKO/INpydzmPzQJH3m2/Pgt2HNN7/y6k2BCfe9Xwz/ PF/gbwig0SoUvwzigJBwKhUfoDzg+Hc0Tfms+LfYqDQvq7VswEr3BDTtzB4fdhIIMUog 1Kqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TSIysdH/nuHftDK+zf6Ubbetj/qceC3B4BSdcDRKOpg=; b=l72UDa1ED0AYuagBzNwrtWLGTiSrM9b8NL3cBfXsVEKuyWOk4I+bzme4lzbm/R1X1k 06mXGbZAuJzzBlUnjDdNYYOwMZZYkzI2weW9tyfSbpiayzixCE2LKp0u/LNxlOnliGu2 JzUWMd3oo1nd/BD6wO4AbBDG/LZOqxpTqReak2oU/vjCtAWPNI2taFc+a4FABIa0AzPY IW2RbnZKt0b5SWy90HYV0KJR8g/1PYtMSU9BiajiuXcf9TwG83wEB6qlvhxILHLOI+T8 RaKJZkGupWarepUFQvDMciCASScTO6lyinIf+v/1YTp3HvBzmNY0u2BImQnWV/P2Jn9f OLYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZUhU2SEf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a170902e5c600b001ac7ea55768si1350712plf.499.2023.06.08.10.27.18; Thu, 08 Jun 2023 10:27:31 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZUhU2SEf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236718AbjFHRNV (ORCPT + 99 others); Thu, 8 Jun 2023 13:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbjFHRNO (ORCPT ); Thu, 8 Jun 2023 13:13:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7DBB2719; Thu, 8 Jun 2023 10:13:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6842964EB9; Thu, 8 Jun 2023 17:13:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A402C4339B; Thu, 8 Jun 2023 17:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686244392; bh=6+JRZqiU7AewFw7RNLWggb98WSNCC6TPNiR7/Ri3VSU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZUhU2SEf33TrikSZq9vuyNczD7e5d4ZVVFLPnodMSLlHB6wvCLf56LV0lv+DLgw1d UmjaEzYHEozhnCKAftUiKahxOKWmMxivbeGYhY7W/lZGIyisLOtPhQ4mlycbwiTTjd ZqLkmFCK8HRgKn+2bVdQJnR/b/FtfSTQ2ajH2ODJxjtR66RhN2Biq81BKQ8j2VAM6a LxejJZhJ0AEhrSaRCYgJPOFZd+Imh0vWZH0rlYWqi5EZxpL369tWbC4ujaxzRhFra3 099H1iO4oZ4AKWVhSdKbFp8YOpfqaeXQYJM6wwBq0/aCIkV1LBZiByJKEMh+R7Quqr SoNDKfEc3rbew== Date: Thu, 8 Jun 2023 18:13:08 +0100 From: Lee Jones To: Jiapeng Chong Cc: pavel@ucw.cz, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH] leds: flash: leds-qcom-flash: Fix an unsigned comparison which can never be negative Message-ID: <20230608171308.GE3572061@google.com> References: <20230531053559.5702-1-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230531053559.5702-1-jiapeng.chong@linux.alibaba.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Wed, 31 May 2023, Jiapeng Chong wrote: > The variable 'count' is defined as unsigned type, so the following if > statement is invalid, we can modify the type of count to int. > if (count <= 0) { > dev_err(dev, "No led-sources specified\n"); > return -ENODEV; > } > > ./drivers/leds/flash/leds-qcom-flash.c:546:5-10: WARNING: Unsigned expression compared with zero: count <= 0. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5344 > Signed-off-by: Jiapeng Chong > --- > drivers/leds/flash/leds-qcom-flash.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks -- Lee Jones [李琼斯]