linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless
@ 2020-11-26 13:31 Lee Jones
  2020-11-26 13:31 ` [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_' Lee Jones
                   ` (16 more replies)
  0 siblings, 17 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, David S. Miller, Emmanuel Grumbach,
	Intel Linux Wireless, Jakub Kicinski, Johannes Berg,
	linux-wireless, Lorenzo Bianconi, Luca Coelho, Maya Erez, netdev,
	QCA ath9k Development, Shahar S Matityahu, wil6210,
	Yan-Hsuan Chuang

[Last batch!]

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

v2:
 - Unify rtw_pci_(probe,remove,shutdown}() prototypses
   - Suggested-by: Brian Norris

Lee Jones (17):
  wil6210: wmi: Correct misnamed function parameter 'ptr_'
  iwlwifi: mvm: rs: Demote non-conformant function documentation headers
  ath9k: ar9330_1p1_initvals: Remove unused const variable
    'ar9331_common_tx_gain_offset1_1'
  ath9k: ar9340_initvals: Remove unused const variable
    'ar9340Modes_ub124_tx_gain_table_1p0'
  ath9k: ar9485_initvals: Remove unused const variable
    'ar9485_fast_clock_1_1_baseband_postamble'
  ath9k: ar9003_2p2_initvals: Remove unused const variables
  iwlwifi: iwl-eeprom-read: Demote one nonconformant function header
  iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's
    header
  ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg'
    param
  ath9k: ar5008_phy: Demote half completed function headers
  ath: dfs_pattern_detector: Fix some function kernel-doc headers
  ath: dfs_pri_detector: Demote zero/half completed kernel-doc headers
  iwlwifi: iwl-phy-db: Add missing struct member description for 'trans'
  iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header
  ath9k: dynack: Demote non-compliant function header
  iwlwifi: fw: acpi: Demote non-conformant function headers
  realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown

 drivers/net/wireless/ath/ath9k/ar5008_phy.c   |  15 +--
 .../wireless/ath/ath9k/ar9003_2p2_initvals.h  |  14 ---
 .../wireless/ath/ath9k/ar9330_1p1_initvals.h  |   7 --
 .../net/wireless/ath/ath9k/ar9340_initvals.h  | 101 ------------------
 .../net/wireless/ath/ath9k/ar9485_initvals.h  |   7 --
 drivers/net/wireless/ath/ath9k/dynack.c       |   3 +-
 .../net/wireless/ath/dfs_pattern_detector.c   |  14 +--
 drivers/net/wireless/ath/dfs_pri_detector.c   |   9 +-
 drivers/net/wireless/ath/regd.c               |   1 +
 drivers/net/wireless/ath/wil6210/wmi.c        |   2 +-
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c  |  12 +--
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   |   2 +-
 .../wireless/intel/iwlwifi/iwl-eeprom-parse.c |  12 +--
 .../wireless/intel/iwlwifi/iwl-eeprom-read.c  |   2 +-
 .../net/wireless/intel/iwlwifi/iwl-phy-db.c   |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c   |  10 +-
 drivers/net/wireless/realtek/rtw88/pci.h      |   8 ++
 .../net/wireless/realtek/rtw88/rtw8723de.c    |   1 +
 .../net/wireless/realtek/rtw88/rtw8723de.h    |   4 -
 .../net/wireless/realtek/rtw88/rtw8821ce.c    |   1 +
 .../net/wireless/realtek/rtw88/rtw8821ce.h    |   4 -
 .../net/wireless/realtek/rtw88/rtw8822be.c    |   1 +
 .../net/wireless/realtek/rtw88/rtw8822be.h    |   4 -
 .../net/wireless/realtek/rtw88/rtw8822ce.c    |   1 +
 .../net/wireless/realtek/rtw88/rtw8822ce.h    |   4 -
 25 files changed, 50 insertions(+), 191 deletions(-)

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Maya Erez <merez@codeaurora.org>
Cc: netdev@vger.kernel.org
Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Cc: wil6210@qti.qualcomm.com
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_'
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-12-02 18:50   ` Kalle Valo
  2020-11-26 13:31 ` [PATCH 02/17] iwlwifi: mvm: rs: Demote non-conformant function documentation headers Lee Jones
                   ` (15 subsequent siblings)
  16 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Maya Erez, David S. Miller, Jakub Kicinski,
	linux-wireless, wil6210, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Function parameter or member 'ptr_' not described in 'wmi_buffer_block'
 drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Excess function parameter 'ptr' description in 'wmi_buffer_block'

Cc: Maya Erez <merez@codeaurora.org>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: wil6210@qti.qualcomm.com
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 421aebbb49e54..8699f8279a8be 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -262,7 +262,7 @@ struct fw_map *wil_find_fw_mapping(const char *section)
 /**
  * Check address validity for WMI buffer; remap if needed
  * @wil: driver data
- * @ptr: internal (linker) fw/ucode address
+ * @ptr_: internal (linker) fw/ucode address
  * @size: if non zero, validate the block does not
  *  exceed the device memory (bar)
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 02/17] iwlwifi: mvm: rs: Demote non-conformant function documentation headers
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
  2020-11-26 13:31 ` [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_' Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-12-11 18:25   ` Kalle Valo
  2020-11-26 13:31 ` [PATCH 03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1' Lee Jones
                   ` (14 subsequent siblings)
  16 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

Also add documentation for 'mvm'.

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:400: warning: cannot understand function prototype: 'const u16 expected_tpt_legacy[IWL_RATE_COUNT] = '
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'mvm' not described in '_rs_collect_tx_data'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'tbl' not described in '_rs_collect_tx_data'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'scale_index' not described in '_rs_collect_tx_data'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'attempts' not described in '_rs_collect_tx_data'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'successes' not described in '_rs_collect_tx_data'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'window' not described in '_rs_collect_tx_data'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2677: warning: duplicate section name 'NOTE'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'mvm' not described in 'rs_initialize_lq'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'sta' not described in 'rs_initialize_lq'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'lq_sta' not described in 'rs_initialize_lq'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'band' not described in 'rs_initialize_lq'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:3761: warning: Function parameter or member 'mvm' not described in 'rs_program_fix_rate'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:3761: warning: Function parameter or member 'lq_sta' not described in 'rs_program_fix_rate'
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c:4213: warning: Function parameter or member 'mvm' not described in 'iwl_mvm_tx_protection'

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index ed7382e7ea177..91b6541d579f5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -386,7 +386,7 @@ static void rs_fill_lq_cmd(struct iwl_mvm *mvm,
 			   const struct rs_rate *initial_rate);
 static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search);
 
-/**
+/*
  * The following tables contain the expected throughput metrics for all rates
  *
  *	1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54, 60 MBits
@@ -396,7 +396,6 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search);
  * CCK rates are only valid in legacy table and will only be used in G
  * (2.4 GHz) band.
  */
-
 static const u16 expected_tpt_legacy[IWL_RATE_COUNT] = {
 	7, 13, 35, 58, 40, 57, 72, 98, 121, 154, 177, 186, 0, 0, 0
 };
@@ -670,7 +669,7 @@ static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index)
 	return 0;
 }
 
