summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus/visorchipset.c
diff options
context:
space:
mode:
authorDavid Binder2017-08-22 19:27:25 +0200
committerGreg Kroah-Hartman2017-08-23 00:14:54 +0200
commit6df555c13c156017eb93fe4e599058dd12e71369 (patch)
tree9a8d2c72d031129d68b4362553ab8b52178623ae /drivers/staging/unisys/visorbus/visorchipset.c
parentstaging: unisys: include: iochannel.h: Update comments for #defines (diff)
downloadkernel-qcow2-linux-6df555c13c156017eb93fe4e599058dd12e71369.tar.gz
kernel-qcow2-linux-6df555c13c156017eb93fe4e599058dd12e71369.tar.xz
kernel-qcow2-linux-6df555c13c156017eb93fe4e599058dd12e71369.zip
staging: unisys: visorbus: visorchipset.c: Fix SonarQube sprintf findings
Fixes two sprintf invocations where we attempt to format an unsigned integer as a signed integer. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 7094d629635c..1cedb3bbcafa 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -210,7 +210,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
&error, sizeof(u32));
if (err)
return err;
- return sprintf(buf, "%i\n", error);
+ return sprintf(buf, "%u\n", error);
}
static ssize_t error_store(struct device *dev, struct device_attribute *attr,
@@ -245,7 +245,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
if (err)
return err;
- return sprintf(buf, "%i\n", text_id);
+ return sprintf(buf, "%u\n", text_id);
}
static ssize_t textid_store(struct device *dev, struct device_attribute *attr,