All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"kernel test robot" <lkp@intel.com>,
	"Avi Fishman" <avifishman70@gmail.com>,
	"Tomer Maimon" <tmaimon77@gmail.com>,
	"Tali Perry" <tali.perry1@gmail.com>,
	"Patrick Venture" <venture@google.com>,
	"Nancy Yuen" <yuenn@google.com>,
	"Benjamin Fair" <benjaminfair@google.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	openbmc@lists.ozlabs.org
Subject: [PATCH v3 1/2] pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE()
Date: Sat,  5 Feb 2022 16:53:30 +0100	[thread overview]
Message-ID: <20220205155332.1308899-2-j.neuschaefer@gmx.net> (raw)
In-Reply-To: <20220205155332.1308899-1-j.neuschaefer@gmx.net>

When compile-testing on 64-bit architectures, GCC complains about the
mismatch of types between the %d format specifier and value returned by
ARRAY_LENGTH(). Use %zu, which is correct everywhere.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 3b588e43ee5c7 ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---

v3:
- Change from %zd to %zu because we're dealing with an unsigned value

v2:
- Add Fixes and R-b tags
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908d6725d..e05bbc7fb09de 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1561,7 +1561,7 @@ static int npcm7xx_get_groups_count(struct pinctrl_dev *pctldev)
 {
 	struct npcm7xx_pinctrl *npcm = pinctrl_dev_get_drvdata(pctldev);

-	dev_dbg(npcm->dev, "group size: %d\n", ARRAY_SIZE(npcm7xx_groups));
+	dev_dbg(npcm->dev, "group size: %zu\n", ARRAY_SIZE(npcm7xx_groups));
 	return ARRAY_SIZE(npcm7xx_groups);
 }

--
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: linux-gpio@vger.kernel.org
Cc: "kernel test robot" <lkp@intel.com>,
	"Avi Fishman" <avifishman70@gmail.com>,
	"Patrick Venture" <venture@google.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Benjamin Fair" <benjaminfair@google.com>,
	"Tali Perry" <tali.perry1@gmail.com>,
	openbmc@lists.ozlabs.org, "Tomer Maimon" <tmaimon77@gmail.com>
Subject: [PATCH v3 1/2] pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE()
Date: Sat,  5 Feb 2022 16:53:30 +0100	[thread overview]
Message-ID: <20220205155332.1308899-2-j.neuschaefer@gmx.net> (raw)
In-Reply-To: <20220205155332.1308899-1-j.neuschaefer@gmx.net>

When compile-testing on 64-bit architectures, GCC complains about the
mismatch of types between the %d format specifier and value returned by
ARRAY_LENGTH(). Use %zu, which is correct everywhere.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 3b588e43ee5c7 ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---

v3:
- Change from %zd to %zu because we're dealing with an unsigned value

v2:
- Add Fixes and R-b tags
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908d6725d..e05bbc7fb09de 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1561,7 +1561,7 @@ static int npcm7xx_get_groups_count(struct pinctrl_dev *pctldev)
 {
 	struct npcm7xx_pinctrl *npcm = pinctrl_dev_get_drvdata(pctldev);

-	dev_dbg(npcm->dev, "group size: %d\n", ARRAY_SIZE(npcm7xx_groups));
+	dev_dbg(npcm->dev, "group size: %zu\n", ARRAY_SIZE(npcm7xx_groups));
 	return ARRAY_SIZE(npcm7xx_groups);
 }

--
2.34.1


  reply	other threads:[~2022-02-05 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 15:53 [PATCH v3 0/2] Fixing the compile-test warnings in pinctrl-npcm7xx Jonathan Neuschäfer
2022-02-05 15:53 ` Jonathan Neuschäfer [this message]
2022-02-05 15:53   ` [PATCH v3 1/2] pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE() Jonathan Neuschäfer
2022-02-11  1:04   ` Linus Walleij
2022-02-11  1:04     ` Linus Walleij
2022-02-05 15:53 ` [PATCH v3 2/2] pinctrl: nuvoton: npcm7xx: Rename DS() macro to DSTR() Jonathan Neuschäfer
2022-02-05 15:53   ` Jonathan Neuschäfer

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=20220205155332.1308899-2-j.neuschaefer@gmx.net \
    --to=j.neuschaefer@gmx.net \
    --cc=andy.shevchenko@gmail.com \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@google.com \
    /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.