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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <143f328f-52fb-41b2-9e46-08a390c3e47a@intel.com>
Date: Tue, 12 Aug 2025 17:02:45 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Nai-Chen Cheng <bleach1827@...il.com>, Davidlohr Bueso
 <dave@...olabs.net>, Jonathan Cameron <jonathan.cameron@...wei.com>,
 Alison Schofield <alison.schofield@...el.com>,
 Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
 Dan Williams <dan.j.williams@...el.com>
Cc: linux-cxl@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] cxl/region: use str_enabled_disabled() instead of tenary
 operator



On 8/11/25 9:49 AM, Nai-Chen Cheng wrote:
> Replace tenary operator with str_enabled_disabled() helper to enhance
> code readability and consistency.
> 
> Signed-off-by: Nai-Chen Cheng <bleach1827@...il.com>

Applied to cxl/next. Spelling mistakes noted by Alison fixed.
733c4e9bcec9

> ---
>  drivers/cxl/core/region.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index 71cc42d05248..83d58787b5af 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -10,6 +10,7 @@
>  #include <linux/sort.h>
>  #include <linux/idr.h>
>  #include <linux/memory-tiers.h>
> +#include <linux/string_choices.h>
>  #include <cxlmem.h>
>  #include <cxl.h>
>  #include "core.h"
> @@ -1468,9 +1469,7 @@ static int cxl_port_setup_targets(struct cxl_port *port,
>  				dev_name(port->uport_dev), dev_name(&port->dev),
>  				__func__, cxld->interleave_ways,
>  				cxld->interleave_granularity,
> -				(cxld->flags & CXL_DECODER_F_ENABLE) ?
> -					"enabled" :
> -					"disabled",
> +				str_enabled_disabled(cxld->flags & CXL_DECODER_F_ENABLE),
>  				cxld->hpa_range.start, cxld->hpa_range.end);
>  			return -ENXIO;
>  		}
> 
> ---
> base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
> change-id: 20250812-cxl-region-string-choices-f5aa9832346e
> 
> Best regards,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