All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: "Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"Maxime Roussin-Bélanger" <maxime.roussinbelanger@gmail.com>,
	"Nathan Chancellor" <nathan@kernel.org>
Subject: [PATCH 2/4] iio: light: si1133: Drop remaining uses of %hhx format string.
Date: Mon, 17 May 2021 13:55:52 +0100	[thread overview]
Message-ID: <20210517125554.1463156-3-jic23@kernel.org> (raw)
In-Reply-To: <20210517125554.1463156-1-jic23@kernel.org>

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 not that many in IIO, this is part of an effort to clear
them out so we don't have any instances that might get coppied into
new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Cc: Nathan Chancellor <nathan@kernel.org>
---
 drivers/iio/light/si1133.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/iio/light/si1133.c b/drivers/iio/light/si1133.c
index fd302480262b..0af36176907d 100644
--- a/drivers/iio/light/si1133.c
+++ b/drivers/iio/light/si1133.c
@@ -352,22 +352,22 @@ static int si1133_parse_response_err(struct device *dev, u32 resp, u8 cmd)
 
 	switch (resp) {
 	case SI1133_ERR_OUTPUT_BUFFER_OVERFLOW:
-		dev_warn(dev, "Output buffer overflow: %#02hhx\n", cmd);
+		dev_warn(dev, "Output buffer overflow: %#02x\n", cmd);
 		return -EOVERFLOW;
 	case SI1133_ERR_SATURATION_ADC_OR_OVERFLOW_ACCUMULATION:
-		dev_warn(dev, "Saturation of the ADC or overflow of accumulation: %#02hhx\n",
+		dev_warn(dev, "Saturation of the ADC or overflow of accumulation: %#02x\n",
 			 cmd);
 		return -EOVERFLOW;
 	case SI1133_ERR_INVALID_LOCATION_CMD:
 		dev_warn(dev,
-			 "Parameter access to an invalid location: %#02hhx\n",
+			 "Parameter access to an invalid location: %#02x\n",
 			 cmd);
 		return -EINVAL;
 	case SI1133_ERR_INVALID_CMD:
-		dev_warn(dev, "Invalid command %#02hhx\n", cmd);
+		dev_warn(dev, "Invalid command %#02x\n", cmd);
 		return -EINVAL;
 	default:
-		dev_warn(dev, "Unknown error %#02hhx\n", cmd);
+		dev_warn(dev, "Unknown error %#02x\n", cmd);
 		return -EINVAL;
 	}
 }
@@ -400,7 +400,7 @@ static int si1133_command(struct si1133_data *data, u8 cmd)
 
 	err = regmap_write(data->regmap, SI1133_REG_COMMAND, cmd);
 	if (err) {
-		dev_warn(dev, "Failed to write command %#02hhx, ret=%d\n", cmd,
+		dev_warn(dev, "Failed to write command %#02x, ret=%d\n", cmd,
 			 err);
 		goto out;
 	}
@@ -425,7 +425,7 @@ static int si1133_command(struct si1133_data *data, u8 cmd)
 					       SI1133_CMD_TIMEOUT_MS * 1000);
 		if (err) {
 			dev_warn(dev,
-				 "Failed to read command %#02hhx, ret=%d\n",
+				 "Failed to read command %#02x, ret=%d\n",
 				 cmd, err);
 			goto out;
 		}
-- 
2.31.1


  parent reply	other threads:[~2021-05-17 12:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 12:55 [RESEND PATCH 0/4] iio: Drop use of %hhx and %hx format strings Jonathan Cameron
2021-05-17 12:55 ` [PATCH 1/4] iio: imu: inv_mpu6050: Drop use of %hhx format string Jonathan Cameron
2021-05-17 17:00   ` Nathan Chancellor
2021-05-17 12:55 ` Jonathan Cameron [this message]
2021-05-17 17:12   ` [PATCH 2/4] iio: light: si1133: Drop remaining uses " Nathan Chancellor
2021-05-17 12:55 ` [PATCH 3/4] iio: light: si1145: Drop use of %hhx format specifier Jonathan Cameron
2021-05-17 17:12   ` Nathan Chancellor
2021-05-17 12:55 ` [PATCH 4/4] iio: chemical: sgp30: Drop use of %hx in format string Jonathan Cameron
2021-05-17 17:13   ` Nathan Chancellor
2021-05-22 18:20 ` [RESEND PATCH 0/4] iio: Drop use of %hhx and %hx format strings Jonathan Cameron
2021-06-03 18:08   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210517125554.1463156-3-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=maxime.roussinbelanger@gmail.com \
    --cc=nathan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.