lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <BL1PR12MB51440A641758D0CA24E7F8B2F745A@BL1PR12MB5144.namprd12.prod.outlook.com>
Date: Fri, 27 Jun 2025 14:49:05 +0000
From: "Deucher, Alexander" <Alexander.Deucher@....com>
To: "long.yunjian@....com.cn" <long.yunjian@....com.cn>, "Wentland, Harry"
	<Harry.Wentland@....com>
CC: "Li, Sun peng (Leo)" <Sunpeng.Li@....com>, "siqueira@...lia.com"
	<siqueira@...lia.com>, "Koenig, Christian" <Christian.Koenig@....com>,
	"airlied@...il.com" <airlied@...il.com>, "simona@...ll.ch" <simona@...ll.ch>,
	"fang.yumeng@....com.cn" <fang.yumeng@....com.cn>,
	"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mou.yi@....com.cn" <mou.yi@....com.cn>, "xu.lifeng1@....com.cn"
	<xu.lifeng1@....com.cn>, "ouyang.maochun@....com.cn"
	<ouyang.maochun@....com.cn>
Subject: RE: [PATCH] drm/amd/display: Use str_on_off() helper

[Public]

> -----Original Message-----
> From: long.yunjian@....com.cn <long.yunjian@....com.cn>
> Sent: Friday, June 20, 2025 11:28 PM
> To: Wentland, Harry <Harry.Wentland@....com>
> Cc: Li, Sun peng (Leo) <Sunpeng.Li@....com>; siqueira@...lia.com; Deucher,
> Alexander <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; airlied@...il.com; simona@...ll.ch;
> fang.yumeng@....com.cn; amd-gfx@...ts.freedesktop.org; dri-
> devel@...ts.freedesktop.org; linux-kernel@...r.kernel.org; mou.yi@....com.cn;
> xu.lifeng1@....com.cn; ouyang.maochun@....com.cn
> Subject: [PATCH] drm/amd/display: Use str_on_off() helper
>
> From: Yumeng Fang <fang.yumeng@....com.cn>
>
> Remove hard-coded strings by using the str_on_off() helper.

I personally find that these helpers hurt readability.

Alex

>
> Signed-off-by: Yumeng Fang <fang.yumeng@....com.cn>
> ---
>  drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
> b/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
> index af21c0a27f86..509bdb1ca9bc 100644
> --- a/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
> +++ b/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
> @@ -24,6 +24,7 @@
>   *
>   */
>
> +#include <linux/string_choices.h>
>  #include "reg_helper.h"
>  #include "core_types.h"
>  #include "dcn35_pg_cntl.h"
> @@ -236,7 +237,7 @@ void pg_cntl35_hubp_dpp_pg_control(struct pg_cntl
> *pg_cntl, unsigned int hubp_dp
>       }
>
>       DC_LOG_DEBUG("HUBP DPP instance %d, power %s", hubp_dpp_inst,
> -             power_on ? "ON" : "OFF");
> +             str_on_off(power_on));
>
>       if (hubp_dpp_inst < MAX_PIPES) {
>               pg_cntl->pg_pipe_res_enable[PG_HUBP][hubp_dpp_inst] =
> power_on;
> --
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