[Help][kernel compilation error] tspdrv.c ("some warnings are treated as a error") - General Questions and Answers

As, by going previous issues i found solution of "tspdrv.h not found" by doing
#include to "tspdrv.h"
now it is giving error like shown below...
CC drivers/misc/qcom/qdsp6v2/audio_amrnb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwbplus.o
CC drivers/misc/qcom/qdsp6v2/audio_evrc.o
CC drivers/misc/qcom/qdsp6v2/audio_qcelp.o
CC drivers/misc/qcom/qdsp6v2/amrwb_in.o
LD drivers/misc/qcom/qdsp6v2/built-in.o
LD drivers/misc/qcom/built-in.o
CC drivers/misc/tspdrv/tspdrv.o
In file included from drivers/misc/tspdrv/tspdrv.c:43:0:
drivers/misc/tspdrv/tspdrv.h:90:9: note: #pragma message: ************ KERNEL ************
#pragma message "************ KERNEL ***********"
^
In file included from include/linux/kernel.h:14:0,
from include/linux/sched.h:15,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/compat.h:25,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/misc/tspdrv/tspdrv.c:34:
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'isa1000_vib_set_level':
include/linux/dynamic_debug.h:64:16: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration]
static struct ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS_)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: note: each undeclared identifier is reported only once for each function it appears in
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'ImmVibeSPI_ForceOut_SetSamples':
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:487:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target 'drivers/misc/tspdrv/tspdrv.o' failed
make[3]: ** [drivers/misc/tspdrv/tspdrv.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/misc/tspdrv' failed
make[2]: *** [drivers/misc/tspdrv] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2

For anyone still having this issue, 'error: 'tspdrv' undeclared (first use in this function)' can be solved with this patch:
Code:
diff --git a/drivers/tspdrv/Makefile b/drivers/tspdrv/Makefile
index 73d893d..4144167 100644
--- a/drivers/tspdrv/Makefile
+++ b/drivers/tspdrv/Makefile
@@ -32,7 +32,7 @@ endif
EXTRA_CFLAGS += -I$(M)
-obj-$(CONFIG_TSPDRV) += tspdrv.o
+obj-m += tspdrv.o
all:
@$(MAKE) -C $(KERNEL_ROOT) M=$(shell pwd) modules

Related

kernel error help me

CC drivers/staging/prima/CORE/SVC/src/btc/wlan_btc_svc.o
CC drivers/staging/prima/CORE/SVC/src/ptt/wlan_ptt_sock_svc.o
CC drivers/staging/prima/CORE/SVC/src/logging/wlan_logging_sock_svc.o
CC drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.o
CC drivers/staging/prima/CORE/VOSS/src/vos_api.o
In file included from drivers/staging/prima/CORE/VOSS/inc/vos_api.h:71:0,
from drivers/staging/prima/CORE/WDA/inc/legacy/palTypes.h:48,
from drivers/staging/prima/CORE/WDA/inc/legacy/halTypes.h:48,
from drivers/staging/prima/CORE/MAC/inc/aniGlobal.h:53,
from drivers/staging/prima/CORE/MAC/inc/macTrace.h:47,
from drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:47:
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c: In function 'macTraceGetP2PConnState':
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:101:28: error: 'P2P_NOT_ACTIVE' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_NOT_ACTIVE);
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:101:9: note: in expansion of macro 'CASE_RETURN_STRING'
CASE_RETURN_STRING(P2P_NOT_ACTIVE);
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:101:28: note: each undeclared identifier is reported only once for each function it appears in
CASE_RETURN_STRING(P2P_NOT_ACTIVE);
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:101:9: note: in expansion of macro 'CASE_RETURN_STRING'
CASE_RETURN_STRING(P2P_NOT_ACTIVE);
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:102:28: error: 'P2P_GO_NEG_PROCESS' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_GO_NEG_PROCESS);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:103:28: error: 'P2P_GO_NEG_COMPLETED' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_GO_NEG_COMPLETED);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:104:28: error: 'P2P_CLIENT_CONNECTING_STATE_1' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_CLIENT_CONNECTING_STATE_1);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:105:28: error: 'P2P_GO_COMPLETED_STATE' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_GO_COMPLETED_STATE);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:106:28: error: 'P2P_CLIENT_CONNECTED_STATE_1' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_CLIENT_CONNECTED_STATE_1);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:107:28: error: 'P2P_CLIENT_DISCONNECTED_STATE' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_CLIENT_DISCONNECTED_STATE);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:108:28: error: 'P2P_CLIENT_CONNECTING_STATE_2' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_CLIENT_CONNECTING_STATE_2);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c:109:28: error: 'P2P_CLIENT_COMPLETED_STATE' undeclared (first use in this function)
CASE_RETURN_STRING(P2P_CLIENT_COMPLETED_STATE);
^
drivers/staging/prima/CORE/VOSS/inc/vos_trace.h:101:14: note: in definition of macro 'CASE_RETURN_STRING'
case ( ( str ) ): return( (tANI_U8*)(#str) );
^
scripts/Makefile.build:308: recipe for target 'drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.o' failed
make[3]: *** [drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.o] Error 1
make[3]: *** Waiting for unfinished jobs....
scripts/Makefile.build:455: recipe for target 'drivers/staging/prima' failed
make[2]: *** [drivers/staging/prima] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:834: recipe for target 'drivers' failed
make: *** [drivers] Error 2
any solution?
Hi,
Did you find any solution for this issue ?
BR
Viswanth

Kernel compilation error - Mi4i

As, by going previous issues i found solution of "tspdrv.h not found" by doing
#include to "tspdrv.h"
now it is giving error like shown below...
Device kernel: - Xiomi mi4i
CC drivers/misc/qcom/qdsp6v2/audio_amrnb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwbplus.o
CC drivers/misc/qcom/qdsp6v2/audio_evrc.o
CC drivers/misc/qcom/qdsp6v2/audio_qcelp.o
CC drivers/misc/qcom/qdsp6v2/amrwb_in.o
LD drivers/misc/qcom/qdsp6v2/built-in.o
LD drivers/misc/qcom/built-in.o
CC drivers/misc/tspdrv/tspdrv.o
In file included from drivers/misc/tspdrv/tspdrv.c:43:0:
drivers/misc/tspdrv/tspdrv.h:90:9: note: #pragma message: ************ KERNEL ************
#pragma message "************ KERNEL ***********"
^
In file included from include/linux/kernel.h:14:0,
from include/linux/sched.h:15,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/compat.h:25,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/misc/tspdrv/tspdrv.c:34:
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'isa1000_vib_set_level':
include/linux/dynamic_debug.h:64:16: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration]
static struct ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS_)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: note: each undeclared identifier is reported only once for each function it appears in
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'ImmVibeSPI_ForceOut_SetSamples':
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:487:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target 'drivers/misc/tspdrv/tspdrv.o' failed
make[3]: ** [drivers/misc/tspdrv/tspdrv.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/misc/tspdrv' failed
make[2]: *** [drivers/misc/tspdrv] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
Thank you....
Need more info like which source are you using, compiler, and such. Also, please move the thread to thw QA section, this is the development section.
System info
haikalizz said:
Need more info like which source are you using, compiler, and such. Also, please move the thread to thw QA section, this is the development section.
Click to expand...
Click to collapse
toolchain :- NDK- aarch64-linux-android-gcc (version 4.9)
Kernel source :- https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/ferrari-l-oss
Ubuntu 64 bit 16.04 LTS (all things upgraded)
All necessary packages installed for building
thank you for quick reply...
Btw how can i move this thread to Q&A?
Alright, you may need to redownload those sources back. This happened to me the first time. Make sure the file exists where it is supposed to be after you redownload, if not you can try another source..
haikalizz said:
Alright, you may need to redownload those sources back. This happened to me the first time. Make sure the file exists where it is supposed to be after you redownload, if not you can try another source..
Click to expand...
Click to collapse
It's compiling now....
Redownloaded source and it worked.
Thanks mate...: highfive:

Error while compiling Kernel from source (Mediatek)

So I was compiling kernel for my Meizu m2 note and I encountered this error :
Code:
In file included from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/io.h:243:0,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/clocksource.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/clocksource/arm_arch_timer.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/arch_timer.h:27,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/timex.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timex.h:65,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/jiffies.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/ktime.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timer.h:5,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/workqueue.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/pm.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/device.h:25,
from drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:11:
/home/suvam/RRMM/kernel/meizu/m2note/include/asm-generic/iomap.h:31:21: note: expected 'void *' but argument is of type 'long unsigned int'
extern unsigned int ioread32(void __iomem *);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:99:26: warning: passing argument 1 of 'ioread32' makes pointer from integer without a cast
#define ISP_RD32(addr) ioread32(addr)
^
/home/suvam/RRMM/kernel/meizu/m2note/include/linux/printk.h:248:38: note: in expansion of macro 'ISP_RD32'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:87:37: note: in expansion of macro 'pr_debug'
#define LOG_DBG(format, args...) pr_debug(MyTag format, ##args)
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:10828:3: note: in expansion of macro 'LOG_DBG'
LOG_DBG("0x%08X %08X", (unsigned int)(ISP_TPIPE_ADDR + 0x00a8), (unsigned int)ISP_RD32(ISP_ADDR + 0x00a8));
^
In file included from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/io.h:243:0,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/clocksource.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/clocksource/arm_arch_timer.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/arch_timer.h:27,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/timex.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timex.h:65,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/jiffies.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/ktime.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timer.h:5,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/workqueue.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/pm.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/device.h:25,
from drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:11:
/home/suvam/RRMM/kernel/meizu/m2note/include/asm-generic/iomap.h:31:21: note: expected 'void *' but argument is of type 'long unsigned int'
extern unsigned int ioread32(void __iomem *);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: At top level:
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:175:22: warning: 'g_isp_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_isp_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:176:22: warning: 'g_isp_inner_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_isp_inner_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:177:22: warning: 'g_imgsys_config_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_imgsys_config_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'compat_put_isp_read_register_data':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:8407:6: warning: 'err' is used uninitialized in this function [-Wuninitialized]
err |= get_user(count, &data->Count);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'ISP_DONE_Buf_Time.isra.4':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:5522:49: warning: 'out' may be used uninitialized in this function [-Wmaybe-uninitialized]
pstRTBuf->ring_buf[i_dma].img_cnt = sof_count[out];
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'ISP_Buf_CTRL_FUNC':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:4447:34: warning: 'out' may be used uninitialized in this function [-Wmaybe-uninitialized]
deque_buf.sof_cnt = sof_count[out];
^
LD drivers/misc/mediatek/mach/mt6735/built-in.o
LD drivers/misc/mediatek/mach/built-in.o
make[4]: *** [drivers/misc/mediatek] Error 2
make[3]: *** [drivers/misc] Error 2
make[2]: *** [drivers] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/suvam/RRMM/kernel/meizu/m2note'
make: *** [TARGET_KERNEL_BINARIES] Error 2
#### make failed to build some targets (09:32 (mm:ss)) ####
Can somebody please help me out ?

[Resolved] Struct has no member named

So,
This error has been around like 5 days now.
Trying to compile aarch64 kernel which actually works if some drivers are disabled in defconfig, otherwise, they don't compile.
For example: arizona-core.c
Error message:
Code:
CC drivers/mfd/arizona-core.o
In file included from /home/nonta72/LP51/include/linux/kernel.h:13:0,
from /home/nonta72/LP51/include/linux/delay.h:10,
from /home/nonta72/LP51/drivers/mfd/arizona-core.c:13:
/home/nonta72/LP51/drivers/mfd/arizona-core.c: In function 'arizona_runtime_resume':
/home/nonta72/LP51/drivers/mfd/arizona-core.c:735:121: error: 'struct arizona_pdata' has no member named 'ldo_enable'
pr_debug("%s, ldo_enable=%d, ena_ldo=%d, reset=%d, i2c_addr=%d, irq_gpio=%d\n", __func__, gpio_get_value(arizona->pdata.ldo_enable),
^
/home/nonta72/LP51/include/linux/printk.h:246:38: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
/home/nonta72/LP51/drivers/mfd/arizona-core.c:736:33: error: 'struct arizona_pdata' has no member named 'ena_ldo'
gpio_get_value(arizona->pdata.ena_ldo), gpio_get_value(arizona->pdata.reset),
^
/home/nonta72/LP51/include/linux/printk.h:246:38: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
/home/nonta72/LP51/drivers/mfd/arizona-core.c:737:33: error: 'struct arizona_pdata' has no member named 'i2c_addr'
gpio_get_value(arizona->pdata.i2c_addr), gpio_get_value(arizona->pdata.irq_gpio));
^
/home/nonta72/LP51/include/linux/printk.h:246:38: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
Driver : https://github.com/Nonta72/android_kernel_bq_msm8939/blob/cm-14.1/drivers/mfd/arizona-core.c
Solution:
In pdata.h file, find struct arizona_pdata and add this
Code:
int ldo_enable;
int ena_ldo;
int i2c_addr;

Getting irq/irqdesc.o error while kernel compilation

I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
fawazahmed0 said:
I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
Click to expand...
Click to collapse
Now works perfectly, followed this guide:
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297

Categories

Resources