From: Nathan Chancellor <natechancellor@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, clang-built-linux@googlegroups.com
Subject: -Wincompatible-pointer-types in arch/powerpc/platforms/embedded6xx/mvme5100.c
Date: Mon, 13 Apr 2020 13:10:34 -0700 [thread overview]
Message-ID: <20200413201034.GA18373@ubuntu-s3-xlarge-x86> (raw)
Hi all,
0day reported a build error in arch/powerpc/platforms/embedded6xx/mvme5100.c
when building with clang [1]. This is not a clang specific issue since
it also happens with gcc:
$ curl -LSs https://lore.kernel.org/lkml/202004131704.6MH1jcq3%25lkp@intel.com/2-a.bin | gzip -d > .config
$ make -j$(nproc) -s ARCH=powerpc CROSS_COMPILE=powerpc-linux- olddefconfig arch/powerpc/platforms/embedded6xx/mvme5100.o
arch/powerpc/platforms/embedded6xx/mvme5100.c: In function 'mvme5100_add_bridge':
arch/powerpc/platforms/embedded6xx/mvme5100.c:135:58: error: passing argument 5 of 'early_read_config_dword' from incompatible pointer type [-Werror=incompatible-pointer-types]
135 | early_read_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_1, &pci_membase);
| ^~~~~~~~~~~~
| |
| phys_addr_t * {aka long long unsigned int *}
In file included from arch/powerpc/platforms/embedded6xx/mvme5100.c:18:
./arch/powerpc/include/asm/pci-bridge.h:139:32: note: expected 'u32 *' {aka 'unsigned int *'} but argument is of type 'phys_addr_t *' {aka 'long long unsigned int *'}
139 | int dev_fn, int where, u32 *val);
| ~~~~~^~~
In file included from ./include/linux/printk.h:7,
from ./include/linux/kernel.h:15,
from ./include/linux/list.h:9,
from ./include/linux/rculist.h:10,
from ./include/linux/pid.h:5,
from ./include/linux/sched.h:14,
from ./include/linux/ratelimit.h:6,
from ./include/linux/dev_printk.h:16,
from ./include/linux/device.h:15,
from ./include/linux/of_platform.h:9,
from arch/powerpc/platforms/embedded6xx/mvme5100.c:15:
./include/linux/kern_levels.h:5:18: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'phys_addr_t' {aka 'long long unsigned int'} [-Werror=format=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
./include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
./include/linux/printk.h:305:9: note: in expansion of macro 'KERN_INFO'
305 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
arch/powerpc/platforms/embedded6xx/mvme5100.c:142:2: note: in expansion of macro 'pr_info'
142 | pr_info("mvme5100_pic_init: pci_membase: %x\n", pci_membase);
| ^~~~~~~
arch/powerpc/platforms/embedded6xx/mvme5100.c:142:44: note: format string is defined here
142 | pr_info("mvme5100_pic_init: pci_membase: %x\n", pci_membase);
| ~^
| |
| unsigned int
| %llx
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:267: arch/powerpc/platforms/embedded6xx/mvme5100.o] Error 1
make[3]: *** [scripts/Makefile.build:488: arch/powerpc/platforms/embedded6xx] Error 2
make[2]: *** [scripts/Makefile.build:488: arch/powerpc/platforms] Error 2
make[1]: *** [Makefile:1722: arch/powerpc] Error 2
make: *** [Makefile:328: __build_one_by_one] Error 2
I am not sure how exactly this should be fixed. Should this driver just
not be selectable when CONFIG_PHYS_ADDR_T_64BIT is selected or is there
something else that I am missing?
[1]: https://lore.kernel.org/lkml/202004131704.6MH1jcq3%25lkp@intel.com/
Cheers,
Nathan
next reply other threads:[~2020-04-13 20:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 20:10 Nathan Chancellor [this message]
2020-04-14 7:33 ` -Wincompatible-pointer-types in arch/powerpc/platforms/embedded6xx/mvme5100.c Michael Ellerman
2020-04-14 7:52 ` Nathan Chancellor
2020-04-14 17:04 ` Scott Wood
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=20200413201034.GA18373@ubuntu-s3-xlarge-x86 \
--to=natechancellor@gmail.com \
--cc=clang-built-linux@googlegroups.com \
--cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).