-/**
+/*
  * rs_collect_tx_data - Update the success/failure sliding window
  *
  * We keep a sliding window of the last 62 packets transmitted
@@ -2667,7 +2666,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm,
 	}
 }
 
-/**
+/*
  * rs_initialize_lq - Initialize a station's hardware rate table
  *
  * The uCode's station table contains a table of fallback rates
@@ -3756,7 +3755,7 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
 }
 
 #ifdef CONFIG_MAC80211_DEBUGFS
-/**
+/*
  * Program the device to use fixed rate for frame transmit
  * This is for debugging/testing only
  * once the device start use fixed rate, we need to reload the module
@@ -4211,6 +4210,7 @@ static int rs_drv_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta,
 
 /**
  * iwl_mvm_tx_protection - ask FW to enable RTS/CTS protection
+ * @mvm: The mvm component
  * @mvmsta: The station
  * @enable: Enable Tx protection?
  */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1'
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
  2020-11-26 13:31 ` [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_' Lee Jones
  2020-11-26 13:31 ` [PATCH 02/17] iwlwifi: mvm: rs: Demote non-conformant function documentation headers Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-12-02 18:49   ` Kalle Valo
  2020-11-26 13:31 ` [PATCH 04/17] ath9k: ar9340_initvals: Remove unused const variable 'ar9340Modes_ub124_tx_gain_table_1p0' Lee Jones
                   ` (13 subsequent siblings)
  16 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h:1013:18: warning: ‘ar9331_common_tx_gain_offset1_1’ defined but not used [-Wunused-const-variable=]

Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h b/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
index 29479afbc4f10..3e783fc13553b 100644
--- a/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
@@ -1010,11 +1010,4 @@ static const u32 ar9331_common_rx_gain_1p1[][2] = {
 	{0x0000a1fc, 0x00000296},
 };
 
-static const u32 ar9331_common_tx_gain_offset1_1[][1] = {
-	{0x00000000},
-	{0x00000003},
-	{0x00000000},
-	{0x00000000},
-};
-
 #endif /* INITVALS_9330_1P1_H */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 04/17] ath9k: ar9340_initvals: Remove unused const variable 'ar9340Modes_ub124_tx_gain_table_1p0'
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (2 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1' Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 05/17] ath9k: ar9485_initvals: Remove unused const variable 'ar9485_fast_clock_1_1_baseband_postamble' Lee Jones
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath9k/ar9340_initvals.h:624:18: warning: ‘ar9340Modes_ub124_tx_gain_table_1p0’ defined but not used [-Wunused-const-variable=]

Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../net/wireless/ath/ath9k/ar9340_initvals.h  | 101 ------------------
 1 file changed, 101 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9340_initvals.h b/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
index 2eb163fc1c18f..3da4ea564148c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
@@ -621,107 +621,6 @@ static const u32 ar9340Modes_high_ob_db_tx_gain_table_1p0[][5] = {
 	{0x00016448, 0x8e481666, 0x8e481666, 0x8e481266, 0x8e481266},
 };
 
-static const u32 ar9340Modes_ub124_tx_gain_table_1p0[][5] = {
-	/* Addr      5G_HT20     5G_HT40     2G_HT40     2G_HT20   */
-	{0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a8005},
-	{0x00009820, 0x206a022e, 0x206a022e, 0x206a00ae, 0x206a00ae},
-	{0x00009830, 0x0000059c, 0x0000059c, 0x0000059c, 0x0000059c},
-	{0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec82d2e, 0x7ec82d2e},
-	{0x0000a2dc, 0xfef5d402, 0xfef5d402, 0xfdab5b52, 0xfdab5b52},
-	{0x0000a2e0, 0xfe896600, 0xfe896600, 0xfd339c84, 0xfd339c84},
-	{0x0000a2e4, 0xff01f800, 0xff01f800, 0xfec3e000, 0xfec3e000},
-	{0x0000a2e8, 0xfffe0000, 0xfffe0000, 0xfffc0000, 0xfffc0000},
-	{0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9},
-	{0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
-	{0x0000a504, 0x04002222, 0x04002222, 0x04000002, 0x04000002},
-	{0x0000a508, 0x09002421, 0x09002421, 0x08000004, 0x08000004},
-	{0x0000a50c, 0x0d002621, 0x0d002621, 0x0b000200, 0x0b000200},
-	{0x0000a510, 0x13004620, 0x13004620, 0x0f000202, 0x0f000202},
-	{0x0000a514, 0x19004a20, 0x19004a20, 0x11000400, 0x11000400},
-	{0x0000a518, 0x1d004e20, 0x1d004e20, 0x15000402, 0x15000402},
-	{0x0000a51c, 0x21005420, 0x21005420, 0x19000404, 0x19000404},
-	{0x0000a520, 0x26005e20, 0x26005e20, 0x1b000603, 0x1b000603},
-	{0x0000a524, 0x2b005e40, 0x2b005e40, 0x1f000a02, 0x1f000a02},
-	{0x0000a528, 0x2f005e42, 0x2f005e42, 0x23000a04, 0x23000a04},
-	{0x0000a52c, 0x33005e44, 0x33005e44, 0x26000a20, 0x26000a20},
-	{0x0000a530, 0x38005e65, 0x38005e65, 0x2a000e20, 0x2a000e20},
-	{0x0000a534, 0x3c005e69, 0x3c005e69, 0x2e000e22, 0x2e000e22},
-	{0x0000a538, 0x40005e6b, 0x40005e6b, 0x31000e24, 0x31000e24},
-	{0x0000a53c, 0x44005e6d, 0x44005e6d, 0x34001640, 0x34001640},
-	{0x0000a540, 0x49005e72, 0x49005e72, 0x38001660, 0x38001660},
-	{0x0000a544, 0x4e005eb2, 0x4e005eb2, 0x3b001861, 0x3b001861},
-	{0x0000a548, 0x53005f12, 0x53005f12, 0x3e001a81, 0x3e001a81},
-	{0x0000a54c, 0x59025eb5, 0x59025eb5, 0x42001a83, 0x42001a83},
-	{0x0000a550, 0x5e025f12, 0x5e025f12, 0x44001c84, 0x44001c84},
-	{0x0000a554, 0x61027f12, 0x61027f12, 0x48001ce3, 0x48001ce3},
-	{0x0000a558, 0x6702bf12, 0x6702bf12, 0x4c001ce5, 0x4c001ce5},
-	{0x0000a55c, 0x6b02bf14, 0x6b02bf14, 0x50001ce9, 0x50001ce9},
-	{0x0000a560, 0x6f02bf16, 0x6f02bf16, 0x54001ceb, 0x54001ceb},
-	{0x0000a564, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a568, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a56c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a570, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a574, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a578, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a57c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
-	{0x0000a580, 0x00802220, 0x00802220, 0x00800000, 0x00800000},
-	{0x0000a584, 0x04802222, 0x04802222, 0x04800002, 0x04800002},
-	{0x0000a588, 0x09802421, 0x09802421, 0x08800004, 0x08800004},
-	{0x0000a58c, 0x0d802621, 0x0d802621, 0x0b800200, 0x0b800200},
-	{0x0000a590, 0x13804620, 0x13804620, 0x0f800202, 0x0f800202},
-	{0x0000a594, 0x19804a20, 0x19804a20, 0x11800400, 0x11800400},
-	{0x0000a598, 0x1d804e20, 0x1d804e20, 0x15800402, 0x15800402},
-	{0x0000a59c, 0x21805420, 0x21805420, 0x19800404, 0x19800404},
-	{0x0000a5a0, 0x26805e20, 0x26805e20, 0x1b800603, 0x1b800603},
-	{0x0000a5a4, 0x2b805e40, 0x2b805e40, 0x1f800a02, 0x1f800a02},
-	{0x0000a5a8, 0x2f805e42, 0x2f805e42, 0x23800a04, 0x23800a04},
-	{0x0000a5ac, 0x33805e44, 0x33805e44, 0x26800a20, 0x26800a20},
-	{0x0000a5b0, 0x38805e65, 0x38805e65, 0x2a800e20, 0x2a800e20},
-	{0x0000a5b4, 0x3c805e69, 0x3c805e69, 0x2e800e22, 0x2e800e22},
-	{0x0000a5b8, 0x40805e6b, 0x40805e6b, 0x31800e24, 0x31800e24},
-	{0x0000a5bc, 0x44805e6d, 0x44805e6d, 0x34801640, 0x34801640},
-	{0x0000a5c0, 0x49805e72, 0x49805e72, 0x38801660, 0x38801660},
-	{0x0000a5c4, 0x4e805eb2, 0x4e805eb2, 0x3b801861, 0x3b801861},
-	{0x0000a5c8, 0x53805f12, 0x53805f12, 0x3e801a81, 0x3e801a81},
-	{0x0000a5cc, 0x59825eb2, 0x59825eb2, 0x42801a83, 0x42801a83},
-	{0x0000a5d0, 0x5e825f12, 0x5e825f12, 0x44801c84, 0x44801c84},
-	{0x0000a5d4, 0x61827f12, 0x61827f12, 0x48801ce3, 0x48801ce3},
-	{0x0000a5d8, 0x6782bf12, 0x6782bf12, 0x4c801ce5, 0x4c801ce5},
-	{0x0000a5dc, 0x6b82bf14, 0x6b82bf14, 0x50801ce9, 0x50801ce9},
-	{0x0000a5e0, 0x6f82bf16, 0x6f82bf16, 0x54801ceb, 0x54801ceb},
-	{0x0000a5e4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x0000a5e8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x0000a5ec, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x0000a5f0, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
-	{0x00016044, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4},
-	{0x00016048, 0x8e480086, 0x8e480086, 0x8e480086, 0x8e480086},
-	{0x00016444, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4},
-	{0x00016448, 0x8e480086, 0x8e480086, 0x8e480086, 0x8e480086},
-	{0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
-	{0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
-	{0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
-	{0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
-	{0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
-	{0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
-	{0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
-	{0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
-	{0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
-	{0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
-	{0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
-	{0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
-	{0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
-	{0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
-	{0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
-	{0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
-	{0x0000b2dc, 0xfef5d402, 0xfef5d402, 0xfdab5b52, 0xfdab5b52},
-	{0x0000b2e0, 0xfe896600, 0xfe896600, 0xfd339c84, 0xfd339c84},
-	{0x0000b2e4, 0xff01f800, 0xff01f800, 0xfec3e000, 0xfec3e000},
-	{0x0000b2e8, 0xfffe0000, 0xfffe0000, 0xfffc0000, 0xfffc0000},
-};
-
 static const u32 ar9340Modes_low_ob_db_tx_gain_table_1p0[][5] = {
 	/* Addr      5G_HT20     5G_HT40     2G_HT40     2G_HT20   */
 	{0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 05/17] ath9k: ar9485_initvals: Remove unused const variable 'ar9485_fast_clock_1_1_baseband_postamble'
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (3 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 04/17] ath9k: ar9340_initvals: Remove unused const variable 'ar9340Modes_ub124_tx_gain_table_1p0' Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 06/17] ath9k: ar9003_2p2_initvals: Remove unused const variables Lee Jones
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath9k/ar9485_initvals.h:1009:18: warning: ‘ar9485_fast_clock_1_1_baseband_postamble’ defined but not used [-Wunused-const-variable=]

Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h
index bdf6f107f6f1e..4afe52c0456e9 100644
--- a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h
@@ -1006,13 +1006,6 @@ static const u32 ar9485_1_1_soc_preamble[][2] = {
 	{0x00007048, 0x00000002},
 };
 
-static const u32 ar9485_fast_clock_1_1_baseband_postamble[][3] = {
-	/* Addr      5G_HT20     5G_HT40   */
-	{0x00009e00, 0x03721821, 0x03721821},
-	{0x0000a230, 0x0000400b, 0x00004016},
-	{0x0000a254, 0x00000898, 0x00001130},
-};
-
 static const u32 ar9485_1_1_baseband_postamble[][5] = {
 	/* Addr      5G_HT20     5G_HT40     2G_HT40     2G_HT20   */
 	{0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a8005},
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 06/17] ath9k: ar9003_2p2_initvals: Remove unused const variables
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (4 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 05/17] ath9k: ar9485_initvals: Remove unused const variable 'ar9485_fast_clock_1_1_baseband_postamble' Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 07/17] iwlwifi: iwl-eeprom-read: Demote one nonconformant function header Lee Jones
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h:1734:18: warning: ‘ar9300PciePhy_clkreq_disable_L1_2p2’ defined but not used [-Wunused-const-variable=]
 drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h:1727:18: warning: ‘ar9300PciePhy_clkreq_enable_L1_2p2’ defined but not used [-Wunused-const-variable=]

Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../net/wireless/ath/ath9k/ar9003_2p2_initvals.h   | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
index c07866a2fdf96..16d5c0c5e2a8d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
@@ -1724,20 +1724,6 @@ static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2[][2] = {
 	{0x00004044, 0x00000000},
 };
 
-static const u32 ar9300PciePhy_clkreq_enable_L1_2p2[][2] = {
-	/* Addr      allmodes  */
-	{0x00004040, 0x0825365e},
-	{0x00004040, 0x0008003b},
-	{0x00004044, 0x00000000},
-};
-
-static const u32 ar9300PciePhy_clkreq_disable_L1_2p2[][2] = {
-	/* Addr      allmodes  */
-	{0x00004040, 0x0821365e},
-	{0x00004040, 0x0008003b},
-	{0x00004044, 0x00000000},
-};
-
 static const u32 ar9300_2p2_baseband_core_txfir_coeff_japan_2484[][2] = {
 	/* Addr      allmodes  */
 	{0x0000a398, 0x00000000},
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 07/17] iwlwifi: iwl-eeprom-read: Demote one nonconformant function header
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (5 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 06/17] ath9k: ar9003_2p2_initvals: Remove unused const variables Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 08/17] iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header Lee Jones
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:347: warning: Function parameter or member 'trans' not described in 'iwl_read_eeprom'
 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:347: warning: Function parameter or member 'eeprom' not described in 'iwl_read_eeprom'
 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:347: warning: Function parameter or member 'eeprom_size' not described in 'iwl_read_eeprom'

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
index ad6dc4497437e..1b2d9fd82a3de 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
@@ -335,7 +335,7 @@ static int iwl_find_otp_image(struct iwl_trans *trans,
 	return -EINVAL;
 }
 
-/**
+/*
  * iwl_read_eeprom - read EEPROM contents
  *
  * Load the EEPROM contents from adapter and return it
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 08/17] iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (6 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 07/17] iwlwifi: iwl-eeprom-read: Demote one nonconformant function header Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param Lee Jones
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c:340: warning: cannot understand function prototype: 'struct iwl_eeprom_enhanced_txpwr '

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../net/wireless/intel/iwlwifi/iwl-eeprom-parse.c    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
index cf7e2a9232e52..f29d5758c8dff 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
@@ -324,15 +324,15 @@ enum iwl_eeprom_enhanced_txpwr_flags {
 };
 
 /**
- * iwl_eeprom_enhanced_txpwr structure
+ * struct iwl_eeprom_enhanced_txpwr
  * @flags: entry flags
  * @channel: channel number
- * @chain_a_max_pwr: chain a max power in 1/2 dBm
- * @chain_b_max_pwr: chain b max power in 1/2 dBm
- * @chain_c_max_pwr: chain c max power in 1/2 dBm
+ * @chain_a_max: chain a max power in 1/2 dBm
+ * @chain_b_max: chain b max power in 1/2 dBm
+ * @chain_c_max: chain c max power in 1/2 dBm
  * @delta_20_in_40: 20-in-40 deltas (hi/lo)
- * @mimo2_max_pwr: mimo2 max power in 1/2 dBm
- * @mimo3_max_pwr: mimo3 max power in 1/2 dBm
+ * @mimo2_max: mimo2 max power in 1/2 dBm
+ * @mimo3_max: mimo3 max power in 1/2 dBm
  *
  * This structure presents the enhanced regulatory tx power limit layout
  * in an EEPROM image.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (7 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 08/17] iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-12-02 19:51   ` Kalle Valo
  2020-11-26 13:31 ` [PATCH 10/17] ath9k: ar5008_phy: Demote half completed function headers Lee Jones
                   ` (7 subsequent siblings)
  16 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, David S. Miller, Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/regd.c:378: warning: Function parameter or member 'reg' not described in 'ath_reg_apply_ir_flags'

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/regd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index bee9110b91f38..b2400e2417a55 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -360,6 +360,7 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
 /**
  * ath_reg_apply_ir_flags()
  * @wiphy: the wiphy to use
+ * @reg: regulatory structure - used for country selection
  * @initiator: the regulatory hint initiator
  *
  * If no country IE has been received always enable passive scan
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 10/17] ath9k: ar5008_phy: Demote half completed function headers
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (8 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 11/17] ath: dfs_pattern_detector: Fix some function kernel-doc headers Lee Jones
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'rfBuf' not described in 'ar5008_hw_phy_modify_rx_buffer'
 drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'reg32' not described in 'ar5008_hw_phy_modify_rx_buffer'
 drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'numBits' not described in 'ar5008_hw_phy_modify_rx_buffer'
 drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'firstBit' not described in 'ar5008_hw_phy_modify_rx_buffer'

Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/ath9k/ar5008_phy.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 2fa30834a88db..6610d76131fa8 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -102,13 +102,8 @@ static void ar5008_write_bank6(struct ath_hw *ah, unsigned int *writecnt)
 	REGWRITE_BUFFER_FLUSH(ah);
 }
 
-/**
+/*
  * ar5008_hw_phy_modify_rx_buffer() - perform analog swizzling of parameters
- * @rfbuf:
- * @reg32:
- * @numBits:
- * @firstBit:
- * @column:
  *
  * Performs analog "swizzling" of parameters into their location.
  * Used on external AR2133/AR5133 radios.
@@ -198,10 +193,8 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
 	ar5008_write_bank6(ah, &reg_writes);
 }
 
-/**
+/*
  * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios
- * @ah: atheros hardware structure
- * @chan:
  *
  * For the external AR2133/AR5133 radios, takes the MHz channel value and set
  * the channel value. Assumes writes enabled to analog bus and bank6 register
@@ -430,10 +423,8 @@ void ar5008_hw_cmn_spur_mitigate(struct ath_hw *ah,
 	REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask);
 }
 
-/**
+/*
  * ar5008_hw_spur_mitigate - convert baseband spur frequency for external radios
- * @ah: atheros hardware structure
- * @chan:
  *
  * For non single-chip solutions. Converts to baseband spur frequency given the
  * input channel frequency and compute register settings below.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 11/17] ath: dfs_pattern_detector: Fix some function kernel-doc headers
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (9 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 10/17] ath9k: ar5008_phy: Demote half completed function headers Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 12/17] ath: dfs_pri_detector: Demote zero/half completed " Lee Jones
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, David S. Miller, Jakub Kicinski, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/dfs_pattern_detector.c:34: warning: Function parameter or member 'region' not described in 'radar_types'
 drivers/net/wireless/ath/dfs_pattern_detector.c:141: warning: Function parameter or member 'region' not described in 'get_dfs_domain_radar_types'
 drivers/net/wireless/ath/dfs_pattern_detector.c:239: warning: Function parameter or member 'dpd' not described in 'channel_detector_get'
 drivers/net/wireless/ath/dfs_pattern_detector.c:239: warning: Function parameter or member 'freq' not described in 'channel_detector_get'

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/dfs_pattern_detector.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 0813473793df1..80390495ea250 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -23,7 +23,7 @@
 
 /**
  * struct radar_types - contains array of patterns defined for one DFS domain
- * @domain: DFS regulatory domain
+ * @region: regulatory DFS region
  * @num_radar_types: number of radar types to follow
  * @radar_types: radar types array
  */
