Skip to contentSkip to conversation

drivers: s390/cio: Fix compilation warning about const qualifiers

PATCH New Suzuki K Poulose 1 participant 1 message Jun 26, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 drivers: s390/cio: Fix compilation warning about const qualifiers

Update __ccwdev_check_busid() and __ccwgroupdev_check_busid() to use "const" qualifiers to fix the compiler warning.

---
 drivers/s390/cio/ccwgroup.c | 2 +-
 drivers/s390/cio/device.c   | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/s390/cio/ccwgroup.c +1 -1
index ea176157..c522e93 100644
@@ -610,7 +610,7 @@ EXPORT_SYMBOL(ccwgroup_driver_unregister);
 
 static int __ccwgroupdev_check_busid(struct device *dev, const void *id)
 {
-	char *bus_id = id;
+	const char *bus_id = id;
 
 	return (strcmp(bus_id, dev_name(dev)) == 0);
 }
drivers/s390/cio/device.c +1 -3
index f27536b..1132482 100644
@@ -1655,9 +1655,7 @@ EXPORT_SYMBOL_GPL(ccw_device_force_console);
 static int
 __ccwdev_check_busid(struct device *dev, const void *id)
 {
-	char *bus_id;
-
-	bus_id = id;
+	const char *bus_id = id;
 
 	return (strcmp(bus_id, dev_name(dev)) == 0);
 }
Signature · 1 line
2.7.4