[Xavier NX]COMPILE_TEST

Dear All,

Apologize to tag the Xavier NX, I don’t know which category could be better to tag this issue. I got the issue while I build the kernel with “CONFIG_COMPILE_TEST” that TI’s codec chip need.

/home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/dma/hsu/hsu.c:163:20: error: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  spin_lock_irqsave(&hsuc->vchan.lock, flags);
...
/home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/dma/hsu/hsu.c:165:25: error: passing argument 1 of ‘spin_unlock_irqrestore’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  spin_unlock_irqrestore(&hsuc->vchan.lock, flags);
...
/home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/dma/hsu/hsu.c:217:20: error: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  spin_lock_irqsave(&hsuc->vchan.lock, flags);
...
/home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/dma/hsu/hsu.c:230:25: error: passing argument 1 of ‘spin_unlock_irqrestore’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  spin_unlock_irqrestore(&hsuc->vchan.lock, flags);
...
/home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/dma/hsu/hsu.c:396:20: error: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  spin_lock_irqsave(&hsuc->vchan.lock, flags);
...
/home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/dma/hsu/hsu.c:405:25: error: passing argument 1 of ‘spin_unlock_irqrestore’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  spin_unlock_irqrestore(&hsuc->vchan.lock, flags);

the sources version which I download by source_sync.sh is the tegra-l4t-r32.5.1, the Linaro GCC version is 7.3.1 20180425(gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz).

I’m curious Is there any one been met this problem as I got? Then how fixed that? change the compile tool/sources? or add some argument to ignore it?
Would you mind to give me some suggestion for better? Many Thanks.

Best Regards,
MOMO Chen

hello momo_chen,

this is compiler issue that return types of your function does not match the function definition. since argument 1 here is void. you’ll need to revise the code to match the correct pointer usage.

it’s Werror flag to consider all warnings as errors.
for an alternative ways, you may modify the /kernel/kernel-4.9/Makefile to ignore the warnings.
for example,

# enforce correct pointer usage
KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)

Dear Jerry,

Got it, Thanks for your reply.

Best Regards,
MOMO Chen

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.