netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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]
@ 2022-11-17 19:25 Salvatore Bonaccorso
  2022-11-21 13:36 ` Diederik de Haas
  0 siblings, 1 reply; 5+ messages in thread
From: Salvatore Bonaccorso @ 2022-11-17 19:25 UTC (permalink / raw)
  To: M Chetan Kumar, Intel Corporation
  Cc: Loic Poulain, Sergey Ryazanov, Johannes Berg, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 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]
  2022-11-17 19:25 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] Salvatore Bonaccorso
@ 2022-11-21 13:36 ` Diederik de Haas
  2022-11-21 13:47   ` Kumar, M Chetan
  0 siblings, 1 reply; 5+ messages in thread
From: Diederik de Haas @ 2022-11-21 13:36 UTC (permalink / raw)
  To: carnil
  Cc: davem, edumazet, johannes, kuba, linux-kernel, linuxwwan,
	loic.poulain, m.chetan.kumar, netdev, pabeni, ryazanov.s.a

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

The same error occurred with 6.1-rc6, again on armhf.

Cheers,
  Diederik

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 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]
  2022-11-21 13:36 ` Diederik de Haas
@ 2022-11-21 13:47   ` Kumar, M Chetan
  2022-11-21 14:16     ` Diederik de Haas
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar, M Chetan @ 2022-11-21 13:47 UTC (permalink / raw)
  To: Diederik de Haas, Bonaccorso, Salvatore
  Cc: davem, edumazet, johannes, kuba, linux-kernel, linuxwwan,
	loic.poulain, netdev, pabeni, ryazanov.s.a

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 <didi.debian@cknow.org>
> Sent: Monday, November 21, 2022 7:07 PM
> To: Bonaccorso, Salvatore <carnil@debian.org>
> Cc: davem@davemloft.net; edumazet@google.com;
> johannes@sipsolutions.net; kuba@kernel.org; linux-kernel@vger.kernel.org;
> linuxwwan <linuxwwan@intel.com>; loic.poulain@linaro.org; Kumar, M
> Chetan <m.chetan.kumar@intel.com>; netdev@vger.kernel.org;
> pabeni@redhat.com; ryazanov.s.a@gmail.com
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 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]
  2022-11-21 13:47   ` Kumar, M Chetan
@ 2022-11-21 14:16     ` Diederik de Haas
  2022-11-22 11:19       ` Diederik de Haas
  0 siblings, 1 reply; 5+ messages in thread
From: Diederik de Haas @ 2022-11-21 14:16 UTC (permalink / raw)
  To: Bonaccorso, Salvatore, Kumar, M Chetan
  Cc: davem, edumazet, johannes, kuba, linux-kernel, linuxwwan,
	loic.poulain, netdev, pabeni, ryazanov.s.a

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

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 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]
  2022-11-21 14:16     ` Diederik de Haas
@ 2022-11-22 11:19       ` Diederik de Haas
  0 siblings, 0 replies; 5+ messages in thread
From: Diederik de Haas @ 2022-11-22 11:19 UTC (permalink / raw)
  To: Bonaccorso, Salvatore, Kumar, M Chetan
  Cc: davem, edumazet, johannes, kuba, linux-kernel, linuxwwan,
	loic.poulain, netdev, pabeni, ryazanov.s.a

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

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


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-22 11:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 19:25 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] Salvatore Bonaccorso
2022-11-21 13:36 ` Diederik de Haas
2022-11-21 13:47   ` Kumar, M Chetan
2022-11-21 14:16     ` Diederik de Haas
2022-11-22 11:19       ` Diederik de Haas

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).