Re: [PATCH v4 13/28] cxl/mem: Expose DCD partition capabilities in sysfs

From: Ira Weiny
Date: Sun Oct 13 2024 - 21:34:30 EST


Fan Ni wrote:
> On Mon, Oct 07, 2024 at 06:16:19PM -0500, ira.weiny@xxxxxxxxx wrote:
> > From: Navneet Singh <navneet.singh@xxxxxxxxx>
> >

[snip]

> > +
> > +static ssize_t show_read_only_dcN(struct cxl_memdev *cxlmd, char *buf, int pos)
> > +{
> > + struct cxl_memdev_state *mds = to_cxl_memdev_state(cxlmd->cxlds);
> > +
> > + return sysfs_emit(buf, "%s\n",
> > + str_false_true(mds->dc_region[pos].read_only));
>
> For this function and below, why str_false_true instead of
> str_true_false??
>

Oh! I did not realize they were not the same. That API is tricky.

Yea str_true_false() is the correct call.

Thanks for noticing that.
Ira