From patchwork Fri May 14 13:59:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12257825 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.7 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,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 7ED94C433B4 for ; Fri, 14 May 2021 14:00:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 566576145E for ; Fri, 14 May 2021 14:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232854AbhENOB3 (ORCPT ); Fri, 14 May 2021 10:01:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:59510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233677AbhENOB3 (ORCPT ); Fri, 14 May 2021 10:01:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AADBF6101A; Fri, 14 May 2021 14:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621000817; bh=7NB1FE8Uid9tyXKynlxvfUzhGWXyAQBzyCqed1gxhfk=; h=From:To:Cc:Subject:Date:From; b=VsqUEHcDbAAOq2f8moIYt11ziM2tUJr6Gdlw1A4T9yTEJnxY/ICUb0BIeCvky6dCT ZPLry+v2B6kI67x25Y0wYw9HbTKkPTw2ZKTwWl/GSfFiw2IiIwRos27NdlmwJuMHZx cZlKCAK6vpNdOOqN4aqwwc04z0tF+j1ohDXkRi74Xh2VbSEEU4O5rcj9WUImoMcsjD r1BczSwvYgy67LruE2Iwe5V5djN4T+8PJJl2BNuxkfHXeVHrImyXOsbCEX3KFyXHab ddq5btrWlS1mlXvPpp4oJPIQmCDrKwRXnZThGyGpkAS7NW4F7uNj9rnDvbZJkgeOJq 2duQHEynK4CDg== From: Arnd Bergmann To: Jonathan Cameron , Nathan Chancellor , Nick Desaulniers , =?utf-8?q?Maxime_Roussin-B?= =?utf-8?q?=C3=A9langer?= , Jean-Francois Dagenais Cc: Arnd Bergmann , Lars-Peter Clausen , Alexandru Ardelean , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] iio: si1133: fix format string warnings Date: Fri, 14 May 2021 15:59:21 +0200 Message-Id: <20210514135927.2926482-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Arnd Bergmann clang complains about multiple instances of printing an integer using the %hhx format string: drivers/iio/light/si1133.c:982:4: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat] part_id, rev_id, mfr_id); ^~~~~~~ Print them as a normal integer instead, leaving the "#02" length modifier. Fixes: e01e7eaf37d8 ("iio: light: introduce si1133") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor --- drivers/iio/light/si1133.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/si1133.c b/drivers/iio/light/si1133.c index c280b4195003..fd302480262b 100644 --- a/drivers/iio/light/si1133.c +++ b/drivers/iio/light/si1133.c @@ -978,11 +978,11 @@ static int si1133_validate_ids(struct iio_dev *iio_dev) return err; dev_info(&iio_dev->dev, - "Device ID part %#02hhx rev %#02hhx mfr %#02hhx\n", + "Device ID part %#02x rev %#02x mfr %#02x\n", part_id, rev_id, mfr_id); if (part_id != SI1133_PART_ID) { dev_err(&iio_dev->dev, - "Part ID mismatch got %#02hhx, expected %#02x\n", + "Part ID mismatch got %#02x, expected %#02x\n", part_id, SI1133_PART_ID); return -ENODEV; }