Hi
While preparing 6.1-rc5 for Debian, we noticed that compilation of
drivers/net/wwan/iosm/iosm_ipc_protocol.c fails (with
-Werror=incompatible-pointer-types), on armhf[1]:
gcc-12 -Wp,-MMD,drivers/net/wwan/iosm/.iosm_ipc_protocol_ops.o.d -nostdinc -I/<<PKGBUILDDIR>>/arch/arm/include -I./arch/arm/include/generated -I/<<PKGBUILDDIR>>/include -I./include -I/<<PKGBUILDDIR>>/arch/arm/include/uapi -I./arch/ar
m/include/generated/uapi -I/<<PKGBUILDDIR>>/include/uapi -I./include/generated/uapi -include /<<PKGBUILDDIR>>/include/linux/compiler-version.h -include /<<PKGBUILDDIR>>/include/linux/kconfig.h -include /<<PKGBUILDDIR>>/include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -fmacro-prefix-map=/<<PKGBUILDDIR>>/= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 -fno-dwarf2-cfi-asm -mno-fdpic -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -mtp=cp15 -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -fdebug-prefix-map=/<<PKGBUILDDIR>>/= -mstack-protector-guard=tls -mstack-protector-guard-offset=1592 -I /<<PKGBUILDDIR>>/drivers/net/wwan/iosm -I ./drivers/net/wwan/iosm -DMODULE -DKBUILD_BASENAME='"iosm_ipc_protocol_ops"' -DKBUILD_MODNAME='"iosm"' -D__KBUILD_MODNAME=kmod_iosm -c -o drivers/net/wwan/iosm/iosm_ipc_protocol_ops.o /<<PKGBUILDDIR>>/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
/<<PKGBUILDDIR>>/drivers/net/wwan/iosm/iosm_ipc_protocol.c: In function 'ipc_protocol_init':
/<<PKGBUILDDIR>>/drivers/net/wwan/iosm/iosm_ipc_protocol.c:244:36: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
244 | &ipc_protocol->phy_ap_shm, GFP_KERNEL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| phys_addr_t * {aka unsigned int *}
In file included from /<<PKGBUILDDIR>>/include/linux/skbuff.h:31,
from /<<PKGBUILDDIR>>/drivers/net/wwan/iosm/iosm_ipc_imem.h:9,
from /<<PKGBUILDDIR>>/drivers/net/wwan/iosm/iosm_ipc_protocol.c:6:
/<<PKGBUILDDIR>>/include/linux/dma-mapping.h:421:29: note: expected 'dma_addr_t *' {aka 'long long unsigned int *'} but argument is of type 'phys_addr_t *' {aka 'unsigned int *'}
421 | dma_addr_t *dma_handle, gfp_t gfp)
| ~~~~~~~~~~~~^~~~~~~~~~
cc1: some warnings being treated as errors
make[8]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:255: drivers/net/wwan/iosm/iosm_ipc_protocol.o] Error 1
make[8]: *** Waiting for unfinished jobs....
Regards,
Salvtore
[1]: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=armhf&ver=6.1%7Erc5-1%7Eexp1&stamp=1668648913&raw=0
The same error occurred with 6.1-rc6, again on armhf.
Cheers,
Diederik
Hi Chetan,
On Monday, 21 November 2022 14:47:20 CET Kumar, M Chetan wrote:
> I tried reproducing it at my side by compiling kernel for armhf
> configuration [1] but could not reproduce it. Could you please share the
> steps and config details for reproducing it locally so that I can take a
> look at it.
I have a clone of the upstream kernel in ~/dev/kernel.org/linux
You also need a clone of https://salsa.debian.org/kernel-team/linux
All the commands are done from the 'kernel-team/linux' dir.
The configuration file for compilation is generated from the `debian/config` dir.
# Create an 'orig' tarball from upstream 6.1-rc5
$ debian/bin/genorig.py ~/dev/kernel.org/linux/
# set some (cross compile) build options (with 14 cores)
$ export DEB_BUILD_OPTIONS="parallel=14"
$ export DEB_BUILD_PROFILES="cross nodoc pkg.linux.nosource pkg.linux.notools pkg.linux.nokerneldbg"
$ export ARCH=armhf
$ export CC=arm-linux-gnueabihf-gcc-12
$ dpkg-architecture --host-arch armhf
# Clean things up and do the actual build
$ dpkg-architecture -c fakeroot debian/rules maintainerclean
$ dpkg-architecture -c debian/rules orig
$ time dpkg-architecture -c fakeroot debian/rules binary-indep
$ time dpkg-architecture -c fakeroot debian/rules binary-arch
HTH,
Diederik
Hi Diederik/Salvatore,
I tried reproducing it at my side by compiling kernel for armhf configuration [1] but could not reproduce it.
Could you please share the steps and config details for reproducing it locally so that I can take a look at it.
[1]
https://www.raspberrypi.com/documentation/computers/linux_kernel.html
Regards,
Chetan
> -----Original Message-----
> From: Diederik de Haas <[email protected]>
> Sent: Monday, November 21, 2022 7:07 PM
> To: Bonaccorso, Salvatore <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> linuxwwan <[email protected]>; [email protected]; Kumar, M
> Chetan <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: Re: drivers/net/wwan/iosm/iosm_ipc_protocol.c:244:36: error:
> passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type
> [-Werror=incompatible-pointer-types]
>
> The same error occurred with 6.1-rc6, again on armhf.
>
> Cheers,
> Diederik
The procedure missed an important step, added below:
On Monday, 21 November 2022 15:16:52 CET Diederik de Haas wrote:
> # Clean things up and do the actual build
> $ dpkg-architecture -c fakeroot debian/rules maintainerclean
> $ dpkg-architecture -c debian/rules orig
$ dpkg-architecture -c debian/rules debian/control
> $ time dpkg-architecture -c fakeroot debian/rules binary-indep
> $ time dpkg-architecture -c fakeroot debian/rules binary-arch