* [PATCH] rtw88: fix multiple definition of rtw_pm_ops
@ 2020-12-08 1:37 Ping-Ke Shih
2020-12-08 7:34 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Ping-Ke Shih @ 2020-12-08 1:37 UTC (permalink / raw)
To: kvalo; +Cc: tony0620emma, linux-wireless
'const struct dev_pm_ops rtw_pm_ops' is declared by pci.c, and it should be
declare as 'extern' in pci.h. Without 'extern' causes every file including
pci.h has an individual instance of rtw_pm_ops but not reference to the one
declared in pci.c
If kernel config, like test robot, doesn't build driver as module, it leads
multiple definition.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 2e86ef413ab3 ("rtw88: pci: Add prototypes for .probe, .remove and .shutdown")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw88/pci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/pci.h b/drivers/net/wireless/realtek/rtw88/pci.h
index cda56919a5f0..7cdefe229824 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.h
+++ b/drivers/net/wireless/realtek/rtw88/pci.h
@@ -214,7 +214,7 @@ struct rtw_pci {
void __iomem *mmap;
};
-const struct dev_pm_ops rtw_pm_ops;
+extern const struct dev_pm_ops rtw_pm_ops;
int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id);
void rtw_pci_remove(struct pci_dev *pdev);
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtw88: fix multiple definition of rtw_pm_ops
2020-12-08 1:37 [PATCH] rtw88: fix multiple definition of rtw_pm_ops Ping-Ke Shih
@ 2020-12-08 7:34 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-12-08 7:34 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: tony0620emma, linux-wireless
Ping-Ke Shih <pkshih@realtek.com> wrote:
> 'const struct dev_pm_ops rtw_pm_ops' is declared by pci.c, and it should be
> declare as 'extern' in pci.h. Without 'extern' causes every file including
> pci.h has an individual instance of rtw_pm_ops but not reference to the one
> declared in pci.c
>
> If kernel config, like test robot, doesn't build driver as module, it leads
> multiple definition.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 2e86ef413ab3 ("rtw88: pci: Add prototypes for .probe, .remove and .shutdown")
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-drivers-next.git, thanks.
91aeaf09a6ee rtw88: fix multiple definition of rtw_pm_ops
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201208013746.11065-1-pkshih@realtek.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-08 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 1:37 [PATCH] rtw88: fix multiple definition of rtw_pm_ops Ping-Ke Shih
2020-12-08 7:34 ` 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).