From: Erik Arfvidson Date: Wed, 13 Apr 2016 16:07:07 +0000 (-0400) Subject: staging: unisys: added display string size define X-Git-Tag: v4.7-rc1~90^2~249 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38d56c2fad91a02d289df40b029300310fb6c75a;p=platform%2Fkernel%2Flinux-exynos.git staging: unisys: added display string size define Display string size that is guaranteed to be no longer the 99 characters. Don't use a magic number throughout the code, define it once and use it throughout. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 547be8b..6216f4b 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -33,6 +33,9 @@ static int visorbus_forcenomatch; static int visorbus_debugref; #define SERIALLOOPBACKCHANADDR (100 * 1024 * 1024) +/* Display string that is guaranteed to be no longer the 99 characters*/ +#define LINESIZE 99 + #define CURRENT_FILE_PC VISOR_BUS_PC_visorbus_main_c #define POLLJIFFIES_TESTWORK 100 #define POLLJIFFIES_NORMALCHANNEL 10 @@ -279,7 +282,7 @@ static ssize_t typeguid_show(struct device *dev, struct device_attribute *attr, char *buf) { struct visor_device *vdev = to_visor_device(dev); - char typeid[99]; + char typeid[LINESIZE]; if (!vdev->visorchannel) return 0; @@ -291,7 +294,7 @@ static ssize_t zoneguid_show(struct device *dev, struct device_attribute *attr, char *buf) { struct visor_device *vdev = to_visor_device(dev); - char zoneid[99]; + char zoneid[LINESIZE]; if (!vdev->visorchannel) return 0;