All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Sven Peter <sven@svenpeter.dev>
Cc: Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>,
	 clang-built-linux <llvm@lists.linux.dev>,
	kbuild-all@lists.01.org,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Hector Martin <marcan@marcan.st>
Subject: Re: [asahilinux:asahi-soc/rtkit-sart-nvme 4/6] drivers/soc/apple/sart.c:284:4: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int')
Date: Mon, 2 May 2022 09:47:04 +0200	[thread overview]
Message-ID: <CAK8P3a2UL+g5_ugNYh+eUEBtOpg88qWrKnY_qzNO2WY8A1HfEg@mail.gmail.com> (raw)
In-Reply-To: <5291f623-6f0d-4cc0-8358-6aea4e8aa667@www.fastmail.com>

On Mon, May 2, 2022 at 9:34 AM Sven Peter <sven@svenpeter.dev> wrote:
> On Mon, May 2, 2022, at 08:39, Arnd Bergmann wrote:
> >
> > to print a phys_addr_t, you should pass the address by reference and use
> > the special "%pap" format string modifier. I'm not entirely sure if it should
> > actually be a dma_addr_t instead of a phys_addr_t. If the type gets changed,
> > the format string would become "%pad".
>
> I've been using %pa for all other prints in this file since v1 and just
> missed this one for some reason. I'm a bit confused why the bots found this last
> one only now but I'll fix it as well.

You only get a warning for 32-bit builds using 64-bit phys_addr_t,
which is fairly
rare, so you can't predict whether the bots will actually run into this.

       Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: kbuild-all@lists.01.org
Subject: Re: [asahilinux:asahi-soc/rtkit-sart-nvme 4/6] drivers/soc/apple/sart.c:284:4: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int')
Date: Mon, 02 May 2022 09:47:04 +0200	[thread overview]
Message-ID: <CAK8P3a2UL+g5_ugNYh+eUEBtOpg88qWrKnY_qzNO2WY8A1HfEg@mail.gmail.com> (raw)
In-Reply-To: <5291f623-6f0d-4cc0-8358-6aea4e8aa667@www.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

On Mon, May 2, 2022 at 9:34 AM Sven Peter <sven@svenpeter.dev> wrote:
> On Mon, May 2, 2022, at 08:39, Arnd Bergmann wrote:
> >
> > to print a phys_addr_t, you should pass the address by reference and use
> > the special "%pap" format string modifier. I'm not entirely sure if it should
> > actually be a dma_addr_t instead of a phys_addr_t. If the type gets changed,
> > the format string would become "%pad".
>
> I've been using %pa for all other prints in this file since v1 and just
> missed this one for some reason. I'm a bit confused why the bots found this last
> one only now but I'll fix it as well.

You only get a warning for 32-bit builds using 64-bit phys_addr_t,
which is fairly
rare, so you can't predict whether the bots will actually run into this.

       Arnd

  reply	other threads:[~2022-05-02  7:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02  0:21 [asahilinux:asahi-soc/rtkit-sart-nvme 4/6] drivers/soc/apple/sart.c:284:4: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') kernel test robot
2022-05-02  6:39 ` Arnd Bergmann
2022-05-02  6:39   ` Arnd Bergmann
2022-05-02  7:34   ` Sven Peter
2022-05-02  7:34     ` Sven Peter
2022-05-02  7:47     ` Arnd Bergmann [this message]
2022-05-02  7:47       ` Arnd Bergmann

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=CAK8P3a2UL+g5_ugNYh+eUEBtOpg88qWrKnY_qzNO2WY8A1HfEg@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=marcan@marcan.st \
    --cc=sven@svenpeter.dev \
    /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.