From patchwork Mon May 17 12:55:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12261835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01E5DC433ED for ; Mon, 17 May 2021 12:56:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4CC16117A for ; Mon, 17 May 2021 12:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231543AbhEQM6G (ORCPT ); Mon, 17 May 2021 08:58:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:37372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbhEQM6F (ORCPT ); Mon, 17 May 2021 08:58:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3677161073; Mon, 17 May 2021 12:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621256209; bh=12u/f7DcSJhFqzlq6STtwznafBpD8dd6X1qU4vyjFZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TOE1TiDKX2aW+T7SzGL5bAT5IGiTuIi/HSc+o+wUG5spR+qxR7/P8IEpzCtKOsbxD cpsxIY6QHnszu6+ljaYbbfTzQGE3t5y5USZnpXBLsVRBTWKdeU3oSafF7xHd1JZysz SYfWFMPEz2fdWfdXXFJYQX/1DvbQXzolhNvZp67qSz2bSMuU1O6Eb4FKX+kms+aRCI Vdx37e2r2hBvPzvme3U7DlxS/d+xcg2MsC5Edapz+G4y+eeT0i6M2G/TWHjN1fNQ6d jwOucpZzu59KmH4GSiHFPCETD0+emt2nXcZzNfWdV4Zq4OgWYjwM+COPZgOzPLeGd7 mapDZcAk1KHPw== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Nathan Chancellor Subject: [PATCH 1/4] iio: imu: inv_mpu6050: Drop use of %hhx format string. Date: Mon, 17 May 2021 13:55:51 +0100 Message-Id: <20210517125554.1463156-2-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517125554.1463156-1-jic23@kernel.org> References: <20210517125554.1463156-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Since: commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") use of these format strings has been discouraged. Part of a series removing all uses from IIO in the interestings of avoiding providing bad examples for people to copy. Signed-off-by: Jonathan Cameron Cc: Nathan Chancellor Reviewed-by: Nathan Chancellor --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 6244a07048df..3169d3153b83 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -1314,8 +1314,7 @@ static int inv_check_and_setup_chip(struct inv_mpu6050_state *st) for (i = 0; i < INV_NUM_PARTS; ++i) { if (regval == hw_info[i].whoami) { dev_warn(regmap_get_device(st->map), - "whoami mismatch got %#02x (%s)" - "expected %#02hhx (%s)\n", + "whoami mismatch got %#02x (%s) expected %#02x (%s)\n", regval, hw_info[i].name, st->hw->whoami, st->hw->name); break; @@ -1323,7 +1322,7 @@ static int inv_check_and_setup_chip(struct inv_mpu6050_state *st) } if (i >= INV_NUM_PARTS) { dev_err(regmap_get_device(st->map), - "invalid whoami %#02x expected %#02hhx (%s)\n", + "invalid whoami %#02x expected %#02x (%s)\n", regval, st->hw->whoami, st->hw->name); return -ENODEV; } From patchwork Mon May 17 12:55:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12261837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB2E4C433B4 for ; Mon, 17 May 2021 12:56:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5C706117A for ; Mon, 17 May 2021 12:56:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233280AbhEQM6I (ORCPT ); Mon, 17 May 2021 08:58:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:37446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbhEQM6I (ORCPT ); Mon, 17 May 2021 08:58:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26F9F61166; Mon, 17 May 2021 12:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621256211; bh=vGIT9QSwC44jhqUJ144/B52brXDnOnPCFWNwmbGm8ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hlpjdU9j+rCIHio1PrtGSsliONMezOE3Qm+8Tc9DRUIKihfYYsXQ21BSzDrrCsJhV aRKQBLCmda+PU0rsGSic7qidymR8vTJ8dcfFCZ1E8D4PExDx4kARO3bH4fJW0F8f7q gMBKdJZT3Gcd6aKEtlIX7itf2F3KxzyS6IieSC90Pjk6w7coc8jGhsEjRgEZbbUcio 7GCwun2KqYq4Xih/YBmItfVrYiGxj/rPIx8Zj4VAw/p13y3zAkSJK2++kR1Z9BXC9M hmElzZGHYexEWWjWx+H0nwfXx0TGrCLQEdipfeGtTn2iPG635GddSSf8T6/qI4RCAK G2WFO+Z8XjuXg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , =?utf-8?q?Maxime_Roussin?= =?utf-8?q?-B=C3=A9langer?= , Nathan Chancellor Subject: [PATCH 2/4] iio: light: si1133: Drop remaining uses of %hhx format string. Date: Mon, 17 May 2021 13:55:52 +0100 Message-Id: <20210517125554.1463156-3-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517125554.1463156-1-jic23@kernel.org> References: <20210517125554.1463156-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron 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 Cc: Maxime Roussin-BĂ©langer Cc: Nathan Chancellor Reviewed-by: Nathan Chancellor --- 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; } From patchwork Mon May 17 12:55:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12261839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D967FC433ED for ; Mon, 17 May 2021 12:56:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD7B261073 for ; Mon, 17 May 2021 12:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233592AbhEQM6K (ORCPT ); Mon, 17 May 2021 08:58:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:37494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233441AbhEQM6J (ORCPT ); Mon, 17 May 2021 08:58:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C3A961042; Mon, 17 May 2021 12:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621256213; bh=UThLCu3C9EOwdnbQ7xLvrqDQRdrYVrm7U2E9OR9cssQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eEIEZA6LONTjVAH8HEEIUvnUDrAnefc5HfBzpm7Rzk8vhmWuHPZfjspo3QJe/AT19 OVILCqGNzaeQ/KdO3E1oOVRA1tgdfvX18u7qejZFsqxF2GFMyhoyuC3lJahcKSPApj 9jfZOcKfLxgjo3xpF8gD6XUr8/okFSWCCCv5UVU8KBoR7/FJoLEQ2xENBefJYalhnl wJNdkw38bABVT13K2o32fDz0qGCqLiKvLSJWBY+AaoduWjLF4FFYALQwSx5O9rxVQV u+DQyktZJJZ8m5LtEoLjQUE+RlXJLTld25KB8LuvRhLwZzN2ix/7mf15d4R3oKI7Nq OBIDSOXEyjBig== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Nathan Chancellor Subject: [PATCH 3/4] iio: light: si1145: Drop use of %hhx format specifier. Date: Mon, 17 May 2021 13:55:53 +0100 Message-Id: <20210517125554.1463156-4-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517125554.1463156-1-jic23@kernel.org> References: <20210517125554.1463156-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron 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 instances in IIO, this is part of a series clearing them out so they don't get copied into new drivers. Signed-off-by: Jonathan Cameron Cc: Nathan Chancellor Reviewed-by: Nathan Chancellor --- drivers/iio/light/si1145.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iio/light/si1145.c b/drivers/iio/light/si1145.c index 3fb52402fcc3..a3c41ce9c156 100644 --- a/drivers/iio/light/si1145.c +++ b/drivers/iio/light/si1145.c @@ -271,7 +271,7 @@ static int si1145_command(struct si1145_data *data, u8 cmd) if ((ret & ~SI1145_RSP_COUNTER_MASK) == 0) { if (ret == data->rsp_seq) { if (time_after(jiffies, stop_jiffies)) { - dev_warn(dev, "timeout on command %#02hhx\n", + dev_warn(dev, "timeout on command %#02x\n", cmd); ret = -ETIMEDOUT; break; @@ -291,12 +291,12 @@ static int si1145_command(struct si1145_data *data, u8 cmd) ret = -EIO; } else { if (ret == SI1145_RSP_INVALID_SETTING) { - dev_warn(dev, "INVALID_SETTING error on command %#02hhx\n", + dev_warn(dev, "INVALID_SETTING error on command %#02x\n", cmd); ret = -EINVAL; } else { /* All overflows are treated identically */ - dev_dbg(dev, "overflow, ret=%d, cmd=%#02hhx\n", + dev_dbg(dev, "overflow, ret=%d, cmd=%#02x\n", ret, cmd); ret = -EOVERFLOW; } @@ -1299,10 +1299,10 @@ static int si1145_probe(struct i2c_client *client, SI1145_REG_SEQ_ID); if (ret < 0) return ret; - dev_info(&client->dev, "device ID part %#02hhx rev %#02hhx seq %#02hhx\n", + dev_info(&client->dev, "device ID part %#02x rev %#02x seq %#02x\n", part_id, rev_id, seq_id); if (part_id != data->part_info->part) { - dev_err(&client->dev, "part ID mismatch got %#02hhx, expected %#02x\n", + dev_err(&client->dev, "part ID mismatch got %#02x, expected %#02x\n", part_id, data->part_info->part); return -ENODEV; } From patchwork Mon May 17 12:55:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12261841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A774EC433ED for ; Mon, 17 May 2021 12:56:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8564E61042 for ; Mon, 17 May 2021 12:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbhEQM6M (ORCPT ); Mon, 17 May 2021 08:58:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:37562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233441AbhEQM6L (ORCPT ); Mon, 17 May 2021 08:58:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 252766100C; Mon, 17 May 2021 12:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621256215; bh=D00+FdKgvt6SX0ZwOLrLpE94sSSg/x5em9GIhegOcmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TY+9/sNm5mb/w7m/Mu2rzWkiEElNJSHN/2hGny8tURSQhSLERmTujFT8gjSvRUPRg y60Dh1S9res8nS7xn0/skB5TZnnuSjtAiwfs7yCMV86W770ku2JfeERxEw0PLwsP4S Vd+eo+Yh+xV3BDo1IbUZqNBRNGVWCwa2gZalB5BXx/1Do9eZS/HN1b4cTdCz6NP9Kn w3VeBER1PtvYryRh9eDeAKgCAdrKzSr078ov8kMN2aZu6ZHj+a68HpIimMEs6fPG4Y dfhUzYjshdJ3snHW5E6bPNY5fx0wRn7i/mJi/GfVnfSwNanflmDsJFwTXEoapABihs FX61ymZXDmvig== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Nathan Chancellor , Andreas Brauchli Subject: [PATCH 4/4] iio: chemical: sgp30: Drop use of %hx in format string. Date: Mon, 17 May 2021 13:55:54 +0100 Message-Id: <20210517125554.1463156-5-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517125554.1463156-1-jic23@kernel.org> References: <20210517125554.1463156-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron 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 Cc: Nathan Chancellor Cc: Andreas Brauchli Reviewed-by: Nathan Chancellor --- 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; }