All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: hby <hby2003@163.com>
Cc: davem@davemloft.net, kuba@kernel.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, hby <hby2003@163.com>
Subject: Re: [PATCH v2] brmcfmac: fix compile when DEBUG is defined
Date: Mon,  7 Dec 2020 16:31:16 +0000 (UTC)	[thread overview]
Message-ID: <20201207163117.006FFC433C6@smtp.codeaurora.org> (raw)
In-Reply-To: <20201124142440.67554-1-hby2003@163.com>

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


  reply	other threads:[~2020-12-07 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 14:24 [PATCH v2] brmcfmac: fix compile when DEBUG is defined hby
2020-12-07 16:31 ` Kalle Valo [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201207163117.006FFC433C6@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=hby2003@163.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.