Skip to content

iio: Drop use of %hhx and %hx format strings

Jonathan Cameron linux-iio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 10 repliesIn review
  2. v14 patches 6 repliesSuperseded

Changes in v2 from the cover letter

Use 0x%02x (Joe Perches)
Include Arnd's original patch, modified for the above.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iio: si1133: fix format string warningsdrivers/iio/light/si1133.c+2 -21 reply
2/4iio: light: si1133: Drop remaining uses of %hhx format string.drivers/iio/light/si1133.c+7 -71 reply
3/4iio: imu: inv_mpu6050: Drop use of %hhx format string.drivers/iio/imu/inv_mpu6050/inv_mpu_core.c+2 -31 reply
4/4iio: light: si1145: Drop use of %hhx format specifier.drivers/iio/light/si1145.c+5 -51 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchNathan Chancellor
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] iio: Drop use of %hhx and %hx format strings

From: Jonathan Cameron <[email protected]>

A wrong use of one of these in
https://lore.kernel.org/linux-iio/[email protected]/
included a reference from Nathan to a patch discouraging the use of these strings in general:
https://lore.kernel.org/lkml/CAHk-=wgoxnmsj8GEVFJSvTwdnWm8wVJthefNk2n6+4TC=20e0Q@mail.gmail.com/

I did a quick grep and established we only have a few instances of these in IIO anyway, so in the interests of avoiding those existing cases getting cut and paste into new drivers, let's just clear them out now.

Note that patch from Arnd is now also part of this series, due to the length specifier related issue Joe raised.

I have chosen to go with 0x%02x rather than %#04x as I find it more readable.

V2:
Use 0x%02x (Joe Perches)
Include Arnd's original patch, modified for the above.

Arnd Bergmann (1):
iio: si1133: fix format string warnings

Jonathan Cameron (3):
iio: light: si1133: Drop remaining uses of %hhx format string.
iio: imu: inv_mpu6050: Drop use of %hhx format string.
iio: light: si1145: Drop use of %hhx format specifier.

 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c |  5 ++---
 drivers/iio/light/si1133.c                 | 18 +++++++++---------
 drivers/iio/light/si1145.c                 | 10 +++++-----
 3 files changed, 16 insertions(+), 17 deletions(-)
Signature · 1 line
2.31.1