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

From: Suzuki K Poulose
Date: Wed Jun 26 2019 - 04:47:05 EST


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

Reported-by: kbuild test robot <lkp@xxxxxxxxx>
Cc: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: devel@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
---
drivers/s390/cio/ccwgroup.c | 2 +-
drivers/s390/cio/device.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index ea176157..c522e93 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -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);
}
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index f27536b..1132482 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -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);
}
--
2.7.4