Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp956348rdf; Wed, 22 Nov 2023 01:16:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtHxa/Y2JRGI5zH4Ad3r2ernGufxHAKQjugUEqOjmPPPbJvz36MlT6UhE7sfrSO0kuMde7 X-Received: by 2002:a17:90b:303:b0:27c:e062:c464 with SMTP id ay3-20020a17090b030300b0027ce062c464mr2165325pjb.37.1700644613796; Wed, 22 Nov 2023 01:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700644613; cv=none; d=google.com; s=arc-20160816; b=VUZjc9oOAdt0Q6cvpsswSV8SONSkYv7gEykP7L2yOpdFAXtqSWy4c+CMqJCvdPMauJ M5mcrK2SKJQQB/ffRK88sMJ/QLnvBOmhhkGdX6Sy1zCbngo3m4tk3WeX1XKL8WtRMkYj WqZOpz7V1r4oVtYqGIWfPCzLIC/263Pg00HgjjYQGKMe6U8myHgIsGrOQInA6afncr3A xdWLudWTzR1Ck736/3ZWZTZPuuXZ/7lfRB1OVS8EngUlWFPoteaEOYBTILxsB+H05lFG JwYWk698TqVP9c9eQoaC0gyF8uiQRiVaHLRnm07wFe8n2t3nQ5BAcvzXnUOQwBsw32IY LN4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=8sm3od56dI+3fRIZVymOhALdqzRTB+ycd8mHHHw/CnE=; fh=q+iAxoEZmgKyKbXlCI/ho0oYj+SuVlldKi0gflnmwNs=; b=RA6fHVGtBNITRAk87BAHRNZyRWwsLjILHjt+6gRZF892nUQp/BrKLFinB1FO8TuYny Z/G74s2SA8dTQqjMMuHV7EvwEitlVWRsecSCr1oOgpP2l95FsHjXlGf7QASELdK0mb8j g2MupxbiKWBObphxx2WTbCoaB6k1A70X//LGPJYImwRacLtY6r9RFE7ex5ls0Wdfaqk9 3/j1WOxHbHeYZTHEmpSP3GtArL2VKWhcYA4+QC5zTNaXMNuQC8wcuqBZuwCHxcjvFGUf AeswJNCLqKZEG8aK0WJoRPPbGAD/YIKAwNPvgHDoKDiMTxAmrq/MOXirYnpG555Zzjn7 kQPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IljyKAst; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y17-20020a17090abd1100b0027d01d450desi1087781pjr.86.2023.11.22.01.16.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 01:16:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IljyKAst; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E5EC88075B0B; Wed, 22 Nov 2023 01:15:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235067AbjKVJPM (ORCPT + 99 others); Wed, 22 Nov 2023 04:15:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbjKVJPK (ORCPT ); Wed, 22 Nov 2023 04:15:10 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87720D50 for ; Wed, 22 Nov 2023 01:15:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700644507; x=1732180507; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=RrwEo1VDHhlnf+Pa2Ly1JESTxjciztMmCHm/k/NWo+I=; b=IljyKAstK43LvtP3ihmH3gkFd9kZgSd220EieD2c1uV3u3TeDqbPLDeP EkdXpDwYuFrhA2aAgBfW5mRfa8H60jcarjXXdC/EwQyJjg15e+8vZRDdK e2mlC+GyqxK9GhM2BUCqbXLtsIzmK9PIrhcJgYqyhZgRwCbuDvC3RXxEe 3rQ/U9hnr8DoUBtPt6GHeGeuzY1swdnX+U5LRfcvJG/AGMtfSZEzkBO76 8ZEUiJiVdJYoyKhSApVAyujyWawagQheI4+8m65v4F/yLJBz5U2ZhDer/ 0cuZb3qj9Wztsabn0JL1WoZXsaHxAmSwnevQ4NTQeN7R738QgTmU7fIGK w==; X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="5158989" X-IronPort-AV: E=Sophos;i="6.04,218,1695711600"; d="scan'208";a="5158989" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 01:15:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="1098335938" X-IronPort-AV: E=Sophos;i="6.04,218,1695711600"; d="scan'208";a="1098335938" Received: from tjquresh-mobl.ger.corp.intel.com (HELO localhost) ([10.252.41.76]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 01:14:59 -0800 From: Jani Nikula To: Jiapeng Chong 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 , Mika Kahola Subject: Re: [PATCH] drm/i915/psr: Fix unsigned expression compared with zero In-Reply-To: <20231122085239.89046-1-jiapeng.chong@linux.alibaba.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20231122085239.89046-1-jiapeng.chong@linux.alibaba.com> Date: Wed, 22 Nov 2023 11:14:57 +0200 Message-ID: <87y1eqm9ny.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 01:15:27 -0800 (PST) On Wed, 22 Nov 2023, Jiapeng Chong wrote: > 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 There's already a patch. Mika, please follow up with it. https://patchwork.freedesktop.org/patch/msgid/20231116090512.480373-1-mika.kahola@intel.com > --- > 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 -- Jani Nikula, Intel