public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Stefan Schaeckeler <sschaeck@cisco.com>,
	Borislav Petkov <bp@alien8.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Tony Luck <tony.luck@intel.com>, Joel Stanley <joel@jms.id.au>,
	Troy Lee <troy_lee@aspeedtech.com>
Cc: Arnd Bergmann <arnd@arndb.de>, James Morse <james.morse@arm.com>,
	Robert Richter <rric@kernel.org>,
	Andrew Jeffery <andrew@aj.id.au>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Liu Shixin <liushixin2@huawei.com>,
	linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] EDAC/aspeed: use proper format string for printing resource
Date: Wed, 21 Apr 2021 15:54:53 +0200	[thread overview]
Message-ID: <20210421135500.3518661-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

On ARMv7, resource_size_t can be 64-bit, which breaks printing
it as %x:

drivers/edac/aspeed_edac.c: In function 'init_csrows':
drivers/edac/aspeed_edac.c:257:28: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  257 |         dev_dbg(mci->pdev, "dt: /memory node resources: first page r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n",

Use the special %pR format string to pretty-print the entire
resource instead.

Fixes: edfc2d73ca45 ("EDAC/aspeed: Add support for AST2400 and AST2600")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/edac/aspeed_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index a46da56d6d54..6bd5f8815919 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -254,8 +254,8 @@ static int init_csrows(struct mem_ctl_info *mci)
 		return rc;
 	}
 
-	dev_dbg(mci->pdev, "dt: /memory node resources: first page r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n",
-		r.start, resource_size(&r), PAGE_SHIFT);
+	dev_dbg(mci->pdev, "dt: /memory node resources: first page %pR, PAGE_SHIFT macro=0x%x\n",
+		&r, PAGE_SHIFT);
 
 	csrow->first_page = r.start >> PAGE_SHIFT;
 	nr_pages = resource_size(&r) >> PAGE_SHIFT;
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-04-21 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 13:54 Arnd Bergmann [this message]
2021-04-27  2:22 ` [PATCH] EDAC/aspeed: use proper format string for printing resource Andrew Jeffery
2021-05-18 14:51 ` Borislav Petkov

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=20210421135500.3518661-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=andrew@aj.id.au \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=joel@jms.id.au \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=sschaeck@cisco.com \
    --cc=tony.luck@intel.com \
    --cc=troy_lee@aspeedtech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox