lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 7 Sep 2020 08:34:05 +0000
From:   Kalle Valo <kvalo@...eaurora.org>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     <amitkarwar@...il.com>, <ganapathi.bhat@....com>,
        <huxinming820@...il.com>, <davem@...emloft.net>, <kuba@...nel.org>,
        <christophe.jaillet@...adoo.fr>, <yuehaibing@...wei.com>,
        <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mwifiex: pcie: Fix -Wunused-const-variable warnings

YueHaibing <yuehaibing@...wei.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@...wei.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.

-- 
https://patchwork.kernel.org/patch/11750661/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