Skip to contentSkip to conversation

cdx: change struct bus_type for sysfs rescan callback as constant

PATCH In review Nipun Gupta 2 participants 2 messages Apr 3, 2023 AMD cdx bus driver

lore
Share & tools
lore

Nipun Gupta

author maintainer
#0 lore raw

PATCH 1/1 cdx: change struct bus_type for sysfs rescan callback as constant

As store prototype in struct bus_attribute has been updated to have bus_type as constant, change the CDX sysfs entries to follow the same.

---

The bus attributes are marked as constant in patch:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=75cff725d9566699a670a02b3cfd1c6e9e9ed53e

 drivers/cdx/cdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cdx/cdx.c +1 -1
index 67c32cb2c006..38511fd36325 100644
@@ -363,7 +363,7 @@ static struct attribute *cdx_dev_attrs[] = {
 };
 ATTRIBUTE_GROUPS(cdx_dev);
 
-static ssize_t rescan_store(struct bus_type *bus,
+static ssize_t rescan_store(const struct bus_type *bus,
 			    const char *buf, size_t count)
 {
 	struct cdx_controller *cdx;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 29 lines · Nipun Gupta

As store prototype in struct bus_attribute has been updated to have bus_type as constant, change the CDX sysfs entries to follow the same.

---

The bus attributes are marked as constant in patch:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=75cff725d9566699a670a02b3cfd1c6e9e9ed53e

 drivers/cdx/cdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cdx/cdx.c +1 -1
index 67c32cb2c006..38511fd36325 100644
@@ -363,7 +363,7 @@ static struct attribute *cdx_dev_attrs[] = {
 };
 ATTRIBUTE_GROUPS(cdx_dev);
 
-static ssize_t rescan_store(struct bus_type *bus,
+static ssize_t rescan_store(const struct bus_type *bus,
 			    const char *buf, size_t count)
 {
 	struct cdx_controller *cdx;
Signature · 1 line
2.17.1

Thanks, I'll hold onto this for the -rc1 merge.

greg k-h