Error messages:
Code:
In file included from ....../kernel-4.9/include/asm-generic/bug.h:13:0,
from ....../kernel-4.9/arch/arm64/include/asm/bug.h:67,
from ....../kernel-4.9/include/linux/bug.h:4,
from ....../kernel-4.9/arch/arm64/include/asm/cmpxchg.h:21,
from ....../kernel-4.9/arch/arm64/include/asm/atomic.h:41,
from ....../kernel-4.9/include/linux/atomic.h:4,
from ....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c:13:
....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c: In function ‘tegra_channel_s_parm’:
....../kernel-4.9/include/linux/kernel.h:838:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
....../nvidia/include/media/mc_common.h:265:2: note: in expansion of macro ‘container_of’
container_of(vdev, struct tegra_channel, video)
^~~~~~~~~~~~
....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c:2029:37: note: in expansion of macro ‘to_tegra_channel’
struct tegra_channel *chan = to_tegra_channel(vfh->vdev);
^~~~~~~~~~~~~~~~
....../kernel-4.9/include/linux/kernel.h:838:48: note: (near initialization for ‘chan’)
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
....../nvidia/include/media/mc_common.h:265:2: note: in expansion of macro ‘container_of’
container_of(vdev, struct tegra_channel, video)
^~~~~~~~~~~~
....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c:2029:37: note: in expansion of macro ‘to_tegra_channel’
struct tegra_channel *chan = to_tegra_channel(vfh->vdev);
^~~~~~~~~~~~~~~~
....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c: In function ‘tegra_channel_g_parm’:
....../kernel-4.9/include/linux/kernel.h:838:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
....../nvidia/include/media/mc_common.h:265:2: note: in expansion of macro ‘container_of’
container_of(vdev, struct tegra_channel, video)
^~~~~~~~~~~~
....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c:2039:37: note: in expansion of macro ‘to_tegra_channel’
struct tegra_channel *chan = to_tegra_channel(vfh->vdev);
^~~~~~~~~~~~~~~~
....../kernel-4.9/include/linux/kernel.h:838:48: note: (near initialization for ‘chan’)
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
....../nvidia/include/media/mc_common.h:265:2: note: in expansion of macro ‘container_of’
container_of(vdev, struct tegra_channel, video)
^~~~~~~~~~~~
....../nvidia/drivers/media/platform/tegra/camera/vi/channel.c:2039:37: note: in expansion of macro ‘to_tegra_channel’
struct tegra_channel *chan = to_tegra_channel(vfh->vdev);
^~~~~~~~~~~~~~~~
LD drivers/media/platform/tegra-vivid/built-in.o
CC drivers/media/platform/tegra/camera/camera_gpio.o
cc1: all warnings being treated as errors
....../kernel-4.9/scripts/Makefile.build:335: recipe for target 'drivers/media/platform/tegra/camera/vi/channel.o' failed
make[7]: *** [drivers/media/platform/tegra/camera/vi/channel.o] Error 1
....../kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media/platform/tegra/camera/vi' failed
make[6]: *** [drivers/media/platform/tegra/camera/vi] Error 2
make[6]: *** Waiting for unfinished jobs....
CC drivers/media/platform/tegra/mipical/mipi_cal.o
....../kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media/platform/tegra/camera' failed
make[5]: *** [drivers/media/platform/tegra/camera] Error 2
make[5]: *** Waiting for unfinished jobs....
CC drivers/media/platform/tegra/mipical/vmipi/vmipi.o
LD drivers/media/platform/tegra/mipical/built-in.o
....../kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media/platform/tegra' failed
make[4]: *** [drivers/media/platform/tegra] Error 2
....../kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media/platform' failed
make[3]: *** [drivers/media/platform] Error 2
....../kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media' failed
make[2]: *** [drivers/media] Error 2
....../kernel-4.9/Makefile:1104: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '........../kernel_out'
Makefile:171: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
Line 838 in file
....../kernel-4.9/include/linux/kernel.h is:
Code:
837 #define container_of(ptr, type, member) ({ \
838 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
839 (type *)( (char *)__mptr - offsetof(type,member) );})
My Compiler is gcc/g++ 7.5.0 .
Code:
➜ kernel-4.9 gcc --version
gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
➜ kernel-4.9 g++ --version
g++ (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Can anybody give me a hand?
Cheers
Pei