Re: [PATCH v5 6/7] cxl: Add cxl_reset sysfs interface for PCI devices

From: Krzysztof Wilczyński

Date: Sat Mar 14 2026 - 16:39:58 EST


Hello,

> +static ssize_t cxl_reset_store(struct device *dev,
> + struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
> + struct pci_dev *pdev = to_pci_dev(dev);
> + int rc;
> +
> + if (!sysfs_streq(buf, "1"))
> + return -EINVAL;

Not sure what would the pattern/approach be for CXL sysfs entires, but
perhaps using kstrtobool() would work here? It handles all the boolean
types user could pass.

Thank you,

Krzysztof