Commit 2685df67 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/ccwgroup: increase string buffer size

Avoid false positive warnings like this with gcc 7.1:

drivers/s390/cio/ccwgroup.c:41:21:
 warning: '%d' directive writing between 1 and 10 bytes into a region of size 4
   sprintf(str, "cdev%d", i);

and simply increase the size of the string buffer.
Reviewed-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 80ba3846
...@@ -35,7 +35,7 @@ static struct bus_type ccwgroup_bus_type; ...@@ -35,7 +35,7 @@ static struct bus_type ccwgroup_bus_type;
static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev)
{ {
int i; int i;
char str[8]; char str[16];
for (i = 0; i < gdev->count; i++) { for (i = 0; i < gdev->count; i++) {
sprintf(str, "cdev%d", i); sprintf(str, "cdev%d", i);
...@@ -238,7 +238,7 @@ static void ccwgroup_release(struct device *dev) ...@@ -238,7 +238,7 @@ static void ccwgroup_release(struct device *dev)
static int __ccwgroup_create_symlinks(struct ccwgroup_device *gdev) static int __ccwgroup_create_symlinks(struct ccwgroup_device *gdev)
{ {
char str[8]; char str[16];
int i, rc; int i, rc;
for (i = 0; i < gdev->count; i++) { for (i = 0; i < gdev->count; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment