Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp944948rdf; Wed, 22 Nov 2023 00:53:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEG3kqZ5mVKnfuullF0UhoqyataH4TQqjfF56qPM3KuYxAHdFlYLt3D8X/4yJG4nvME5LNX X-Received: by 2002:a05:6a00:2a09:b0:6cb:8b47:cb67 with SMTP id ce9-20020a056a002a0900b006cb8b47cb67mr1699342pfb.2.1700643183844; Wed, 22 Nov 2023 00:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700643183; cv=none; d=google.com; s=arc-20160816; b=hM04PmLwcS0Cg4tpCViBj88yD9OGJRr2Z7f2fpwK+q8KbD3K8uz33BvRzlzsQVSSOE vXvbkgD+vtYPWfrDQKm3FTViIOXPheUMfu5lzS0j/qLLsWUjzaEWNz0zsm8gP1CgjRcW BVMjU6WfxeaNnZgGkQwx4h1r+rUXHcTKCLbfF79ZWWdw+6lrEfT789D5TZ5QH4vG+uhh SuT9e6WNFRNHeHNdyRorQEd7RrhTxKEd2mbj5Ve0b1Sjge8vRXpdUHE2eTNl5wmOp109 ll6AY7J94qqYpwF9Twy3BxVr2ncboOz/ZFzsar8DDf2yd+lydNyj9hFQ8KyAjwhelXO9 CbWQ== 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=wijKXm6jt3yW0q0f/OoS+UOmVcILRAxR5G2oT6/S1vw=; fh=KHGJxCdY2p1WYbVYF4Latrtul5DZYQ6ul9r4iRS6V0o=; b=ymy4fpfnR0Qo7eGDwOdGuqPCj4/WLsKSeLpyJh1SOB0X0UI6q7RC5z2LP5LFD1/Icy hd1DV26DTbr/bd3fdkirFt4el8io9MqyAQgwdHc+uG/0t4hDobMWwDcdxeI+jv9XSpRn Xe9aWTXFVo5s9mV1NtAHQvMQiHfjAtLnYHtUUB5qPUVG79pTmkPoAX984iG7MTeyKxwv 6RRa1b1roKsrLa7dBi242myrGRqzNAF69FL0BeytqaosTEmSpctO3RxcCU1oFa0FFxhy DnNzMFPUEEJAjLjdxOQh5IY0YSZbyavEt4pcDYVcthogtBI+jni1G5xwRaKVJxAksngF k42g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b17-20020a630c11000000b005c1b311a152si12315578pgl.657.2023.11.22.00.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 00:53:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0FA1C81CC864; Wed, 22 Nov 2023 00:53:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234757AbjKVIw4 (ORCPT + 99 others); Wed, 22 Nov 2023 03:52:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231388AbjKVIwz (ORCPT ); Wed, 22 Nov 2023 03:52:55 -0500 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83C83109 for ; Wed, 22 Nov 2023 00:52:50 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VwvISgh_1700643160; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VwvISgh_1700643160) by smtp.aliyun-inc.com; Wed, 22 Nov 2023 16:52:48 +0800 From: Jiapeng Chong To: jani.nikula@linux.intel.com Cc: joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, airlied@gmail.com, daniel@ffwll.ch, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] drm/i915/psr: Fix unsigned expression compared with zero Date: Wed, 22 Nov 2023 16:52:39 +0800 Message-Id: <20231122085239.89046-1-jiapeng.chong@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_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 00:53:03 -0800 (PST) The entry_setup_frames is defined as u8 type, else(entry_setup_frames < 0) is invalid. At the same time, the return value of function intel_psr_entry_setup_frames is also of type int. so modified its type to int. ./drivers/gpu/drm/i915/display/intel_psr.c:1336:5-23: WARNING: Unsigned expression compared with zero: entry_setup_frames >= 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7610 Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 8d180132a74b..204da50e3f28 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1319,7 +1319,7 @@ static bool _psr_compute_config(struct intel_dp *intel_dp, { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; - u8 entry_setup_frames; + int entry_setup_frames; /* * Current PSR panels don't work reliably with VRR enabled -- 2.20.1.7.g153144c