From: Vikram Garhwal <vikram.garhwal@amd.com>
To: Michal Orzel <michal.orzel@amd.com>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>
Subject: Re: [PATCH] xen/arm: Fix printk specifiers and arguments in iomem_remove_cb()
Date: Wed, 6 Sep 2023 15:45:32 -0400 [thread overview]
Message-ID: <ZPjW3LT9S5af_1Im@amd.com> (raw)
In-Reply-To: <20230906103014.19574-1-michal.orzel@amd.com>
On Wed, Sep 06, 2023 at 12:30:14PM +0200, Michal Orzel wrote:
> When building Xen for arm32 with CONFIG_DTB_OVERLAY, the following
> error is printed:
>
> common/dt-overlay.c: In function ‘iomem_remove_cb’:
> ././include/xen/config.h:55:24: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘long unsigned int’ [-Werror=format=]
>
> Function parameters s and e (denoting MMIO region) are of type unsigned
> long and indicate frame numbers and not addresses. This also means that
> the arguments passed to printk() are incorrect (using PAGE_ALIGN() or
> PAGE_MASK ANDed with a frame number results in unwanted output). Fix it.
>
> Take the opportunity to switch to %pd specifier to print domain id in
> a consolidated way.
>
> Fixes: 7e5c4a8b86f1 ("xen/arm: Implement device tree node removal functionalities")
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Vikram Garhwal <vikram.garhwal@amd.com>
> ---
> After this patch (and the one for xl), we are left with one issue breaking CI:
> https://gitlab.com/xen-project/patchew/xen/-/jobs/5026938514
> ---
> xen/common/dt-overlay.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/xen/common/dt-overlay.c b/xen/common/dt-overlay.c
> index b07a6128dc99..5663a049e90a 100644
> --- a/xen/common/dt-overlay.c
> +++ b/xen/common/dt-overlay.c
> @@ -251,10 +251,8 @@ static int iomem_remove_cb(unsigned long s, unsigned long e, void *dom,
> rc = iomem_deny_access(d, s, e);
> if ( rc )
> {
> - printk(XENLOG_ERR "Unable to remove dom%d access to"
> - " 0x%"PRIx64" - 0x%"PRIx64"\n",
> - d->domain_id,
> - s & PAGE_MASK, PAGE_ALIGN(e) - 1);
> + printk(XENLOG_ERR "Unable to remove %pd access to %#lx - %#lx\n",
> + d, s, e);
> }
> else
> *c += e - s + 1;
> --
> 2.25.1
>
next prev parent reply other threads:[~2023-09-06 19:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 10:30 [PATCH] xen/arm: Fix printk specifiers and arguments in iomem_remove_cb() Michal Orzel
2023-09-06 19:45 ` Vikram Garhwal [this message]
2023-09-06 20:26 ` Stefano Stabellini
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=ZPjW3LT9S5af_1Im@amd.com \
--to=vikram.garhwal@amd.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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.