* [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')
@ 2022-05-02 0:21 kernel test robot
2022-05-02 6:39 ` Arnd Bergmann
0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2022-05-02 0:21 UTC (permalink / raw)
To: Sven Peter; +Cc: llvm, kbuild-all, linux-kernel, Arnd Bergmann, Hector Martin
tree: https://github.com/AsahiLinux/linux asahi-soc/rtkit-sart-nvme
head: b483360a58a6f47f31a470feffc9fd41e8d66b36
commit: 09724d641508aead22e8e4a9761b2255ee6a38fc [4/6] soc: apple: Add SART driver
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220502/202205020811.kEEGO8QC-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 09325d36061e42b495d1f4c7e933e260eac260ed)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/AsahiLinux/linux/commit/09724d641508aead22e8e4a9761b2255ee6a38fc
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux asahi-soc/rtkit-sart-nvme
git checkout 09724d641508aead22e8e4a9761b2255ee6a38fc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/soc/apple/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> 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') [-Wformat]
paddr, size);
^~~~~
include/linux/dev_printk.h:146:70: note: expanded from macro 'dev_warn'
dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
1 warning generated.
vim +284 drivers/soc/apple/sart.c
253
254 int apple_sart_remove_allowed_region(struct apple_sart *sart, phys_addr_t paddr,
255 size_t size)
256 {
257 int i;
258
259 dev_dbg(sart->dev,
260 "will remove [paddr: %pa, size: 0x%zx] from allowed regions\n",
261 &paddr, size);
262
263 for (i = 0; i < APPLE_SART_MAX_ENTRIES; ++i) {
264 u8 eflags;
265 size_t esize;
266 phys_addr_t epaddr;
267
268 if (test_bit(i, &sart->protected_entries))
269 continue;
270
271 sart->ops->get_entry(sart, i, &eflags, &epaddr, &esize);
272
273 if (epaddr != paddr || esize != size)
274 continue;
275
276 sart->ops->set_entry(sart, i, 0, 0, 0);
277
278 clear_bit(i, &sart->used_entries);
279 dev_dbg(sart->dev, "cleared entry %d\n", i);
280 return 0;
281 }
282
283 dev_warn(sart->dev, "entry [paddr: 0x%llx, size: 0x%zx] not found\n",
> 284 paddr, size);
285
286 return -EINVAL;
287 }
288 EXPORT_SYMBOL_GPL(apple_sart_remove_allowed_region);
289
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 7+ messages in thread
* 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')
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
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2022-05-02 6:39 UTC (permalink / raw)
To: kernel test robot
Cc: Sven Peter, clang-built-linux, kbuild-all,
Linux Kernel Mailing List, Arnd Bergmann, Hector Martin
On Mon, May 2, 2022 at 2:21 AM kernel test robot <lkp@intel.com> wrote:
> 277
> 278 clear_bit(i, &sart->used_entries);
> 279 dev_dbg(sart->dev, "cleared entry %d\n", i);
> 280 return 0;
> 281 }
> 282
> 283 dev_warn(sart->dev, "entry [paddr: 0x%llx, size: 0x%zx] not found\n",
> > 284 paddr, size);
> 285
Hi Sven,
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".
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* 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')
@ 2022-05-02 6:39 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2022-05-02 6:39 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 726 bytes --]
On Mon, May 2, 2022 at 2:21 AM kernel test robot <lkp@intel.com> wrote:
> 277
> 278 clear_bit(i, &sart->used_entries);
> 279 dev_dbg(sart->dev, "cleared entry %d\n", i);
> 280 return 0;
> 281 }
> 282
> 283 dev_warn(sart->dev, "entry [paddr: 0x%llx, size: 0x%zx] not found\n",
> > 284 paddr, size);
> 285
Hi Sven,
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".
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* 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')
2022-05-02 6:39 ` Arnd Bergmann
@ 2022-05-02 7:34 ` Sven Peter
-1 siblings, 0 replies; 7+ messages in thread
From: Sven Peter @ 2022-05-02 7:34 UTC (permalink / raw)
To: Arnd Bergmann, kernel test robot
Cc: clang-built-linux, kbuild-all, Linux Kernel Mailing List, Hector Martin
Hi Arnd,
On Mon, May 2, 2022, at 08:39, Arnd Bergmann wrote:
> On Mon, May 2, 2022 at 2:21 AM kernel test robot <lkp@intel.com> wrote:
>
>> 277
>> 278 clear_bit(i, &sart->used_entries);
>> 279 dev_dbg(sart->dev, "cleared entry %d\n", i);
>> 280 return 0;
>> 281 }
>> 282
>> 283 dev_warn(sart->dev, "entry [paddr: 0x%llx, size: 0x%zx] not found\n",
>> > 284 paddr, size);
>> 285
>
> Hi Sven,
>
> 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.
Thanks,
Sven
^ permalink raw reply [flat|nested] 7+ messages in thread
* 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')
@ 2022-05-02 7:34 ` Sven Peter
0 siblings, 0 replies; 7+ messages in thread
From: Sven Peter @ 2022-05-02 7:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
Hi Arnd,
On Mon, May 2, 2022, at 08:39, Arnd Bergmann wrote:
> On Mon, May 2, 2022 at 2:21 AM kernel test robot <lkp@intel.com> wrote:
>
>> 277
>> 278 clear_bit(i, &sart->used_entries);
>> 279 dev_dbg(sart->dev, "cleared entry %d\n", i);
>> 280 return 0;
>> 281 }
>> 282
>> 283 dev_warn(sart->dev, "entry [paddr: 0x%llx, size: 0x%zx] not found\n",
>> > 284 paddr, size);
>> 285
>
> Hi Sven,
>
> 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.
Thanks,
Sven
^ permalink raw reply [flat|nested] 7+ messages in thread
* 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')
2022-05-02 7:34 ` Sven Peter
@ 2022-05-02 7:47 ` Arnd Bergmann
-1 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2022-05-02 7:47 UTC (permalink / raw)
To: Sven Peter
Cc: Arnd Bergmann, kernel test robot, clang-built-linux, kbuild-all,
Linux Kernel Mailing List, Hector Martin
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* 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')
@ 2022-05-02 7:47 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2022-05-02 7:47 UTC (permalink / raw)
To: kbuild-all
[-- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-05-02 7:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-05-02 7:47 ` Arnd Bergmann
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.