Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp258821lqt; Thu, 6 Jun 2024 02:43:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUR4n0J/Z4l+wKmbtPdDKh74JIH/7qZo+jISz6C83SeosSEyqJTXUfwAVULftJR87/lKRww24dmX0B+Wh9xVRbX5XsF5GcgDLZ7LIE/oA== X-Google-Smtp-Source: AGHT+IHWEM9hZvrCROxf5DX0Rq3zE9LHryUUKR4f481lh0ws4KKN5gNGlgoRtyYQssQ6LM2KUMca X-Received: by 2002:a17:906:6c8d:b0:a6a:6ed0:fbdc with SMTP id a640c23a62f3a-a6a6ed0feb0mr315320166b.38.1717667006879; Thu, 06 Jun 2024 02:43:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717667006; cv=pass; d=google.com; s=arc-20160816; b=ZhO8lS9rwdd8GaSgjOobc5WAptDy6PYlAQvFsg1bNG3Poxv2cpff+ClQu6ger8XlCa jdJ049DkDOZYfO0X58+7oA8GiapnjFKEZ6KR3KjAo0FgP2CFDF+il83FkNn+4tRdsSCG 3uYw7esvF+Twr1LKtJdYnFII5C9eoEwapyGi2DQC0fcVJyiUQEaMbqljDyuZoca9ede4 zr9TaaJReIOXuJb2zDH4hZ+8NsbYyxKPV3dOWWQKFGSfxDQWg3OnsbiE/R4r3mIqTE7T sb+46g8sMTHj7PcJqARhIemJmqBuYJwKXMC1V2Z8nPkUUPIEGEa1ZJhotUgCoqaX6db1 EQww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=IlMHYdHpbSsMWZFdyT0K8Fjv839Jpj+HUlzJKS7Co+k=; fh=+wvxq/dfMzCJ5kHMlxzHdQXml3eoHP4LUmjd0gcI5S8=; b=w/mE+/0tur97NHNfb7juggCr+F82K7SGknPjPbaZ8DjRBMxeYIcUMCjPt+N0g5P4U4 ezP/8UWV9QcaDT7JOa4slNVIte8tnVC7vddDIIt0xcfBATCtFZHbvbuhpHWD5zNLrnaT n/hCVfjxagbGyu/nHTWBtfCwtUwv5faY1bxW7JmWj2Jh50uXwYgBZ8/JoWyoY889GgNe XXkiBLWVrbn/Gf6QGybKezW1xsvpz4KjKwXGAZDzcGs22pBMrOz19H0qBZhaCWiSjzq/ W29cTUFEF1XkY+yyzbeWSwJCQCIIC+hID5AlF9Sk5O6Ys7UdmzYQ8MwMj0e5U+E1wWgc FJ8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b="aMaWLn/w"; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-204035-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204035-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c806dba68si50491966b.373.2024.06.06.02.43.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:43:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204035-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b="aMaWLn/w"; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-204035-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204035-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7F4F21F25EDA for ; Thu, 6 Jun 2024 09:43:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E7FF15358A; Thu, 6 Jun 2024 09:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b="aMaWLn/w" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B26041527AA for ; Thu, 6 Jun 2024 09:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717666953; cv=none; b=YGVqRnzr4DMJ48gTt3DCxwuKw5Znhm6mRe6KktWRF4hzK0mlXlGIjixSCl9aYNtooOyPJPkFcxiPWSlxMwmdnGC4sMnmRLOZtwcyfhvZDSnVwBg0UkyTkN0bh8GwKNyHHdQgSKkbawCMJOKvAeBuO+ivDq6kjMPUmAOfzfxZ9RM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717666953; c=relaxed/simple; bh=jDmBVfK2MYsGKoNBHduFQEVdd1eqDCsRjnw4Roo+lL8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=jWJiJNDlDowXLC2PZYzAKQw8HxAFIWIQSX6LTmI0NJ2PK8FHzR0DAwDefqbjTqh+PxJJoN8ITy/peE7F6VIL76dQfVPaJj32z2I6J251f2njC43bFUnXvTF47WQZXUSJeRJcALyI9zu7Ag3KIF/SmZCWeFPqi+lf1hIbKEgjlYQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com; spf=none smtp.mailfrom=toblux.com; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b=aMaWLn/w; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=toblux.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a68c8b90c85so91654366b.2 for ; Thu, 06 Jun 2024 02:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1717666949; x=1718271749; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IlMHYdHpbSsMWZFdyT0K8Fjv839Jpj+HUlzJKS7Co+k=; b=aMaWLn/w6m2/WGInge5lgFpoR+oO2tc35JuYuU1ytz37MJgSW239HQHZIHgeMNzIha gJVLSBTZwZGgEMj7nIKEblznMIqlw5b3JEPT8/+PiGCsCANHIzPnKTrfzJ5ZmMZ9eics ydi/76Lv4y8qZtwzicoSU5mHFd9m90G++FN/6PyMuV9+sqHcotsSe3xvK2wK6ySQ2fV3 eXao+ebzDc8h7e6J5aHnPOan97oWQp2hBGyoc1ElcxQM1+H4M1Yg8digSlx4EQEhMoDD ECFoYdLVbyxo104RCnIf9paKfV3SAtrEM7JJ/pVRZ+7DePzG3dVjEbf4Fz8pOLwWT2hc rZkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717666949; x=1718271749; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IlMHYdHpbSsMWZFdyT0K8Fjv839Jpj+HUlzJKS7Co+k=; b=W3eaYRL6EbByYs6VPxBh0Dt2tfwKBeuh/vANo48eZwh9c3vwHrXb0x4t2sERHoIORr O0mVf6GedTc1tGuPKJnFZyB+0mWBDuEFMuaG0ry0pqaSt4e/U+f6S9vCIpgTCS4UWyrL t6B0NbfIWPsWYa5KdDnZmPCtvWHurgSM4PTDAjh+YLwHkUecGRtKXpYwnSObrSLgVRX2 1FjCiJ7WWPSzZ032sF24zKyWWQ+b62AyRivNT3tvsZiiq097aAYPUi4OjnewIdiPGA9E l4z2eHmD5Eqze03W+xa0NEv0BTgLqlWxR9KDqMmoMk+2p4SlIKOOmJvZE1mIYO25Ns7n pFEQ== X-Forwarded-Encrypted: i=1; AJvYcCVf3v4CZwYd9NLWISJB9ljeJ00r7D8xdH+M0F/Wns45ZRZm9VThc2fTkwzQVJ9OW1aVS7BtWzgDLXsn76Ty0xIdGTg88GaKoAjFGygo X-Gm-Message-State: AOJu0YzUAeWlUDQ3Tf6HAFNLzB7uuly0Ab2/e19K4BBM25AlFhiGpeOO 1qaIaKBLGlqpIpSmItZAmUoDNFUcNpYbIZeZhV2ab069xffX930TlxrFuUUz7I8= X-Received: by 2002:a17:906:f9d7:b0:a69:65a7:420d with SMTP id a640c23a62f3a-a699f88afb4mr409714366b.35.1717666949091; Thu, 06 Jun 2024 02:42:29 -0700 (PDT) Received: from debian.fritz.box. (aftr-82-135-80-164.dynamic.mnet-online.de. [82.135.80.164]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c80728867sm71303266b.192.2024.06.06.02.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:42:28 -0700 (PDT) From: Thorsten Blum To: harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: stylon.wang@amd.com, roman.li@amd.com, Qingqing.Zhuo@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH] drm/amd/display: Fix dml_print_mode_support() for USRRetrainingSupport Date: Thu, 6 Jun 2024 11:39:44 +0200 Message-Id: <20240606093942.103123-1-thorsten.blum@toblux.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The address of a struct field is usually not NULL, making this test always truthy. Test the boolean value instead. Fixes the following Coccinelle/coccicheck error reported by test_addr.cocci: ERROR: test of a variable/field address Compile-tested only. Signed-off-by: Thorsten Blum --- drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c index c247aee89caf..a98ec059725a 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c @@ -404,7 +404,7 @@ void dml_print_mode_support(struct display_mode_lib_st *mode_lib, dml_uint_t j) dml_print("DML: MODE SUPPORT: Host VM or Immediate Flip Supported : %s\n", ((mode_lib->ms.cache_display_cfg.plane.HostVMEnable == false && !mode_lib->scratch.dml_core_mode_support_locals.ImmediateFlipRequiredFinal) || mode_lib->ms.support.ImmediateFlipSupportedForState[j]) ? "Supported" : "NOT Supported"); dml_print("DML: MODE SUPPORT: dram clock change support : %s\n", mode_lib->scratch.dml_core_mode_support_locals.dram_clock_change_support == true ? "Supported" : "NOT Supported"); dml_print("DML: MODE SUPPORT: f_clock change support : %s\n", mode_lib->scratch.dml_core_mode_support_locals.f_clock_change_support == true ? "Supported" : "NOT Supported"); - dml_print("DML: MODE SUPPORT: USR Retraining Support : %s\n", (!mode_lib->ms.policy.USRRetrainingRequiredFinal || &mode_lib->ms.support.USRRetrainingSupport[j]) ? "Supported" : "NOT Supported"); + dml_print("DML: MODE SUPPORT: USR Retraining Support : %s\n", (!mode_lib->ms.policy.USRRetrainingRequiredFinal || mode_lib->ms.support.USRRetrainingSupport[j]) ? "Supported" : "NOT Supported"); dml_print("DML: MODE SUPPORT: ===============================================\n"); } -- 2.39.2