@@ -133,8 +133,9 @@ static const struct radar_types *dfs_domains[] = {
 
 /**
  * get_dfs_domain_radar_types() - get radar types for a given DFS domain
- * @param domain DFS domain
- * @return radar_types ptr on success, NULL if DFS domain is not supported
+ * @region: regulatory DFS region
+ *
+ * Return value: radar_types ptr on success, NULL if DFS domain is not supported
  */
 static const struct radar_types *
 get_dfs_domain_radar_types(enum nl80211_dfs_regions region)
@@ -227,9 +228,10 @@ channel_detector_create(struct dfs_pattern_detector *dpd, u16 freq)
 
 /**
  * channel_detector_get() - get channel detector for given frequency
- * @param dpd instance pointer
- * @param freq frequency in MHz
- * @return pointer to channel detector on success, NULL otherwise
+ * @dpd: DPD instance pointer
+ * @freq: freq frequency in MHz
+ *
+ * Return value: pointer to channel detector on success, NULL otherwise
  *
  * Return existing channel detector for the given frequency or return a
  * newly create one.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 12/17] ath: dfs_pri_detector: Demote zero/half completed kernel-doc headers
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (10 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 11/17] ath: dfs_pattern_detector: Fix some function kernel-doc headers Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 13/17] iwlwifi: iwl-phy-db: Add missing struct member description for 'trans' Lee Jones
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, David S. Miller, Jakub Kicinski, linux-wireless, netdev

There are only a couple of these and none of them are conformant.

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/dfs_pri_detector.c:39: warning: Function parameter or member 'head' not described in 'pulse_elem'
 drivers/net/wireless/ath/dfs_pri_detector.c:46: warning: Function parameter or member 'val' not described in 'pde_get_multiple'
 drivers/net/wireless/ath/dfs_pri_detector.c:46: warning: Function parameter or member 'fraction' not described in 'pde_get_multiple'
 drivers/net/wireless/ath/dfs_pri_detector.c:46: warning: Function parameter or member 'tolerance' not described in 'pde_get_multiple'

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/dfs_pri_detector.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/dfs_pri_detector.c b/drivers/net/wireless/ath/dfs_pri_detector.c
index 05b0464c6b92c..d07c454c9c00d 100644
--- a/drivers/net/wireless/ath/dfs_pri_detector.c
+++ b/drivers/net/wireless/ath/dfs_pri_detector.c
@@ -29,18 +29,17 @@ struct ath_dfs_pool_stats global_dfs_pool_stats = {};
 	(MIN + PRI_TOLERANCE == MAX - PRI_TOLERANCE ? \
 	MIN + PRI_TOLERANCE : RUNTIME)
 
-/**
+/*
  * struct pulse_elem - elements in pulse queue
- * @ts: time stamp in usecs
  */
 struct pulse_elem {
 	struct list_head head;
 	u64 ts;
 };
 
-/**
+/*
  * pde_get_multiple() - get number of multiples considering a given tolerance
- * @return factor if abs(val - factor*fraction) <= tolerance, 0 otherwise
+ * Return value: factor if abs(val - factor*fraction) <= tolerance, 0 otherwise
  */
 static u32 pde_get_multiple(u32 val, u32 fraction, u32 tolerance)
 {
@@ -70,7 +69,7 @@ static u32 pde_get_multiple(u32 val, u32 fraction, u32 tolerance)
 	return factor;
 }
 
-/**
+/*
  * DOC: Singleton Pulse and Sequence Pools
  *
  * Instances of pri_sequence and pulse_elem are kept in singleton pools to
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 13/17] iwlwifi: iwl-phy-db: Add missing struct member description for 'trans'
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (11 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 12/17] ath: dfs_pri_detector: Demote zero/half completed " Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 14/17] iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header Lee Jones
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c:97: warning: Function parameter or member 'trans' not described in 'iwl_phy_db'

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c b/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
index ae83cfdb750e6..c9ce270ceee07 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
@@ -79,11 +79,11 @@ struct iwl_phy_db_entry {
  *
  * @cfg: phy configuration.
  * @calib_nch: non channel specific calibration data.
- * @calib_ch: channel specific calibration data.
  * @n_group_papd: number of entries in papd channel group.
  * @calib_ch_group_papd: calibration data related to papd channel group.
  * @n_group_txp: number of entries in tx power channel group.
  * @calib_ch_group_txp: calibration data related to tx power chanel group.
+ * @trans: transport layer
  */
 struct iwl_phy_db {
 	struct iwl_phy_db_entry	cfg;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 14/17] iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (12 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 13/17] iwlwifi: iwl-phy-db: Add missing struct member description for 'trans' Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 15/17] ath9k: dynack: Demote non-compliant " Lee Jones
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Jakub Kicinski,
	Shahar S Matityahu, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/intel/iwlwifi/fw/dbg.c:1932: warning: Function parameter or member 'reg_data' not described in 'iwl_dump_ini_mem'
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c:1932: warning: Excess function parameter 'reg' description in 'iwl_dump_ini_mem'

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index ab4a8b942c81d..c0a180b496988 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -1923,7 +1923,7 @@ struct iwl_dump_ini_mem_ops {
  *
  * @fwrt: fw runtime struct
  * @list: list to add the dump tlv to
- * @reg: memory region
+ * @reg_data: memory region
  * @ops: memory dump operations
  */
 static u32 iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt, struct list_head *list,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 15/17] ath9k: dynack: Demote non-compliant function header
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (13 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 14/17] iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 16/17] iwlwifi: fw: acpi: Demote non-conformant function headers Lee Jones
  2020-11-26 13:31 ` [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown Lee Jones
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, Lorenzo Bianconi, linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath9k/dynack.c:52: warning: Function parameter or member 'old' not described in 'ath_dynack_ewma'
 drivers/net/wireless/ath/ath9k/dynack.c:52: warning: Function parameter or member 'new' not described in 'ath_dynack_ewma'

Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/ath9k/dynack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c
index fbeb4a739d321..3219715174a2f 100644
--- a/drivers/net/wireless/ath/ath9k/dynack.c
+++ b/drivers/net/wireless/ath/ath9k/dynack.c
@@ -44,9 +44,8 @@ static u32 ath_dynack_get_max_to(struct ath_hw *ah)
 	return 600;
 }
 
-/**
+/*
  * ath_dynack_ewma - EWMA (Exponentially Weighted Moving Average) calculation
- *
  */
 static inline int ath_dynack_ewma(int old, int new)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 16/17] iwlwifi: fw: acpi: Demote non-conformant function headers
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (14 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 15/17] ath9k: dynack: Demote non-compliant " Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-26 13:31 ` [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown Lee Jones
  16 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'dev' not described in 'iwl_acpi_get_dsm_object'
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'rev' not described in 'iwl_acpi_get_dsm_object'
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'func' not described in 'iwl_acpi_get_dsm_object'
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'args' not described in 'iwl_acpi_get_dsm_object'
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:142: warning: Function parameter or member 'dev' not described in 'iwl_acpi_get_dsm_u8'
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:142: warning: Function parameter or member 'rev' not described in 'iwl_acpi_get_dsm_u8'
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c:142: warning: Function parameter or member 'func' not described in 'iwl_acpi_get_dsm_u8'

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
index 3e5a35e26ad34..ab1d8b18d9976 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -113,11 +113,11 @@ void *iwl_acpi_get_object(struct device *dev, acpi_string method)
 }
 IWL_EXPORT_SYMBOL(iwl_acpi_get_object);
 
