From: David Binder Date: Tue, 22 Aug 2017 17:27:25 +0000 (-0400) Subject: staging: unisys: visorbus: visorchipset.c: Fix SonarQube sprintf findings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6df555c13c156017eb93fe4e599058dd12e71369;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman --- 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,