summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/hid.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-12-04 21:30:09 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-12-04 16:23:36 -0800
commit2f3db927cdf7627aa5359ff46c80ab72f7971980 (patch)
tree62cb682c89f4981053412bc149b9fef27750f50a /drivers/staging/greybus/hid.c
parent4aac6c5a144921448237d2a2bff50d4fba0b0faf (diff)
downloadop-kernel-dev-2f3db927cdf7627aa5359ff46c80ab72f7971980.zip
op-kernel-dev-2f3db927cdf7627aa5359ff46c80ab72f7971980.tar.gz
greybus: don't use %h and %hh for printing short and char variables
Because the width of our fields is already known, we can use %0Nx (for hex) to print N bytes and %u (for unsigned decimal), instead of using %h and %hh, which isn't that readable. This patch makes following changes: - s/%hx/%04x - s/%04hx/%04x - s/%hhx/%02x - s/%02hhx/%02x - s/%hhu/%u - s/%hu/%u - s/%x/%02x for u8 value (only at a single place) Suggested-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/hid.c')
-rw-r--r--drivers/staging/greybus/hid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c
index 2adcb1c..f45b444 100644
--- a/drivers/staging/greybus/hid.c
+++ b/drivers/staging/greybus/hid.c
@@ -411,7 +411,7 @@ static int gb_hid_init(struct gb_hid *ghid)
// hid->bus = BUS_GREYBUS; /* Need a bustype for GREYBUS in <linux/input.h> */
/* Set HID device's name */
- snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
+ snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X",
dev_name(&ghid->connection->bundle->dev),
hid->vendor, hid->product);
OpenPOWER on IntegriCloud