diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-12-04 21:30:09 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-12-04 16:23:36 -0800 |
commit | 2f3db927cdf7627aa5359ff46c80ab72f7971980 (patch) | |
tree | 62cb682c89f4981053412bc149b9fef27750f50a /drivers/staging/greybus/bundle.c | |
parent | 4aac6c5a144921448237d2a2bff50d4fba0b0faf (diff) |
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/bundle.c')
-rw-r--r-- | drivers/staging/greybus/bundle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index 3df7d5f915f9..97a8195ab035 100644 --- a/drivers/staging/greybus/bundle.c +++ b/drivers/staging/greybus/bundle.c @@ -128,7 +128,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, * the interface bundle list locked here. */ if (gb_bundle_find(intf, bundle_id)) { - pr_err("duplicate bundle id 0x%02hhx\n", bundle_id); + pr_err("duplicate bundle id 0x%02x\n", bundle_id); return NULL; } @@ -152,7 +152,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, retval = device_add(&bundle->dev); if (retval) { - pr_err("failed to add bundle device for id 0x%02hhx\n", + pr_err("failed to add bundle device for id 0x%02x\n", bundle_id); put_device(&bundle->dev); return NULL; |