* [PATCH v2] brmcfmac: fix compile when DEBUG is defined
@ 2020-11-24 14:24 hby
2020-12-07 16:31 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: hby @ 2020-11-24 14:24 UTC (permalink / raw)
To: kvalo, davem, kuba; +Cc: linux-wireless, netdev, linux-kernel, hby
The steps:
1. add "#define DEBUG" in drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c line 61.
2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux bcm2835_defconfig
3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux/ zImage modules dtbs -j8
Then, it will fail, the compile log described below:
Kernel: arch/arm/boot/zImage is ready
MODPOST Module.symvers
ERROR: modpost: "brcmf_debugfs_add_entry" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
ERROR: modpost: "brcmf_debugfs_get_devdir" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
ERROR: modpost: "__brcmf_dbg" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
scripts/Makefile.modpost:111: recipe for target 'Module.symvers' failed
make[2]: *** [Module.symvers] Error 1
make[2]: *** Deleting file 'Module.symvers'
Makefile:1390: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/hby/gitee/linux_origin/Out_Linux'
Makefile:185: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
Signed-off-by: hby <hby2003@163.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
index 4146faeed..c2eb3aa67 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
@@ -60,7 +60,7 @@ void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...);
##__VA_ARGS__); \
} while (0)
-#if defined(DEBUG) || defined(CONFIG_BRCM_TRACING)
+#if defined(CONFIG_BRCM_TRACING) || defined(CONFIG_BRCMDBG)
/* For debug/tracing purposes treat info messages as errors */
#define brcmf_info brcmf_err
@@ -114,7 +114,7 @@ extern int brcmf_msg_level;
struct brcmf_bus;
struct brcmf_pub;
-#ifdef DEBUG
+#if defined(CONFIG_BRCMDBG)
struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr);
void brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
int (*read_fn)(struct seq_file *seq, void *data));
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] brmcfmac: fix compile when DEBUG is defined
2020-11-24 14:24 [PATCH v2] brmcfmac: fix compile when DEBUG is defined hby
@ 2020-12-07 16:31 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-12-07 16:31 UTC (permalink / raw)
To: hby; +Cc: davem, kuba, linux-wireless, netdev, linux-kernel, hby
hby <hby2003@163.com> wrote:
> The steps:
> 1. add "#define DEBUG" in drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c line 61.
> 2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux bcm2835_defconfig
> 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux/ zImage modules dtbs -j8
>
> Then, it will fail, the compile log described below:
>
> Kernel: arch/arm/boot/zImage is ready
> MODPOST Module.symvers
> ERROR: modpost: "brcmf_debugfs_add_entry" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
> ERROR: modpost: "brcmf_debugfs_get_devdir" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
> ERROR: modpost: "__brcmf_dbg" [drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
> scripts/Makefile.modpost:111: recipe for target 'Module.symvers' failed
> make[2]: *** [Module.symvers] Error 1
> make[2]: *** Deleting file 'Module.symvers'
> Makefile:1390: recipe for target 'modules' failed
> make[1]: *** [modules] Error 2
> make[1]: Leaving directory '/home/hby/gitee/linux_origin/Out_Linux'
> Makefile:185: recipe for target '__sub-make' failed
> make: *** [__sub-make] Error 2
>
> Signed-off-by: hby <hby2003@163.com>
I checked and brcmd80211/Makefile has:
subdir-ccflags-$(CONFIG_BRCMDBG) += -DDEBUG
I don't understand why brcm80211 uses DEBUG flag like that, but I guess there's
a reason. I think that either _all_ DEBUG uses should be removed from the
driver, or you shouldn't add "#define DEBUG" on your own to any of the files.
So this patch is not the best solution.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201124142440.67554-1-hby2003@163.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drivers: Fix the Raspberry Pi debug version compile
@ 2020-11-22 10:06 hby
2020-11-23 15:59 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: hby @ 2020-11-22 10:06 UTC (permalink / raw)
To: kvalo, davem, kuba; +Cc: linux-wireless, netdev, linux-kernel, hby
enable the DEBUG in source code, and it will compile fail,
modify the DEBUG macro, to adapt the compile
Signed-off-by: hby <hby2003@163.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
index 4146faeed..c2eb3aa67 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
@@ -60,7 +60,7 @@ void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...);
##__VA_ARGS__); \
} while (0)
-#if defined(DEBUG) || defined(CONFIG_BRCM_TRACING)
+#if defined(CONFIG_BRCM_TRACING) || defined(CONFIG_BRCMDBG)
/* For debug/tracing purposes treat info messages as errors */
#define brcmf_info brcmf_err
@@ -114,7 +114,7 @@ extern int brcmf_msg_level;
struct brcmf_bus;
struct brcmf_pub;
-#ifdef DEBUG
+#if defined(CONFIG_BRCMDBG)
struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr);
void brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
int (*read_fn)(struct seq_file *seq, void *data));
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: Fix the Raspberry Pi debug version compile
2020-11-22 10:06 [PATCH] drivers: Fix the Raspberry Pi debug version compile hby
@ 2020-11-23 15:59 ` Kalle Valo
2020-11-24 1:46 ` [PATCH v2] brmcfmac: fix compile when DEBUG is defined hby
0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2020-11-23 15:59 UTC (permalink / raw)
To: hby; +Cc: davem, kuba, linux-wireless, netdev, linux-kernel
hby <hby2003@163.com> writes:
> enable the DEBUG in source code, and it will compile fail,
> modify the DEBUG macro, to adapt the compile
>
> Signed-off-by: hby <hby2003@163.com>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This has nothing to do with Raspberry Pi, so the title should be:
brmcfmac: fix compile when DEBUG is defined
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] brmcfmac: fix compile when DEBUG is defined
2020-11-23 15:59 ` Kalle Valo
@ 2020-11-24 1:46 ` hby
2020-11-24 7:19 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: hby @ 2020-11-24 1:46 UTC (permalink / raw)
To: Kalle Valo; +Cc: davem, kuba, linux-wireless, netdev, linux-kernel
I am sorry for the HTML email, and I change the email client. The patch
update.
From b87d429158b4efc3f6835828f495a261e17d5af4 Mon Sep 17 00:00:00 2001
From: hby <hby2003@163.com>
Date: Tue, 24 Nov 2020 09:16:24 +0800
Subject: [PATCH] brmcfmac: fix compile when DEBUG is defined
The steps:
1. add "#define DEBUG" in
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c line 61.
2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux
bcm2835_defconfig
3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux/
zImage modules dtbs -j8
Then, it will fail, the compile log described below:
Kernel: arch/arm/boot/zImage is ready
MODPOST Module.symvers
ERROR: modpost: "brcmf_debugfs_add_entry"
[drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
ERROR: modpost: "brcmf_debugfs_get_devdir"
[drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
ERROR: modpost: "__brcmf_dbg"
[drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko] undefined!
scripts/Makefile.modpost:111: recipe for target 'Module.symvers' failed
make[2]: *** [Module.symvers] Error 1
make[2]: *** Deleting file 'Module.symvers'
Makefile:1390: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/hby/gitee/linux_origin/Out_Linux'
Makefile:185: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
Signed-off-by: hby <hby2003@163.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
index 4146faeed..c2eb3aa67 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
@@ -60,7 +60,7 @@ void __brcmf_err(struct brcmf_bus *bus, const char
*func, const char *fmt, ...);
##__VA_ARGS__); \
} while (0)
-#if defined(DEBUG) || defined(CONFIG_BRCM_TRACING)
+#if defined(CONFIG_BRCM_TRACING) || defined(CONFIG_BRCMDBG)
/* For debug/tracing purposes treat info messages as errors */
#define brcmf_info brcmf_err
@@ -114,7 +114,7 @@ extern int brcmf_msg_level;
struct brcmf_bus;
struct brcmf_pub;
-#ifdef DEBUG
+#if defined(CONFIG_BRCMDBG)
struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr);
void brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
int (*read_fn)(struct seq_file *seq, void *data));
--
2.17.1
在 2020/11/23 23:59, Kalle Valo 写道:
> hby <hby2003@163.com> writes:
>
>> enable the DEBUG in source code, and it will compile fail,
>> modify the DEBUG macro, to adapt the compile
>>
>> Signed-off-by: hby <hby2003@163.com>
>> ---
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
> This has nothing to do with Raspberry Pi, so the title should be:
>
> brmcfmac: fix compile when DEBUG is defined
>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] brmcfmac: fix compile when DEBUG is defined
2020-11-24 1:46 ` [PATCH v2] brmcfmac: fix compile when DEBUG is defined hby
@ 2020-11-24 7:19 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-11-24 7:19 UTC (permalink / raw)
To: hby; +Cc: davem, kuba, linux-wireless, netdev, linux-kernel
hby <hby2003@163.com> writes:
> I am sorry for the HTML email, and I change the email client. The
> patch update.
>
> From b87d429158b4efc3f6835828f495a261e17d5af4 Mon Sep 17 00:00:00 2001
> From: hby <hby2003@163.com>
> Date: Tue, 24 Nov 2020 09:16:24 +0800
> Subject: [PATCH] brmcfmac: fix compile when DEBUG is defined
>
> The steps:
> 1. add "#define DEBUG" in
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c line 61.
> 2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux
> bcm2835_defconfig
> 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../Out_Linux/
> zImage modules dtbs -j8
>
> Then, it will fail, the compile log described below:
It doesn't work like this, the patch handling is very much automated and
you can't just reply with a new patch. I strongly recommend to use git
send-email and read the wiki page below.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-07 16:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 14:24 [PATCH v2] brmcfmac: fix compile when DEBUG is defined hby
2020-12-07 16:31 ` Kalle Valo
-- strict thread matches above, loose matches on Subject: below --
2020-11-22 10:06 [PATCH] drivers: Fix the Raspberry Pi debug version compile hby
2020-11-23 15:59 ` Kalle Valo
2020-11-24 1:46 ` [PATCH v2] brmcfmac: fix compile when DEBUG is defined hby
2020-11-24 7:19 ` Kalle Valo
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).