[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1606448026.14483.4.camel@realtek.com>
Date: Fri, 27 Nov 2020 03:34:59 +0000
From: Pkshih <pkshih@...ltek.com>
To: "kvalo@...eaurora.org" <kvalo@...eaurora.org>,
"lee.jones@...aro.org" <lee.jones@...aro.org>
CC: Tony Chuang <yhchuang@...ltek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"kuba@...nel.org" <kuba@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
The subject prefix doesn't need 'realtek:'; use 'rtw88:'.
On Thu, 2020-11-26 at 13:31 +0000, Lee Jones wrote:
> Also strip out other duplicates from driver specific headers.
>
> Ensure 'main.h' is explicitly included in 'pci.h' since the latter
> uses some defines from the former. It avoids issues like:
>
> from drivers/net/wireless/realtek/rtw88/rtw8822be.c:5:
> drivers/net/wireless/realtek/rtw88/pci.h:209:28: error:
> ‘RTK_MAX_TX_QUEUE_NUM’ undeclared here (not in a function); did you mean
> ‘RTK_MAX_RX_DESC_NUM’?
> 209 | DECLARE_BITMAP(tx_queued, RTK_MAX_TX_QUEUE_NUM);
> | ^~~~~~~~~~~~~~~~~~~~
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/net/wireless/realtek/rtw88/pci.c:1488:5: warning: no previous
> prototype for ‘rtw_pci_probe’ [-Wmissing-prototypes]
> 1488 | int rtw_pci_probe(struct pci_dev *pdev,
> | ^~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/pci.c:1568:6: warning: no previous
> prototype for ‘rtw_pci_remove’ [-Wmissing-prototypes]
> 1568 | void rtw_pci_remove(struct pci_dev *pdev)
> | ^~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/pci.c:1590:6: warning: no previous
> prototype for ‘rtw_pci_shutdown’ [-Wmissing-prototypes]
> 1590 | void rtw_pci_shutdown(struct pci_dev *pdev)
> | ^~~~~~~~~~~~~~~~
>
> Cc: Yan-Hsuan Chuang <yhchuang@...ltek.com>
> Cc: Kalle Valo <kvalo@...eaurora.org>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: linux-wireless@...r.kernel.org
> Cc: netdev@...r.kernel.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
> ---
> drivers/net/wireless/realtek/rtw88/pci.h | 8 ++++++++
> drivers/net/wireless/realtek/rtw88/rtw8723de.c | 1 +
> drivers/net/wireless/realtek/rtw88/rtw8723de.h | 4 ----
> drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 1 +
> drivers/net/wireless/realtek/rtw88/rtw8821ce.h | 4 ----
> drivers/net/wireless/realtek/rtw88/rtw8822be.c | 1 +
> drivers/net/wireless/realtek/rtw88/rtw8822be.h | 4 ----
> drivers/net/wireless/realtek/rtw88/rtw8822ce.c | 1 +
> drivers/net/wireless/realtek/rtw88/rtw8822ce.h | 4 ----
> 9 files changed, 12 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/pci.h
> b/drivers/net/wireless/realtek/rtw88/pci.h
> index ca17aa9cf7dc7..cda56919a5f0f 100644
> --- a/drivers/net/wireless/realtek/rtw88/pci.h
> +++ b/drivers/net/wireless/realtek/rtw88/pci.h
> @@ -5,6 +5,8 @@
> #ifndef __RTK_PCI_H_
> #define __RTK_PCI_H_
>
> +#include "main.h"
> +
Please #include "main.h" ahead of "pci.h" in each of rtw8xxxxe.c.
> #define RTK_DEFAULT_TX_DESC_NUM 128
> #define RTK_BEQ_TX_DESC_NUM 256
>
> @@ -212,6 +214,12 @@ struct rtw_pci {
> void __iomem *mmap;
> };
>
> +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);
> +void rtw_pci_shutdown(struct pci_dev *pdev);
> +
> static inline u32 max_num_of_tx_queue(u8 queue)
> {
> u32 max_num;
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723de.c
> b/drivers/net/wireless/realtek/rtw88/rtw8723de.c
> index c81eb4c336425..2dd689441e8dc 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8723de.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8723de.c
> @@ -4,6 +4,7 @@
>
> #include <linux/module.h>
> #include <linux/pci.h>
I mean here:
#include "main.h"
> +#include "pci.h"
> #include "rtw8723de.h"
>
> static const struct pci_device_id rtw_8723de_id_table[] = {
>
[snip]
---
Ping-Ke
Powered by blists - more mailing lists