mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu Jiaoliang <yujiaoliang@vivo.com>
To: Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
	Xinhui Pan <Xinhui.Pan@amd.com>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	Hamza Mahfooz <hamza.mahfooz@amd.com>,
	Alex Hung <alex.hung@amd.com>,
	Dillon Varone <dillon.varone@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: [PATCH v1 1/6] drm/amd/display: Use max/min macro
Date: Thu, 22 Aug 2024 14:57:18 +0800	[thread overview]
Message-ID: <20240822065723.1336181-2-yujiaoliang@vivo.com> (raw)
In-Reply-To: <20240822065723.1336181-1-yujiaoliang@vivo.com>

Use the macro instead of ternary operator.

Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 3bacf470f7c5..f8c1650eb21f 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -2300,8 +2300,8 @@ static enum bp_result get_integrated_info_v8(
 		le32_to_cpu(info_v8->ulNbpStateNClkFreq[0]);
 	for (i = 1; i < 4; ++i)
 		info->minimum_n_clk =
-			info->minimum_n_clk < le32_to_cpu(info_v8->ulNbpStateNClkFreq[i]) ?
-			info->minimum_n_clk : le32_to_cpu(info_v8->ulNbpStateNClkFreq[i]);
+			min(info->minimum_n_clk,
+			    le32_to_cpu(info_v8->ulNbpStateNClkFreq[i]));
 
 	info->idle_n_clk = le32_to_cpu(info_v8->ulIdleNClk);
 	info->ddr_dll_power_up_time =
-- 
2.34.1


  reply	other threads:[~2024-08-22  6:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  6:57 [PATCH v1 0/6] " Yu Jiaoliang
2024-08-22  6:57 ` Yu Jiaoliang [this message]
2024-08-22  6:57 ` [PATCH v1 2/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 3/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 4/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 5/6] " Yu Jiaoliang
2024-08-22  6:57 ` [PATCH v1 6/6] " Yu Jiaoliang
2024-08-22  9:45 ` [PATCH v1 0/6] " 于佼良
2024-08-22 18:34 ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2024-08-22  6:54 Yu Jiaoliang
2024-08-22  6:54 ` [PATCH v1 1/6] " Yu Jiaoliang
2024-08-22  6:51 [PATCH v1 0/6] " Yu Jiaoliang
2024-08-22  6:51 ` [PATCH v1 1/6] " Yu Jiaoliang
2024-08-22  6:29 [PATCH v1 0/6] " Yu Jiaoliang
2024-08-22  6:29 ` [PATCH v1 1/6] " Yu Jiaoliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240822065723.1336181-2-yujiaoliang@vivo.com \
    --to=yujiaoliang@vivo.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dillon.varone@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamza.mahfooz@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®