Commit 38d56c2f authored by Erik Arfvidson's avatar Erik Arfvidson Committed by Greg Kroah-Hartman

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: default avatarErik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a957193
...@@ -33,6 +33,9 @@ static int visorbus_forcenomatch; ...@@ -33,6 +33,9 @@ static int visorbus_forcenomatch;
static int visorbus_debugref; static int visorbus_debugref;
#define SERIALLOOPBACKCHANADDR (100 * 1024 * 1024) #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 CURRENT_FILE_PC VISOR_BUS_PC_visorbus_main_c
#define POLLJIFFIES_TESTWORK 100 #define POLLJIFFIES_TESTWORK 100
#define POLLJIFFIES_NORMALCHANNEL 10 #define POLLJIFFIES_NORMALCHANNEL 10
...@@ -279,7 +282,7 @@ static ssize_t typeguid_show(struct device *dev, struct device_attribute *attr, ...@@ -279,7 +282,7 @@ static ssize_t typeguid_show(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct visor_device *vdev = to_visor_device(dev); struct visor_device *vdev = to_visor_device(dev);
char typeid[99]; char typeid[LINESIZE];
if (!vdev->visorchannel) if (!vdev->visorchannel)
return 0; return 0;
...@@ -291,7 +294,7 @@ static ssize_t zoneguid_show(struct device *dev, struct device_attribute *attr, ...@@ -291,7 +294,7 @@ static ssize_t zoneguid_show(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct visor_device *vdev = to_visor_device(dev); struct visor_device *vdev = to_visor_device(dev);
char zoneid[99]; char zoneid[LINESIZE];
if (!vdev->visorchannel) if (!vdev->visorchannel)
return 0; return 0;
......
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