mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Hante Meuleman <meuleman@broadcom.com>,
	"netdev\@vger.kernel.org" <netdev@vger.kernel.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	brcm80211-dev-list@broadcom.com,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash
Date: Sat, 16 Jan 2016 14:03:25 +0200	[thread overview]
Message-ID: <87fuxx7muq.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CAMuHMdWYrQtWUwPJ0i95WphvW-Q6pj900xYgbjwkizj6tp26cg@mail.gmail.com> (Geert Uytterhoeven's message of "Thu, 14 Jan 2016 21:23:57 +0100")

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> On Wed, Jan 13, 2016 at 5:55 AM, Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org> wrote:
>> Commit:     46d703a775394e4724509ff55cdda41d228c028c
>>    brcmfmac: Unify methods to define and map firmware files.
>

[...]

> This change breaks the build with gcc < 4.3:
>
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:598:
> error: redefinition of ‘__UNIQUE_ID_firmware598’
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:598:
> error: previous definition of ‘__UNIQUE_ID_firmware598’ was here
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:599:
> error: redefinition of ‘__UNIQUE_ID_firmware600’
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:599:
> error: previous definition of ‘__UNIQUE_ID_firmware600’ was here
>     ...
>
> The reason is that BRCMF_FW_NVRAM_DEF() expands to two instances of
> MODULE_FIRMWARE():
>
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
>>
>> +#define BRCMF_FW_NVRAM_DEF(fw_nvram_name, fw, nvram) \
>> +static const char BRCM_ ## fw_nvram_name ## _FIRMWARE_NAME[] = \
>> +       BRCMF_FW_DEFAULT_PATH fw; \
>> +static const char BRCM_ ## fw_nvram_name ## _NVRAM_NAME[] = \
>> +       BRCMF_FW_DEFAULT_PATH nvram; \
>> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw); \
>> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH nvram)
>
> When compiling using gcc < 4.3, __UNIQUE_ID() uses __LINE__ instead of
> __COUNTER__, as the latter is not available. Hence it derives a "unique" ID
> from the same source line number, causing a redefinition.

Hante, what should we do? We need to fix this build breakage ASAP.

-- 
Kalle Valo

      reply	other threads:[~2016-01-16 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 20:23 brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash (was: Re: brcmfmac: Unify methods to define and map firmware files.) Geert Uytterhoeven
2016-01-16 12:03 ` Kalle Valo [this message]

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=87fuxx7muq.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=meuleman@broadcom.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®