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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0d2a954-45ea-9b51-678d-0e501d7e2bdd@amd.com>
Date:   Wed, 26 Jan 2022 09:35:59 -0500
From:   Harry Wentland <harry.wentland@....com>
To:     Lucas De Marchi <lucas.demarchi@...el.com>,
        linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org,
        linux-security-module@...r.kernel.org,
        nouveau@...ts.freedesktop.org, netdev@...r.kernel.org
Cc:     Alex Deucher <alexander.deucher@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Ben Skeggs <bskeggs@...hat.com>,
        Christian König <christian.koenig@....com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        "David S. Miller" <davem@...emloft.net>,
        Emma Anholt <emma@...olt.net>,
        Francis Laniel <laniel_francis@...vacyrequired.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Julia Lawall <julia.lawall@...6.fr>,
        Kentaro Takeda <takedakn@...data.co.jp>,
        Leo Li <sunpeng.li@....com>, Petr Mladek <pmladek@...e.com>,
        Rahul Lakkireddy <rahul.lakkireddy@...lsio.com>,
        Raju Rangoju <rajur@...lsio.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Vishal Kulkarni <vishal@...lsio.com>
Subject: Re: [PATCH v2 07/11] drm/amd/display: Use str_yes_no()

On 2022-01-26 04:39, Lucas De Marchi wrote:
> Remove the local yesno() implementation and adopt the str_yes_no() from
> linux/string_helpers.h.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@...el.com>

Reviewed-by: Harry Wentland <harry.wentland@....com>

Harry

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c  | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> index 26719efa5396..5ff1076b9130 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> @@ -23,6 +23,7 @@
>   *
>   */
>  
> +#include <linux/string_helpers.h>
>  #include <linux/uaccess.h>
>  
>  #include "dc.h"
> @@ -49,11 +50,6 @@ struct dmub_debugfs_trace_entry {
>  	uint32_t param1;
>  };
>  
> -static inline const char *yesno(bool v)
> -{
> -	return v ? "yes" : "no";
> -}
> -
>  /* parse_write_buffer_into_params - Helper function to parse debugfs write buffer into an array
>   *
>   * Function takes in attributes passed to debugfs write entry
> @@ -853,12 +849,12 @@ static int psr_capability_show(struct seq_file *m, void *data)
>  	if (!(link->connector_signal & SIGNAL_TYPE_EDP))
>  		return -ENODEV;
>  
> -	seq_printf(m, "Sink support: %s", yesno(link->dpcd_caps.psr_caps.psr_version != 0));
> +	seq_printf(m, "Sink support: %s", str_yes_no(link->dpcd_caps.psr_caps.psr_version != 0));
>  	if (link->dpcd_caps.psr_caps.psr_version)
>  		seq_printf(m, " [0x%02x]", link->dpcd_caps.psr_caps.psr_version);
>  	seq_puts(m, "\n");
>  
> -	seq_printf(m, "Driver support: %s", yesno(link->psr_settings.psr_feature_enabled));
> +	seq_printf(m, "Driver support: %s", str_yes_no(link->psr_settings.psr_feature_enabled));
>  	if (link->psr_settings.psr_version)
>  		seq_printf(m, " [0x%02x]", link->psr_settings.psr_version);
>  	seq_puts(m, "\n");
> @@ -1207,8 +1203,8 @@ static int dp_dsc_fec_support_show(struct seq_file *m, void *data)
>  	drm_modeset_drop_locks(&ctx);
>  	drm_modeset_acquire_fini(&ctx);
>  
> -	seq_printf(m, "FEC_Sink_Support: %s\n", yesno(is_fec_supported));
> -	seq_printf(m, "DSC_Sink_Support: %s\n", yesno(is_dsc_supported));
> +	seq_printf(m, "FEC_Sink_Support: %s\n", str_yes_no(is_fec_supported));
> +	seq_printf(m, "DSC_Sink_Support: %s\n", str_yes_no(is_dsc_supported));
>  
>  	return ret;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