Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp762075rwj; Thu, 22 Dec 2022 14:40:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXslsqZmp46gzwyYDIlJzT9ZZstsg8mIRTpN0nZeEiqCjjbFr4jdRU9KfJo9i+ZEW+yg3xoq X-Received: by 2002:a05:6402:1caa:b0:46f:a73d:367c with SMTP id cz10-20020a0564021caa00b0046fa73d367cmr6132638edb.34.1671748803300; Thu, 22 Dec 2022 14:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671748803; cv=none; d=google.com; s=arc-20160816; b=LUAIuaC20SbWHH15esjmAfpUGPsGmUJs0CRm5zL0fCErKxLhPwrLzq4SzWduU7XGDQ o5tGN4BBdYCQUzXVAtxWLmE6nwoocxawIf68XS0YRi0rsC6veembf6eoHACLJ/Rt8e/H BGUVK5AOSWhMqRWlMVxiSMfpuCZRz2ZGprAeP8ct8XE93m7awN935rnmuvQqXsKn7Iry 0sDbrBbPyq6schkvNQThaQY2TsusrKzqihyzSopqKu5+PlMxSUKsXguiVxTFUi8uNGMm yudMq3/o7KLEFBCj862AT9xT5GRiboXjRkNyXinc86Mwy4BhfU81/IvWvThHLCDXYdQh F2TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U9J0SAOJWmGg3K+OYwmd0BD0E3Ym8yEDir998iVg4B8=; b=mdvESYyKjCfBKBDoNPN+9vnClfFPZcg6l9Hap9zHHu4BxAaH57FqGy4WLHq6MlGLdE ggO0QeFTdoBczEPh6DdNhlp2yIxEVB1N0rAKPf0RmfLAEYZDdX5snP9FF2Zakk/rQtQ0 se/og8IjRa6aK5KnWPDKM6bx4i9ASRCZTQCCMiXo9FVs7VdtEVKHzT6yO1qHJ++wy7Qq FYopLu+V2qDTJWt4f7Ij0ehbiTCcwjj3VLo2m7xtIrtrNDytEVcem8jqfG/N0andw5s7 CxRVSX0EhuHclT3/jv2TtlAZRiFx5E1IBBTlx23kYbhrlHb9e0Ci+Tly8LL7oMKAjRML xz1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=hNgAdv6C; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a056402037500b00469058297afsi1332059edw.92.2022.12.22.14.39.46; Thu, 22 Dec 2022 14:40:03 -0800 (PST) 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=@googlemail.com header.s=20210112 header.b=hNgAdv6C; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbiLVVU2 (ORCPT + 68 others); Thu, 22 Dec 2022 16:20:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiLVVU0 (ORCPT ); Thu, 22 Dec 2022 16:20:26 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 172C410FEC; Thu, 22 Dec 2022 13:20:26 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id i15so4685212edf.2; Thu, 22 Dec 2022 13:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U9J0SAOJWmGg3K+OYwmd0BD0E3Ym8yEDir998iVg4B8=; b=hNgAdv6CJv+fGQM1pzmmqDVEAdsmQ3tjZltuJAd87S6ssz6ZUmn2LevZ7lQlhIuefz MNNugjW0FXa7H9YS/nUz1fWi9J7C4QQpUxBfPukCajzr4OpNMmS+rxIrZVjr+o7XsRo9 5Z+iwkgEiHuTEASxV0sOAcP2iQAuHv45bFdsn/Nbmeh+tXfUmkZZRNkkESREC2mbB1WD XF/F5EXhQcb3B7G6wo30Uf7w15c4RYkUihg3UxPASgdBaDIfbiACQ3NOdgNAdL0Qcn/E yifDo9hiAHiofQLEHTff8tGQcJtrn/GNr8lNrsmwmUE8/7riIVUVYwPffQcyyB4cCgE6 NCgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U9J0SAOJWmGg3K+OYwmd0BD0E3Ym8yEDir998iVg4B8=; b=3mduN0N1fgkv51I/7spcceXohn2K6ACax3TxrO3lbRPQ4Kv8qQdZ8xhE48TmoVXWUV ov7KlozIQjHHojpQymPqJ+pR/1eHk7BP8f8xaXypuWUiOnHhmpGsbImM0fpm6mjbG5MO dC8yfiQmr3ll4HOFhF7CTmYpyf8Z0ddF4urand5iNJ/huHVYFlx0ki45B9paQFAUU/vy +pIaloTr1WNCkSIWQHFcSytJF7kMmzldlampgYlV6uNuoWpuZGasx2H6qi+Q7oC9f8np gjf/Ai4gRdmMbqQfFPCTvSAaBQFPHiXz1HeOzLqQCosoMVAMVCdAnsLg675jviO3R1YB Y8Dg== X-Gm-Message-State: AFqh2kpOvk2cH6ZQrfwbmFV1B8dQkePReGFftobSOMzrjO1e9EHKdZC6 sDcEfvR1k3zooS0XEyE8BGC1/F4a1J5j1E8xUtUvOr2XGik= X-Received: by 2002:a50:ef0e:0:b0:46c:fa25:f03d with SMTP id m14-20020a50ef0e000000b0046cfa25f03dmr871442eds.291.1671744024348; Thu, 22 Dec 2022 13:20:24 -0800 (PST) MIME-Version: 1.0 References: <202212222251.Xacx8c4D-lkp@intel.com> In-Reply-To: <202212222251.Xacx8c4D-lkp@intel.com> From: Martin Blumenstingl Date: Thu, 22 Dec 2022 22:20:13 +0100 Message-ID: Subject: Re: drivers/hwmon/jc42.c:477 jc42_readable_reg() warn: always true condition '(reg >= 0) => (0-u32max >= 0)' To: Guenter Roeck Cc: kernel test robot , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Hi Guenter et al., On Thu, Dec 22, 2022 at 3:36 PM kernel test robot wrote: [...] > 475 static bool jc42_readable_reg(struct device *dev, unsigned int reg) > 476 { > > 477 return (reg >= JC42_REG_CAP && reg <= JC42_REG_DEVICEID) || > 478 reg == JC42_REG_SMBUS; The bot is right: we can omit "reg >= JC42_REG_CAP" as it's already covered by the fact that: - the reg variable is unsigned, which means the lower limit is zero - reg <= JC42_REG_DEVICEID covers the upper limit Before I send a patch I'd like to hear if removal of "reg >= JC42_REG_CAP" makes sense to other people. Best regards, Martin