linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuehaibing <yuehaibing@huawei.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: <amitkarwar@gmail.com>, <ganapathi.bhat@nxp.com>,
	<huxinming820@gmail.com>, <davem@davemloft.net>,
	<kuba@kernel.org>, <christophe.jaillet@wanadoo.fr>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mwifiex: pcie: Fix -Wunused-const-variable warnings
Date: Mon, 7 Sep 2020 17:40:55 +0800	[thread overview]
Message-ID: <ae128bf3-fd9b-ee88-1c61-54a4a604a6cf@huawei.com> (raw)
In-Reply-To: <0101017467b37012-2cad5962-8995-49d0-bf12-37c96107742a-000000@us-west-2.amazonses.com>


commit 77dacc8fc64c ("mwifiex: pcie: Move tables to the only place they're used")

do the same things.

On 2020/9/7 16:34, Kalle Valo wrote:
> YueHaibing <yuehaibing@huawei.com> wrote:
> 
>> These variables only used in pcie.c, move them to .c file
>> can silence these warnings:
>>
>> In file included from drivers/net/wireless/marvell/mwifiex/main.h:57:0,
>>                  from drivers/net/wireless/marvell/mwifiex/init.c:24:
>> drivers/net/wireless/marvell/mwifiex/pcie.h:310:41: warning: mwifiex_pcie8997 defined but not used [-Wunused-const-variable=]
>>  static const struct mwifiex_pcie_device mwifiex_pcie8997 = {
>>                                          ^~~~~~~~~~~~~~~~
>> drivers/net/wireless/marvell/mwifiex/pcie.h:300:41: warning: mwifiex_pcie8897 defined but not used [-Wunused-const-variable=]
>>  static const struct mwifiex_pcie_device mwifiex_pcie8897 = {
>>                                          ^~~~~~~~~~~~~~~~
>> drivers/net/wireless/marvell/mwifiex/pcie.h:292:41: warning: mwifiex_pcie8766 defined but not used [-Wunused-const-variable=]
>>  static const struct mwifiex_pcie_device mwifiex_pcie8766 = {
>>                                          ^~~~~~~~~~~~~~~~
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Failed to build:
> 
> drivers/net/wireless/marvell/mwifiex/pcie.c:191:43: error: redefinition of 'mwifiex_reg_8766'
>   191 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
>       |                                           ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:36:43: note: previous definition of 'mwifiex_reg_8766' was here
>    36 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
>       |                                           ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:223:43: error: redefinition of 'mwifiex_reg_8897'
>   223 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = {
>       |                                           ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:68:43: note: previous definition of 'mwifiex_reg_8897' was here
>    68 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = {
>       |                                           ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:260:43: error: redefinition of 'mwifiex_reg_8997'
>   260 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8997 = {
>       |                                           ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:105:43: note: previous definition of 'mwifiex_reg_8997' was here
>   105 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8997 = {
>       |                                           ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:297:35: error: redefinition of 'mem_type_mapping_tbl_w8897'
>   297 | static struct memory_type_mapping mem_type_mapping_tbl_w8897[] = {
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:142:35: note: previous definition of 'mem_type_mapping_tbl_w8897' was here
>   142 | static struct memory_type_mapping mem_type_mapping_tbl_w8897[] = {
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:308:35: error: redefinition of 'mem_type_mapping_tbl_w8997'
>   308 | static struct memory_type_mapping mem_type_mapping_tbl_w8997[] = {
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:153:35: note: previous definition of 'mem_type_mapping_tbl_w8997' was here
>   153 | static struct memory_type_mapping mem_type_mapping_tbl_w8997[] = {
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:312:41: error: redefinition of 'mwifiex_pcie8766'
>   312 | static const struct mwifiex_pcie_device mwifiex_pcie8766 = {
>       |                                         ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:157:41: note: previous definition of 'mwifiex_pcie8766' was here
>   157 | static const struct mwifiex_pcie_device mwifiex_pcie8766 = {
>       |                                         ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:320:41: error: redefinition of 'mwifiex_pcie8897'
>   320 | static const struct mwifiex_pcie_device mwifiex_pcie8897 = {
>       |                                         ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:165:41: note: previous definition of 'mwifiex_pcie8897' was here
>   165 | static const struct mwifiex_pcie_device mwifiex_pcie8897 = {
>       |                                         ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:330:41: error: redefinition of 'mwifiex_pcie8997'
>   330 | static const struct mwifiex_pcie_device mwifiex_pcie8997 = {
>       |                                         ^~~~~~~~~~~~~~~~
> drivers/net/wireless/marvell/mwifiex/pcie.c:175:41: note: previous definition of 'mwifiex_pcie8997' was here
>   175 | static const struct mwifiex_pcie_device mwifiex_pcie8997 = {
>       |                                         ^~~~~~~~~~~~~~~~
> make[5]: *** [drivers/net/wireless/marvell/mwifiex/pcie.o] Error 1
> make[4]: *** [drivers/net/wireless/marvell/mwifiex] Error 2
> make[3]: *** [drivers/net/wireless/marvell] Error 2
> make[2]: *** [drivers/net/wireless] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
> 
> Patch set to Changes Requested.
> 


      parent reply	other threads:[~2020-09-07  9:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 14:09 [PATCH] mwifiex: pcie: Fix -Wunused-const-variable warnings YueHaibing
2020-09-07  8:34 ` Kalle Valo
     [not found] ` <0101017467b37012-2cad5962-8995-49d0-bf12-37c96107742a-000000@us-west-2.amazonses.com>
2020-09-07  9:40   ` Yuehaibing [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=ae128bf3-fd9b-ee88-1c61-54a4a604a6cf@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=amitkarwar@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=ganapathi.bhat@nxp.com \
    --cc=huxinming820@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.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 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).