All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] iwlwifi: fixes for new W=1 warnings and errors
@ 2021-12-19  9:01 Luca Coelho
  2021-12-19  9:01 ` [PATCH 1/4] iwlwifi: mei: fix W=1 warnings Luca Coelho
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Luca Coelho @ 2021-12-19  9:01 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Luca Coelho <luciano.coelho@intel.com>

Hi Kalle,

As agreed, here are the patches to fix the W=1 warnings and errors
reported by Jacub.

Please take them directly to wireless-drivers-next as we discussed.

Thanks!

Cheers,
Luca.


Johannes Berg (3):
  iwlwifi: mei: fix W=1 warnings
  iwlwifi: mvm: add missing min_size to kernel-doc
  iwlwifi: mvm: add dbg_time_point to debugfs

Luca Coelho (1):
  iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm()

 drivers/net/wireless/intel/iwlwifi/mei/main.c    | 10 ++++++----
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c |  1 +
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c     |  3 +++
 3 files changed, 10 insertions(+), 4 deletions(-)

-- 
2.34.1


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

* [PATCH 1/4] iwlwifi: mei: fix W=1 warnings
  2021-12-19  9:01 [PATCH 0/4] iwlwifi: fixes for new W=1 warnings and errors Luca Coelho
@ 2021-12-19  9:01 ` Luca Coelho
  2021-12-20 18:41   ` Kalle Valo
  2021-12-19  9:01 ` [PATCH 2/4] iwlwifi: mvm: add missing min_size to kernel-doc Luca Coelho
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Luca Coelho @ 2021-12-19  9:01 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

There are a few warnings due to kernel-doc not understanding
the constructs the way they're done here, fix them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mei/main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mei/main.c b/drivers/net/wireless/intel/iwlwifi/mei/main.c
index 4453cd2571c2..15b207d61ae6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mei/main.c
+++ b/drivers/net/wireless/intel/iwlwifi/mei/main.c
@@ -175,7 +175,7 @@ struct iwl_mei {
 };
 
 /**
- * iwl_mei_cache - cache for the parameters from iwlwifi
+ * struct iwl_mei_cache - cache for the parameters from iwlwifi
  * @ops: Callbacks to iwlwifi.
  * @netdev: The netdev that will be used to transmit / receive packets.
  * @conn_info: The connection info message triggered by iwlwifi's association.
@@ -191,7 +191,7 @@ struct iwl_mei {
  * is cached here so that we can buffer the configuration even if we don't have
  * a bind from the mei bus and hence, on iwl_mei structure.
  */
-static struct {
+struct iwl_mei_cache {
 	const struct iwl_mei_ops *ops;
 	struct net_device __rcu *netdev;
 	const struct iwl_sap_notif_connection_info *conn_info;
@@ -201,7 +201,9 @@ static struct {
 	u8 mac_address[6];
 	u8 nvm_address[6];
 	void *priv;
-} iwl_mei_cache = {
+};
+
+static struct iwl_mei_cache iwl_mei_cache = {
 	.rf_kill = SAP_HW_RFKILL_DEASSERTED | SAP_SW_RFKILL_DEASSERTED
 };
 
@@ -1781,7 +1783,7 @@ static void iwl_mei_dbgfs_unregister(struct iwl_mei *mei) {}
 
 #endif /* CONFIG_DEBUG_FS */
 
-/**
+/*
  * iwl_mei_probe - the probe function called by the mei bus enumeration
  *
  * This allocates the data needed by iwlmei and sets a pointer to this data
-- 
2.34.1


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

* [PATCH 2/4] iwlwifi: mvm: add missing min_size to kernel-doc
  2021-12-19  9:01 [PATCH 0/4] iwlwifi: fixes for new W=1 warnings and errors Luca Coelho
  2021-12-19  9:01 ` [PATCH 1/4] iwlwifi: mei: fix W=1 warnings Luca Coelho
@ 2021-12-19  9:01 ` Luca Coelho
  2021-12-19  9:01 ` [PATCH 3/4] iwlwifi: mvm: add dbg_time_point to debugfs Luca Coelho
  2021-12-19  9:01 ` [PATCH 4/4] iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm() Luca Coelho
  3 siblings, 0 replies; 6+ messages in thread
From: Luca Coelho @ 2021-12-19  9:01 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

On struct iwl_rx_handlers we should document the min_size
member, do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index f12e571d3581..9bd869b8a974 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -257,6 +257,7 @@ enum iwl_rx_handler_context {
 /**
  * struct iwl_rx_handlers handler for FW notification
  * @cmd_id: command id
+ * @min_size: minimum size to expect for the notification
  * @context: see &iwl_rx_handler_context
  * @fn: the function is called when notification is received
  */
-- 
2.34.1


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

* [PATCH 3/4] iwlwifi: mvm: add dbg_time_point to debugfs
  2021-12-19  9:01 [PATCH 0/4] iwlwifi: fixes for new W=1 warnings and errors Luca Coelho
  2021-12-19  9:01 ` [PATCH 1/4] iwlwifi: mei: fix W=1 warnings Luca Coelho
  2021-12-19  9:01 ` [PATCH 2/4] iwlwifi: mvm: add missing min_size to kernel-doc Luca Coelho
@ 2021-12-19  9:01 ` Luca Coelho
  2021-12-19  9:01 ` [PATCH 4/4] iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm() Luca Coelho
  3 siblings, 0 replies; 6+ messages in thread
From: Luca Coelho @ 2021-12-19  9:01 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

We forgot to link this to debugfs, so the code is all dead.
Add it for real.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index f1e9d2c99051..fb4920b01dbb 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -2072,6 +2072,7 @@ void iwl_mvm_dbgfs_register(struct iwl_mvm *mvm)
 	MVM_DEBUGFS_ADD_FILE(prph_reg, mvm->debugfs_dir, 0600);
 	MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, 0600);
 	MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, 0200);
