diff mbox series

[4/4] iio: chemical: sgp30: Drop use of %hx in format string.

Message ID 20210517125554.1463156-5-jic23@kernel.org (mailing list archive)
State Accepted
Headers show
Series iio: Drop use of %hhx and %hx format strings | expand

Commit Message

Jonathan Cameron May 17, 2021, 12:55 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Since:
commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
unnecessary %h[xudi] and %hh[xudi]")
use of these format strings has been discouraged.

As there are only a few such uses in IIO, lets clear them all out and
avoid chance of them getting copied into new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Andreas Brauchli <andreas.brauchli@sensirion.com>
---
 drivers/iio/chemical/sgp30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nathan Chancellor May 17, 2021, 5:13 p.m. UTC | #1
On 5/17/2021 5:55 AM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Since:
> commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
> unnecessary %h[xudi] and %hh[xudi]")
> use of these format strings has been discouraged.
> 
> As there are only a few such uses in IIO, lets clear them all out and
> avoid chance of them getting copied into new drivers.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Andreas Brauchli <andreas.brauchli@sensirion.com>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>   drivers/iio/chemical/sgp30.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/chemical/sgp30.c b/drivers/iio/chemical/sgp30.c
> index 1029c457be15..2343d444604d 100644
> --- a/drivers/iio/chemical/sgp30.c
> +++ b/drivers/iio/chemical/sgp30.c
> @@ -425,7 +425,7 @@ static int sgp_check_compat(struct sgp_data *data,
>   
>   	product = SGP_VERS_PRODUCT(data);
>   	if (product != product_id) {
> -		dev_err(dev, "sensor reports a different product: 0x%04hx\n",
> +		dev_err(dev, "sensor reports a different product: 0x%04x\n",
>   			product);
>   		return -ENODEV;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/iio/chemical/sgp30.c b/drivers/iio/chemical/sgp30.c
index 1029c457be15..2343d444604d 100644
--- a/drivers/iio/chemical/sgp30.c
+++ b/drivers/iio/chemical/sgp30.c
@@ -425,7 +425,7 @@  static int sgp_check_compat(struct sgp_data *data,
 
 	product = SGP_VERS_PRODUCT(data);
 	if (product != product_id) {
-		dev_err(dev, "sensor reports a different product: 0x%04hx\n",
+		dev_err(dev, "sensor reports a different product: 0x%04x\n",
 			product);
 		return -ENODEV;
 	}