From patchwork Thu Nov 3 02:27:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 14599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp274435wru; Wed, 2 Nov 2022 19:37:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6s/LbZWtpsrRa/fkSAPTOUN1URkcR22mVdate8F8wFRf225rDGRjk5FHE+Ea8Pi4z4EiGb X-Received: by 2002:a17:907:2bd2:b0:7ad:9ada:a6ca with SMTP id gv18-20020a1709072bd200b007ad9adaa6camr25838839ejc.637.1667443054422; Wed, 02 Nov 2022 19:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667443054; cv=none; d=google.com; s=arc-20160816; b=DI+gBv3WquGeCt+7nEcuzvBmq1sggm5V7BrE9MKdEVtGMtR5OF1zAxFpQynH5az0hp 49PjST4f/oiIK1Wri2ninQ2SHbZ4zo9D+tAAiyS/u77gKo0VeX3XyhY5o9cRGpxuBguq FQ/7LWt7NjhQWL+z6W5zZEZuqCSgfxLv4xTSGhCUyhN7ppab1Xo2DKgMaEdczVkuSNfT cUbJ7YLd/nqm0d+/CsBJX9zgXs6HlIcaIC7XV4ZpFMPz0ODLZFyxQVkc9OHSwlWIqxll v4MxHr71zIkt3OHOXlA+HcWP5slJNhopEIcqkwx9teUJAggiRcGd8hNeONgylQCZdbq/ MY2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=TsEtt443Cr3NIij6gGdvzEE/9wPb5554DIB7BWsLG14=; b=Sb30gHkD06phozZ5ky0SRQxbzZ8MLqiIAozm2jXx6k9arEcwuy9hHh8GtW/H83Oc4q v0Ds50sJjE298t4KUZQLQjBNkCM4bDSGPbGv9jyIQ+Jck4k1RlRENXCB360J7W7tZ9xL oTA5Pqgim/edBjKyDnnI0QbJVGTbpIUAlClTo5Gk1MoiFIBuM4TIwECF6YTRZfvo3wm4 4zGyvou8RDoY6MwcfBh62rxcXn2KkJmioVsxxDse3i/rlvGIekwp47kIJC7PSG1MIOjl IgqmwDZO9aO8mc/y/OwaSIoM3opDWd2WbvwFMv2fXtd48wRjpmp4IL7K0RftL8pY/FVM f4Rw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a508d07000000b0045d079c8f20si14622185eds.43.2022.11.02.19.37.10; Wed, 02 Nov 2022 19:37:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbiKCCdz (ORCPT + 99 others); Wed, 2 Nov 2022 22:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbiKCCdx (ORCPT ); Wed, 2 Nov 2022 22:33:53 -0400 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 02 Nov 2022 19:33:47 PDT Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E59D12A98; Wed, 2 Nov 2022 19:33:47 -0700 (PDT) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 3 Nov 2022 10:27:56 +0800 (GMT+08:00) X-Originating-IP: [182.148.15.109] Date: Thu, 3 Nov 2022 10:27:56 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (amc6821) Fix unsigned expression compared with zero X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <1872639a.89.1843b5106aa.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwD3C+ItJ2NjvEEBAA--.41W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAOB2FEYx0BLQALs0 X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=3.6 required=5.0 tests=BAYES_05,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748440768184666345?= X-GMAIL-MSGID: =?utf-8?q?1748440768184666345?= Fix the following coccicheck warning: drivers/hwmon/amc6821.c:215: WARNING: Unsigned expression compared with zero: reg > 0 drivers/hwmon/amc6821.c:228: WARNING: Unsigned expression compared with zero: reg > 0 Signed-off-by: KaiLong Wang --- drivers/hwmon/amc6821.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c index 3bfd12ff4b3c..1f5382f8d52b 100644 --- a/drivers/hwmon/amc6821.c +++ b/drivers/hwmon/amc6821.c @@ -166,7 +166,7 @@ static struct amc6821_data *amc6821_update_device(struct device *dev) struct amc6821_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; int timeout = HZ; - u8 reg; + int reg; int i; mutex_lock(&data->update_lock);