+	MVM_DEBUGFS_ADD_FILE(dbg_time_point, mvm->debugfs_dir, 0200);
 	MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, 0200);
 	MVM_DEBUGFS_ADD_FILE(indirection_tbl, mvm->debugfs_dir, 0200);
 	MVM_DEBUGFS_ADD_FILE(inject_packet, mvm->debugfs_dir, 0200);
-- 
2.34.1


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

* [PATCH 4/4] iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm()
  2021-12-19  9:01 [PATCH 0/4] iwlwifi: fixes for new W=1 warnings and errors Luca Coelho
                   ` (2 preceding siblings ...)
  2021-12-19  9:01 ` [PATCH 3/4] iwlwifi: mvm: add dbg_time_point to debugfs Luca Coelho
@ 2021-12-19  9:01 ` Luca Coelho
  3 siblings, 0 replies; 6+ messages in thread
From: Luca Coelho @ 2021-12-19  9:01 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Luca Coelho <luciano.coelho@intel.com>

If iwl_transt_start_hw() failed, we were returning without calling
wiphy_unlock() and rtnl_unlock(), causing a locking imbalance:

drivers/net/wireless/intel/iwlwifi/mvm/ops.c:686:12: warning: context imbalance in 'iwl_mvm_start_get_nvm' - wrong count at exit

Fix that by adding the unlock calls.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 9bd869b8a974..3941baa3eda3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -718,6 +718,8 @@ static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm)
 	ret = iwl_trans_start_hw(mvm->trans);
 	if (ret) {
 		mutex_unlock(&mvm->mutex);
+		wiphy_unlock(mvm->hw->wiphy);
+		rtnl_unlock();
 		return ret;
 	}
 
-- 
2.34.1


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

* Re: [PATCH 1/4] iwlwifi: mei: fix W=1 warnings
  2021-12-19  9:01 ` [PATCH 1/4] iwlwifi: mei: fix W=1 warnings Luca Coelho
@ 2021-12-20 18:41   ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2021-12-20 18:41 UTC (permalink / raw)
  To: Luca Coelho; +Cc: luca, linux-wireless

Luca Coelho <luca@coelho.fi> wrote:

> From: Johannes Berg <johannes.berg@intel.com>
> 
> There are a few warnings due to kernel-doc not understanding
> the constructs the way they're done here, fix them.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

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

991bbbeccc24 iwlwifi: mei: fix W=1 warnings
80cba44ff61b iwlwifi: mvm: add missing min_size to kernel-doc
ab2c42618ab9 iwlwifi: mvm: add dbg_time_point to debugfs
97c0979d0d72 iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/iwlwifi.20211219110000.1ef2bb24771c.I6a59ad2d64f719d3e27398951c8f1b678b0b1092@changeid/

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


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

end of thread, other threads:[~2021-12-20 18:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-19  9:01 [PATCH 0/4] iwlwifi: fixes for new W=1 warnings and errors Luca Coelho
2021-12-19  9:01 ` [PATCH 1/4] iwlwifi: mei: fix W=1 warnings Luca Coelho
2021-12-20 18:41   ` Kalle Valo
2021-12-19  9:01 ` [PATCH 2/4] iwlwifi: mvm: add missing min_size to kernel-doc Luca Coelho
2021-12-19  9:01 ` [PATCH 3/4] iwlwifi: mvm: add dbg_time_point to debugfs Luca Coelho
2021-12-19  9:01 ` [PATCH 4/4] iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm() Luca Coelho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.