-/**
-* Generic function for evaluating a method defined in the device specific
-* method (DSM) interface. The returned acpi object must be freed by calling
-* function.
-*/
+/*
+ * Generic function for evaluating a method defined in the device specific
+ * method (DSM) interface. The returned acpi object must be freed by calling
+ * function.
+ */
 static void *iwl_acpi_get_dsm_object(struct device *dev, int rev, int func,
 				     union acpi_object *args)
 {
@@ -134,7 +134,7 @@ static void *iwl_acpi_get_dsm_object(struct device *dev, int rev, int func,
 	return obj;
 }
 
-/**
+/*
  * Evaluate a DSM with no arguments and a single u8 return value (inside a
  * buffer object), verify and return that value.
  */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
                   ` (15 preceding siblings ...)
  2020-11-26 13:31 ` [PATCH 16/17] iwlwifi: fw: acpi: Demote non-conformant function headers Lee Jones
@ 2020-11-26 13:31 ` Lee Jones
  2020-11-27  3:34   ` Pkshih
  2020-12-07 16:32   ` [17/17] " Kalle Valo
  16 siblings, 2 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-26 13:31 UTC (permalink / raw)
  To: lee.jones, kvalo
  Cc: linux-kernel, Yan-Hsuan Chuang, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

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@realtek.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.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"
+
 #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>
+#include "pci.h"
 #include "rtw8723de.h"
 
 static const struct pci_device_id rtw_8723de_id_table[] = {
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723de.h b/drivers/net/wireless/realtek/rtw88/rtw8723de.h
index ba3842360c20a..2b4894846a07f 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723de.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723de.h
@@ -5,10 +5,6 @@
 #ifndef __RTW_8723DE_H_
 #define __RTW_8723DE_H_
 
-extern const struct dev_pm_ops rtw_pm_ops;
 extern struct rtw_chip_info rtw8723d_hw_spec;
-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);
 
 #endif
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c
index 616fdcfd62c98..f34de115e4bc4 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c
@@ -4,6 +4,7 @@
 
 #include <linux/module.h>
 #include <linux/pci.h>
+#include "pci.h"
 #include "rtw8821ce.h"
 
 static const struct pci_device_id rtw_8821ce_id_table[] = {
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821ce.h b/drivers/net/wireless/realtek/rtw88/rtw8821ce.h
index 8d3eb77a876be..54142acca5344 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.h
@@ -5,10 +5,6 @@
 #ifndef __RTW_8821CE_H_
 #define __RTW_8821CE_H_
 
-extern const struct dev_pm_ops rtw_pm_ops;
 extern struct rtw_chip_info rtw8821c_hw_spec;
-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);
 
 #endif
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822be.c b/drivers/net/wireless/realtek/rtw88/rtw8822be.c
index 921916ae15cab..62ee7e62cac02 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822be.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822be.c
@@ -4,6 +4,7 @@
 
 #include <linux/module.h>
 #include <linux/pci.h>
+#include "pci.h"
 #include "rtw8822be.h"
 
 static const struct pci_device_id rtw_8822be_id_table[] = {
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822be.h b/drivers/net/wireless/realtek/rtw88/rtw8822be.h
index d823ca059f5c9..6668460d664da 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822be.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822be.h
@@ -5,10 +5,6 @@
 #ifndef __RTW_8822BE_H_
 #define __RTW_8822BE_H_
 
-extern const struct dev_pm_ops rtw_pm_ops;
 extern struct rtw_chip_info rtw8822b_hw_spec;
-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);
 
 #endif
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
index 026ac49ce6e3c..3845b1333dc39 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
@@ -4,6 +4,7 @@
 
 #include <linux/module.h>
 #include <linux/pci.h>
+#include "pci.h"
 #include "rtw8822ce.h"
 
 static const struct pci_device_id rtw_8822ce_id_table[] = {
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822ce.h b/drivers/net/wireless/realtek/rtw88/rtw8822ce.h
index c2c0e8675d742..fee32d7a45047 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.h
@@ -5,10 +5,6 @@
 #ifndef __RTW_8822CE_H_
 #define __RTW_8822CE_H_
 
-extern const struct dev_pm_ops rtw_pm_ops;
 extern struct rtw_chip_info rtw8822c_hw_spec;
-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);
 
 #endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-26 13:31 ` [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown Lee Jones
@ 2020-11-27  3:34   ` Pkshih
  2020-11-27  7:38     ` Lee Jones
  2020-12-07 16:32   ` [17/17] " Kalle Valo
  1 sibling, 1 reply; 31+ messages in thread
From: Pkshih @ 2020-11-27  3:34 UTC (permalink / raw)
  To: kvalo, lee.jones
  Cc: Tony Chuang, linux-kernel, davem, linux-wireless, kuba, netdev


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@realtek.com>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.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



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-27  3:34   ` Pkshih
@ 2020-11-27  7:38     ` Lee Jones
  2020-11-27  8:31       ` Pkshih
  0 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2020-11-27  7:38 UTC (permalink / raw)
  To: Pkshih
  Cc: kvalo, Tony Chuang, linux-kernel, davem, linux-wireless, kuba, netdev

On Fri, 27 Nov 2020, Pkshih wrote:

> 
> 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@realtek.com>
> > Cc: Kalle Valo <kvalo@codeaurora.org>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > Cc: linux-wireless@vger.kernel.org
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.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.

You mean instead of in pci.h?

Surely that's a hack.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-27  7:38     ` Lee Jones
@ 2020-11-27  8:31       ` Pkshih
  2020-11-27  8:57         ` Lee Jones
  0 siblings, 1 reply; 31+ messages in thread
From: Pkshih @ 2020-11-27  8:31 UTC (permalink / raw)
  To: lee.jones
  Cc: Tony Chuang, kvalo, linux-kernel, linux-wireless, davem, netdev, kuba

On Fri, 2020-11-27 at 07:38 +0000, Lee Jones wrote:
> On Fri, 27 Nov 2020, Pkshih wrote:
> 
> > 
> > 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@realtek.com>
> > > Cc: Kalle Valo <kvalo@codeaurora.org>
> > > Cc: "David S. Miller" <davem@davemloft.net>
> > > Cc: Jakub Kicinski <kuba@kernel.org>
> > > Cc: linux-wireless@vger.kernel.org
> > > Cc: netdev@vger.kernel.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro.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.
> 
> You mean instead of in pci.h?
> 
> Surely that's a hack.
> 

I mean don't include main.h in pci.h, but include both of them in each
of rtw8xxxxe.c.

+#include "main.h"
+#include "pci.h"

---
Ping-Ke


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-27  8:31       ` Pkshih
@ 2020-11-27  8:57         ` Lee Jones
  2020-11-30  0:37           ` Pkshih
  0 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2020-11-27  8:57 UTC (permalink / raw)
  To: Pkshih
  Cc: Tony Chuang, kvalo, linux-kernel, linux-wireless, davem, netdev, kuba

On Fri, 27 Nov 2020, Pkshih wrote:

> On Fri, 2020-11-27 at 07:38 +0000, Lee Jones wrote:
> > On Fri, 27 Nov 2020, Pkshih wrote:
> > 
> > > 
> > > 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@realtek.com>
> > > > Cc: Kalle Valo <kvalo@codeaurora.org>
> > > > Cc: "David S. Miller" <davem@davemloft.net>
> > > > Cc: Jakub Kicinski <kuba@kernel.org>
> > > > Cc: linux-wireless@vger.kernel.org
> > > > Cc: netdev@vger.kernel.org
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.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.
> > 
> > You mean instead of in pci.h?
> > 
> > Surely that's a hack.
> > 
> 
> I mean don't include main.h in pci.h, but include both of them in each
> of rtw8xxxxe.c.
> 
> +#include "main.h"
> +#include "pci.h"

Yes, that's what I thought you meant.  I think that's a hack.

Source files shouldn't rely on the ordering of include files to
resolve dependencies.  In fact, a lot of subsystems require includes to
be in alphabetical order.

If a source or header file references a resource from a specific
header file (for instance here pci.h uses defines from main.h) then it
should explicitly include it.

Can you tell me the technical reason as to why these drivers are
handled differently please?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* RE: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-27  8:57         ` Lee Jones
@ 2020-11-30  0:37           ` Pkshih
  2020-11-30  8:53             ` Lee Jones
  2020-12-02 16:44             ` Kalle Valo
  0 siblings, 2 replies; 31+ messages in thread
From: Pkshih @ 2020-11-30  0:37 UTC (permalink / raw)
  To: Lee Jones
  Cc: Tony Chuang, kvalo, linux-kernel, linux-wireless, davem, netdev, kuba



> -----Original Message-----
> From: Lee Jones [mailto:lee.jones@linaro.org]
> Sent: Friday, November 27, 2020 4:57 PM
> To: Pkshih
> Cc: Tony Chuang; kvalo@codeaurora.org; linux-kernel@vger.kernel.org; linux-wireless@vger.kernel.org;
> davem@davemloft.net; netdev@vger.kernel.org; kuba@kernel.org
> Subject: Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
> 
> On Fri, 27 Nov 2020, Pkshih wrote:
> 
> > On Fri, 2020-11-27 at 07:38 +0000, Lee Jones wrote:
> > > On Fri, 27 Nov 2020, Pkshih wrote:
> > >
> > > >
> > > > 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@realtek.com>
> > > > > Cc: Kalle Valo <kvalo@codeaurora.org>
> > > > > Cc: "David S. Miller" <davem@davemloft.net>
> > > > > Cc: Jakub Kicinski <kuba@kernel.org>
> > > > > Cc: linux-wireless@vger.kernel.org
> > > > > Cc: netdev@vger.kernel.org
> > > > > Signed-off-by: Lee Jones <lee.jones@linaro.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.
> > >
> > > You mean instead of in pci.h?
> > >
> > > Surely that's a hack.
> > >
> >
> > I mean don't include main.h in pci.h, but include both of them in each
> > of rtw8xxxxe.c.
> >
> > +#include "main.h"
> > +#include "pci.h"
> 
> Yes, that's what I thought you meant.  I think that's a hack.
> 
> Source files shouldn't rely on the ordering of include files to
> resolve dependencies.  In fact, a lot of subsystems require includes to
> be in alphabetical order.
> 
> If a source or header file references a resource from a specific
> header file (for instance here pci.h uses defines from main.h) then it
> should explicitly include it.
> 
> Can you tell me the technical reason as to why these drivers are
> handled differently please?
> 

No technical reason, but that's our coding convention that needs some
changes now.
Could you point out where kernel or subsystem describes the rules?
Or, point out the subsystem you mentioned above.
Then, I can study and follow the rules for further development.

Thank you
---
Ping-Ke



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-30  0:37           ` Pkshih
@ 2020-11-30  8:53             ` Lee Jones
  2020-12-02 16:44             ` Kalle Valo
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-11-30  8:53 UTC (permalink / raw)
  To: Pkshih
  Cc: Tony Chuang, kvalo, linux-kernel, linux-wireless, davem, netdev, kuba

On Mon, 30 Nov 2020, Pkshih wrote:

> 
> 
> > -----Original Message-----
> > From: Lee Jones [mailto:lee.jones@linaro.org]
> > Sent: Friday, November 27, 2020 4:57 PM
> > To: Pkshih
> > Cc: Tony Chuang; kvalo@codeaurora.org; linux-kernel@vger.kernel.org; linux-wireless@vger.kernel.org;
> > davem@davemloft.net; netdev@vger.kernel.org; kuba@kernel.org
> > Subject: Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
> > 
> > On Fri, 27 Nov 2020, Pkshih wrote:
> > 
> > > On Fri, 2020-11-27 at 07:38 +0000, Lee Jones wrote:
> > > > On Fri, 27 Nov 2020, Pkshih wrote:
> > > >
> > > > >
> > > > > 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@realtek.com>
> > > > > > Cc: Kalle Valo <kvalo@codeaurora.org>
> > > > > > Cc: "David S. Miller" <davem@davemloft.net>
> > > > > > Cc: Jakub Kicinski <kuba@kernel.org>
> > > > > > Cc: linux-wireless@vger.kernel.org
> > > > > > Cc: netdev@vger.kernel.org
> > > > > > Signed-off-by: Lee Jones <lee.jones@linaro.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.
> > > >
> > > > You mean instead of in pci.h?
> > > >
> > > > Surely that's a hack.
> > > >
> > >
> > > I mean don't include main.h in pci.h, but include both of them in each
> > > of rtw8xxxxe.c.
> > >
> > > +#include "main.h"
> > > +#include "pci.h"
> > 
> > Yes, that's what I thought you meant.  I think that's a hack.
> > 
> > Source files shouldn't rely on the ordering of include files to
> > resolve dependencies.  In fact, a lot of subsystems require includes to
> > be in alphabetical order.
> > 
> > If a source or header file references a resource from a specific
> > header file (for instance here pci.h uses defines from main.h) then it
> > should explicitly include it.
> > 
> > Can you tell me the technical reason as to why these drivers are
> > handled differently please?
> > 
> 
> No technical reason, but that's our coding convention that needs some
> changes now.
> Could you point out where kernel or subsystem describes the rules?
> Or, point out the subsystem you mentioned above.
> Then, I can study and follow the rules for further development.

I don't think any subsystem explicitly lists this as a rule.  At least
not to my knowledge.  However you can see the many patches enforcing
the rule by doing something like:

 $ git log -p --all-match --grep=include --grep=alphabetical

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-30  0:37           ` Pkshih
  2020-11-30  8:53             ` Lee Jones
@ 2020-12-02 16:44             ` Kalle Valo
  1 sibling, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2020-12-02 16:44 UTC (permalink / raw)
  To: Pkshih
  Cc: Lee Jones, Tony Chuang, linux-kernel, linux-wireless, davem,
	netdev, kuba

Pkshih <pkshih@realtek.com> writes:

>> -----Original Message-----
>> From: Lee Jones [mailto:lee.jones@linaro.org]
>> Sent: Friday, November 27, 2020 4:57 PM
>> To: Pkshih
>> Cc: Tony Chuang; kvalo@codeaurora.org; linux-kernel@vger.kernel.org;
>> linux-wireless@vger.kernel.org;
>> davem@davemloft.net; netdev@vger.kernel.org; kuba@kernel.org
>> Subject: Re: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for
>> .probe, .remove and .shutdown
>> 
>> On Fri, 27 Nov 2020, Pkshih wrote:
>> 
>> > On Fri, 2020-11-27 at 07:38 +0000, Lee Jones wrote:
>> > > On Fri, 27 Nov 2020, Pkshih wrote:
>> > >
>> > > >
>> > > > 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@realtek.com>
>> > > > > Cc: Kalle Valo <kvalo@codeaurora.org>
>> > > > > Cc: "David S. Miller" <davem@davemloft.net>
>> > > > > Cc: Jakub Kicinski <kuba@kernel.org>
>> > > > > Cc: linux-wireless@vger.kernel.org
>> > > > > Cc: netdev@vger.kernel.org
>> > > > > Signed-off-by: Lee Jones <lee.jones@linaro.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.
>> > >
>> > > You mean instead of in pci.h?
>> > >
>> > > Surely that's a hack.
>> > >
>> >
>> > I mean don't include main.h in pci.h, but include both of them in each
>> > of rtw8xxxxe.c.
>> >
>> > +#include "main.h"
>> > +#include "pci.h"
>> 
>> Yes, that's what I thought you meant.  I think that's a hack.
>> 
>> Source files shouldn't rely on the ordering of include files to
>> resolve dependencies.  In fact, a lot of subsystems require includes to
>> be in alphabetical order.
>> 
>> If a source or header file references a resource from a specific
>> header file (for instance here pci.h uses defines from main.h) then it
>> should explicitly include it.
>> 
>> Can you tell me the technical reason as to why these drivers are
>> handled differently please?
>> 
>
> No technical reason, but that's our coding convention that needs some
> changes now.

Yeah, please fix rtw88. Just like Lee said, pci.h should have "#include
main.h" and not require other files to include files in correct order.

> Could you point out where kernel or subsystem describes the rules?
> Or, point out the subsystem you mentioned above.
> Then, I can study and follow the rules for further development.

I have not seen any documentation abou this, but it's a general rule to
keep the header files maintainable.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1'
  2020-11-26 13:31 ` [PATCH 03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1' Lee Jones
@ 2020-12-02 18:49   ` Kalle Valo
  0 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2020-12-02 18:49 UTC (permalink / raw)
  To: Lee Jones
  Cc: lee.jones, linux-kernel, QCA ath9k Development, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Lee Jones <lee.jones@linaro.org> wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h:1013:18: warning: ‘ar9331_common_tx_gain_offset1_1’ defined but not used [-Wunused-const-variable=]
> 
> Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

ath9k patches fail to apply:

error: patch failed: drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h:1010
error: drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h: patch does not apply
stg import: Diff does not apply cleanly

6 patches set to Changes Requested.

11933887 [03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1'
11933889 [04/17] ath9k: ar9340_initvals: Remove unused const variable 'ar9340Modes_ub124_tx_gain_table_1p0'
11933883 [05/17] ath9k: ar9485_initvals: Remove unused const variable 'ar9485_fast_clock_1_1_baseband_postamble'
11933879 [06/17] ath9k: ar9003_2p2_initvals: Remove unused const variables
11933861 [10/17] ath9k: ar5008_phy: Demote half completed function headers
11933875 [15/17] ath9k: dynack: Demote non-compliant function header

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201126133152.3211309-4-lee.jones@linaro.org/

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_'
  2020-11-26 13:31 ` [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_' Lee Jones
@ 2020-12-02 18:50   ` Kalle Valo
  2020-12-08 11:07     ` Lee Jones
  0 siblings, 1 reply; 31+ messages in thread
From: Kalle Valo @ 2020-12-02 18:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: lee.jones, linux-kernel, Maya Erez, David S. Miller,
	Jakub Kicinski, linux-wireless, wil6210, netdev

Lee Jones <lee.jones@linaro.org> wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Function parameter or member 'ptr_' not described in 'wmi_buffer_block'
>  drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Excess function parameter 'ptr' description in 'wmi_buffer_block'
> 
> Cc: Maya Erez <merez@codeaurora.org>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: wil6210@qti.qualcomm.com
> Cc: netdev@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Failed to apply:

error: patch failed: drivers/net/wireless/ath/wil6210/wmi.c:262
error: drivers/net/wireless/ath/wil6210/wmi.c: patch does not apply
stg import: Diff does not apply cleanly

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201126133152.3211309-2-lee.jones@linaro.org/

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param
  2020-11-26 13:31 ` [PATCH 09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param Lee Jones
@ 2020-12-02 19:51   ` Kalle Valo
  0 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2020-12-02 19:51 UTC (permalink / raw)
  To: Lee Jones
  Cc: lee.jones, linux-kernel, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

Lee Jones <lee.jones@linaro.org> wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/net/wireless/ath/regd.c:378: warning: Function parameter or member 'reg' not described in 'ath_reg_apply_ir_flags'
> 
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Failed to apply:

error: patch failed: drivers/net/wireless/ath/regd.c:360
error: drivers/net/wireless/ath/regd.c: patch does not apply
stg import: Diff does not apply cleanly

3 patches set to Changes Requested.

11933863 [09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param
11933871 [11/17] ath: dfs_pattern_detector: Fix some function kernel-doc headers
11933859 [12/17] ath: dfs_pri_detector: Demote zero/half completed kernel-doc headers

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201126133152.3211309-10-lee.jones@linaro.org/

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [17/17] rtw88: pci: Add prototypes for .probe, .remove and .shutdown
  2020-11-26 13:31 ` [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown Lee Jones
  2020-11-27  3:34   ` Pkshih
@ 2020-12-07 16:32   ` Kalle Valo
  1 sibling, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2020-12-07 16:32 UTC (permalink / raw)
  To: Lee Jones
  Cc: lee.jones, linux-kernel, Yan-Hsuan Chuang, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Lee Jones <lee.jones@linaro.org> 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@realtek.com>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Patch applied to wireless-drivers-next.git, thanks.

2e86ef413ab3 rtw88: pci: Add prototypes for .probe, .remove and .shutdown

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201126133152.3211309-18-lee.jones@linaro.org/

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_'
  2020-12-02 18:50   ` Kalle Valo
@ 2020-12-08 11:07     ` Lee Jones
  0 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2020-12-08 11:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-kernel, Maya Erez, David S. Miller, Jakub Kicinski,
	linux-wireless, wil6210, netdev

On Wed, 02 Dec 2020, Kalle Valo wrote:

> Lee Jones <lee.jones@linaro.org> wrote:
> 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Function parameter or member 'ptr_' not described in 'wmi_buffer_block'
> >  drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Excess function parameter 'ptr' description in 'wmi_buffer_block'
> > 
> > Cc: Maya Erez <merez@codeaurora.org>
> > Cc: Kalle Valo <kvalo@codeaurora.org>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > Cc: linux-wireless@vger.kernel.org
> > Cc: wil6210@qti.qualcomm.com
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> 
> Failed to apply:
> 
> error: patch failed: drivers/net/wireless/ath/wil6210/wmi.c:262
> error: drivers/net/wireless/ath/wil6210/wmi.c: patch does not apply
> stg import: Diff does not apply cleanly
> 
> Patch set to Changes Requested.

That's so strange.

I just rebased my branch onto the latest -next with no issue.

I will re-submit after the merge-window closes.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 02/17] iwlwifi: mvm: rs: Demote non-conformant function documentation headers
  2020-11-26 13:31 ` [PATCH 02/17] iwlwifi: mvm: rs: Demote non-conformant function documentation headers Lee Jones
@ 2020-12-11 18:25   ` Kalle Valo
  0 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2020-12-11 18:25 UTC (permalink / raw)
  To: Lee Jones
  Cc: lee.jones, linux-kernel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev

Lee Jones <lee.jones@linaro.org> wrote:

> Also add documentation for 'mvm'.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:400: warning: cannot understand function prototype: 'const u16 expected_tpt_legacy[IWL_RATE_COUNT] = '
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'mvm' not described in '_rs_collect_tx_data'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'tbl' not described in '_rs_collect_tx_data'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'scale_index' not described in '_rs_collect_tx_data'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'attempts' not described in '_rs_collect_tx_data'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'successes' not described in '_rs_collect_tx_data'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'window' not described in '_rs_collect_tx_data'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2677: warning: duplicate section name 'NOTE'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'mvm' not described in 'rs_initialize_lq'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'sta' not described in 'rs_initialize_lq'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'lq_sta' not described in 'rs_initialize_lq'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'band' not described in 'rs_initialize_lq'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:3761: warning: Function parameter or member 'mvm' not described in 'rs_program_fix_rate'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:3761: warning: Function parameter or member 'lq_sta' not described in 'rs_program_fix_rate'
>  drivers/net/wireless/intel/iwlwifi/mvm/rs.c:4213: warning: Function parameter or member 'mvm' not described in 'iwl_mvm_tx_protection'
> 
> Cc: Johannes Berg <johannes.berg@intel.com>
> Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Cc: Luca Coelho <luciano.coelho@intel.com>
> Cc: Intel Linux Wireless <linuxwifi@intel.com>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

6 patches applied to wireless-drivers-next.git, thanks.

05d07f2dc9a9 iwlwifi: mvm: rs: Demote non-conformant function documentation headers
dde0a25d06bf iwlwifi: iwl-eeprom-read: Demote one nonconformant function header
220ee462702c iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header
5a2e2f91e8b5 iwlwifi: iwl-phy-db: Add missing struct member description for 'trans'
fe472e9d47c8 iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header
81daab1f8d57 iwlwifi: fw: acpi: Demote non-conformant function headers

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201126133152.3211309-3-lee.jones@linaro.org/

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2020-12-11 20:02 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 13:31 [PATCH v2 00/17] [Set 4] Rid W=1 warnings in Wireless Lee Jones
2020-11-26 13:31 ` [PATCH 01/17] wil6210: wmi: Correct misnamed function parameter 'ptr_' Lee Jones
2020-12-02 18:50   ` Kalle Valo
2020-12-08 11:07     ` Lee Jones
2020-11-26 13:31 ` [PATCH 02/17] iwlwifi: mvm: rs: Demote non-conformant function documentation headers Lee Jones
2020-12-11 18:25   ` Kalle Valo
2020-11-26 13:31 ` [PATCH 03/17] ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1' Lee Jones
2020-12-02 18:49   ` Kalle Valo
2020-11-26 13:31 ` [PATCH 04/17] ath9k: ar9340_initvals: Remove unused const variable 'ar9340Modes_ub124_tx_gain_table_1p0' Lee Jones
2020-11-26 13:31 ` [PATCH 05/17] ath9k: ar9485_initvals: Remove unused const variable 'ar9485_fast_clock_1_1_baseband_postamble' Lee Jones
2020-11-26 13:31 ` [PATCH 06/17] ath9k: ar9003_2p2_initvals: Remove unused const variables Lee Jones
2020-11-26 13:31 ` [PATCH 07/17] iwlwifi: iwl-eeprom-read: Demote one nonconformant function header Lee Jones
2020-11-26 13:31 ` [PATCH 08/17] iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header Lee Jones
2020-11-26 13:31 ` [PATCH 09/17] ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param Lee Jones
2020-12-02 19:51   ` Kalle Valo
2020-11-26 13:31 ` [PATCH 10/17] ath9k: ar5008_phy: Demote half completed function headers Lee Jones
2020-11-26 13:31 ` [PATCH 11/17] ath: dfs_pattern_detector: Fix some function kernel-doc headers Lee Jones
2020-11-26 13:31 ` [PATCH 12/17] ath: dfs_pri_detector: Demote zero/half completed " Lee Jones
2020-11-26 13:31 ` [PATCH 13/17] iwlwifi: iwl-phy-db: Add missing struct member description for 'trans' Lee Jones
2020-11-26 13:31 ` [PATCH 14/17] iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header Lee Jones
2020-11-26 13:31 ` [PATCH 15/17] ath9k: dynack: Demote non-compliant " Lee Jones
2020-11-26 13:31 ` [PATCH 16/17] iwlwifi: fw: acpi: Demote non-conformant function headers Lee Jones
2020-11-26 13:31 ` [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown Lee Jones
2020-11-27  3:34   ` Pkshih
2020-11-27  7:38     ` Lee Jones
2020-11-27  8:31       ` Pkshih
2020-11-27  8:57         ` Lee Jones
2020-11-30  0:37           ` Pkshih
2020-11-30  8:53             ` Lee Jones
2020-12-02 16:44             ` Kalle Valo
2020-12-07 16:32   ` [17/17] " 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).