public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@kudzu.us>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Jiang <dave.jiang@intel.com>,
	Allen Hubbe <allenbh@gmail.com>, Gary R Hook <gary.hook@amd.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NTB: ntb_perf: fix printing of resource_size_t
Date: Fri, 19 Jan 2018 10:43:01 -0500	[thread overview]
Message-ID: <20180119154300.GA23366@kudzu.us> (raw)
In-Reply-To: <20180119145813.1141817-1-arnd@arndb.de>

On Fri, Jan 19, 2018 at 03:55:28PM +0100, Arnd Bergmann wrote:
> On 32-bit architectures, resource_size_t is usually 'unsigned int' or
> 'unsigned long' but not 'unsigned long long', so we get a warning
> about printing the wrong data:
> 
> drivers/ntb/test/ntb_perf.c: In function 'perf_setup_peer_mw':
> drivers/ntb/test/ntb_perf.c:1390:35: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Werror=format=]
> 
> This changes the format string to the special %pa that is already
> used elsewhere in the same file.

Applied to my ntb-next branch.

Thanks,
Jon

> 
> Fixes: b83003b3fdc1 ("NTB: ntb_perf: Add full multi-port NTB API support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/ntb/test/ntb_perf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
> index 8de72f3fba4d..1829a17dd461 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -1387,8 +1387,8 @@ static int perf_setup_peer_mw(struct perf_peer *peer)
>  	if (max_mw_size && peer->outbuf_size > max_mw_size) {
>  		peer->outbuf_size = max_mw_size;
>  		dev_warn(&peer->perf->ntb->dev,
> -			"Peer %d outbuf reduced to %#llx\n", peer->pidx,
> -			peer->outbuf_size);
> +			"Peer %d outbuf reduced to %pa\n", peer->pidx,
> +			&peer->outbuf_size);
>  	}
>  
>  	return 0;
> -- 
> 2.9.0
> 

      reply	other threads:[~2018-01-19 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 14:55 [PATCH] NTB: ntb_perf: fix printing of resource_size_t Arnd Bergmann
2018-01-19 15:43 ` Jon Mason [this message]

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=20180119154300.GA23366@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=allenbh@gmail.com \
    --cc=arnd@arndb.de \
    --cc=dave.jiang@intel.com \
    --cc=fancer.lancer@gmail.com \
    --cc=gary.hook@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntb@googlegroups.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