2021-06-16 01:40:45

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the swiotlb tree

Hi all,

After merging the swiotlb tree, today's linux-next build (powerpc
ppc64_defconfig and x86_64 allmodconfig) produced this warning:

In file included from arch/powerpc/include/asm/bug.h:109,
from include/linux/bug.h:5,
from arch/powerpc/include/asm/mmu.h:147,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/current.h:13,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from include/linux/dma-direct.h:9,
from kernel/dma/swiotlb.c:24:
kernel/dma/swiotlb.c: In function 'swiotlb_bounce':
include/linux/dev_printk.h:242:23: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
242 | WARN_ONCE(condition, "%s %s: " format, \
| ^~~~~~~~~
include/asm-generic/bug.h:97:17: note: in definition of macro '__WARN_printf'
97 | __warn_printk(arg); \
| ^~~
include/asm-generic/bug.h:161:3: note: in expansion of macro 'WARN'
161 | WARN(1, format); \
| ^~~~
include/linux/dev_printk.h:242:2: note: in expansion of macro 'WARN_ONCE'
242 | WARN_ONCE(condition, "%s %s: " format, \
| ^~~~~~~~~
kernel/dma/swiotlb.c:355:3: note: in expansion of macro 'dev_WARN_ONCE'
355 | dev_WARN_ONCE(dev, 1,
| ^~~~~~~~~~~~~

Introduced by commit

17eb5dcf1f15 ("swiotlb: manipulate orig_addr when tlb_addr has offset")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-06-16 02:44:45

by Konrad Rzeszutek Wilk

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the swiotlb tree

On Wed, Jun 16, 2021 at 11:38:35AM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the swiotlb tree, today's linux-next build (powerpc
> ppc64_defconfig and x86_64 allmodconfig) produced this warning:
>
> In file included from arch/powerpc/include/asm/bug.h:109,
> from include/linux/bug.h:5,
> from arch/powerpc/include/asm/mmu.h:147,
> from arch/powerpc/include/asm/lppaca.h:46,
> from arch/powerpc/include/asm/paca.h:17,
> from arch/powerpc/include/asm/current.h:13,
> from include/linux/sched.h:12,
> from include/linux/ratelimit.h:6,
> from include/linux/dev_printk.h:16,
> from include/linux/device.h:15,
> from include/linux/dma-mapping.h:7,
> from include/linux/dma-direct.h:9,
> from kernel/dma/swiotlb.c:24:
> kernel/dma/swiotlb.c: In function 'swiotlb_bounce':
> include/linux/dev_printk.h:242:23: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
> 242 | WARN_ONCE(condition, "%s %s: " format, \
> | ^~~~~~~~~
> include/asm-generic/bug.h:97:17: note: in definition of macro '__WARN_printf'
> 97 | __warn_printk(arg); \
> | ^~~
> include/asm-generic/bug.h:161:3: note: in expansion of macro 'WARN'
> 161 | WARN(1, format); \
> | ^~~~
> include/linux/dev_printk.h:242:2: note: in expansion of macro 'WARN_ONCE'
> 242 | WARN_ONCE(condition, "%s %s: " format, \
> | ^~~~~~~~~
> kernel/dma/swiotlb.c:355:3: note: in expansion of macro 'dev_WARN_ONCE'
> 355 | dev_WARN_ONCE(dev, 1,
> | ^~~~~~~~~~~~~
>
> Introduced by commit
>
> 17eb5dcf1f15 ("swiotlb: manipulate orig_addr when tlb_addr has offset")

Fixed it up and should be OK in the next run. Thanks!
>
> --
> Cheers,
> Stephen Rothwell