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

Ira Weiny
2024-10-14T01:34:18Z

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

[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