linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] cfg80211/mac80211: use to_delayed_work
@ 2016-01-01 15:48 Geliang Tang
  2016-01-01 15:48 ` [PATCH 2/6] wlcore: " Geliang Tang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Geliang Tang @ 2016-01-01 15:48 UTC (permalink / raw)
  To: Johannes Berg, David S. Miller
  Cc: Geliang Tang, linux-wireless, netdev, linux-kernel

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 net/mac80211/mlme.c | 3 +--
 net/wireless/mlme.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1c342e2..ea70917 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1638,8 +1638,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)
 
 void ieee80211_dfs_cac_timer_work(struct work_struct *work)
 {
-	struct delayed_work *delayed_work =
-		container_of(work, struct delayed_work, work);
+	struct delayed_work *delayed_work = to_delayed_work(work);
 	struct ieee80211_sub_if_data *sdata =
 		container_of(delayed_work, struct ieee80211_sub_if_data,
 			     dfs_cac_timer_work);
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index fb44fa3..4fccf52 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -721,7 +721,7 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
 	unsigned long timeout, next_time = 0;
 	int bandid, i;
 
-	delayed_work = container_of(work, struct delayed_work, work);
+	delayed_work = to_delayed_work(work);
 	rdev = container_of(delayed_work, struct cfg80211_registered_device,
 			    dfs_update_channels_wk);
 	wiphy = &rdev->wiphy;
-- 
2.5.0



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

* [PATCH 2/6] wlcore: use to_delayed_work
  2016-01-01 15:48 [PATCH 1/6] cfg80211/mac80211: use to_delayed_work Geliang Tang
@ 2016-01-01 15:48 ` Geliang Tang
  2016-01-01 15:48 ` [PATCH 3/6] wl1251: " Geliang Tang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2016-01-01 15:48 UTC (permalink / raw)
  To: Kalle Valo, Eliad Peller, Kobi Leibovitch
  Cc: Geliang Tang, linux-wireless, netdev, linux-kernel

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/net/wireless/ti/wlcore/main.c | 10 +++++-----
 drivers/net/wireless/ti/wlcore/ps.c   |  2 +-
 drivers/net/wireless/ti/wlcore/scan.c |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index ec7f6af..5c12caa 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -244,7 +244,7 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work)
 	struct delayed_work *dwork;
 	struct wl1271 *wl;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wl = container_of(dwork, struct wl1271, tx_watchdog_work);
 
 	mutex_lock(&wl->mutex);
@@ -2085,7 +2085,7 @@ static void wlcore_channel_switch_work(struct work_struct *work)
 	struct wl12xx_vif *wlvif;
 	int ret;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wlvif = container_of(dwork, struct wl12xx_vif, channel_switch_work);
 	wl = wlvif->wl;
 
@@ -2121,7 +2121,7 @@ static void wlcore_connection_loss_work(struct work_struct *work)
 	struct ieee80211_vif *vif;
 	struct wl12xx_vif *wlvif;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wlvif = container_of(dwork, struct wl12xx_vif, connection_loss_work);
 	wl = wlvif->wl;
 
@@ -2150,7 +2150,7 @@ static void wlcore_pending_auth_complete_work(struct work_struct *work)
 	unsigned long time_spare;
 	int ret;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wlvif = container_of(dwork, struct wl12xx_vif,
 			     pending_auth_complete_work);
 	wl = wlvif->wl;
@@ -5660,7 +5660,7 @@ static void wlcore_roc_complete_work(struct work_struct *work)
 	struct wl1271 *wl;
 	int ret;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wl = container_of(dwork, struct wl1271, roc_complete_work);
 
 	ret = wlcore_roc_completed(wl);
diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c
index 4cd316e..d4420da 100644
--- a/drivers/net/wireless/ti/wlcore/ps.c
+++ b/drivers/net/wireless/ti/wlcore/ps.c
@@ -38,7 +38,7 @@ void wl1271_elp_work(struct work_struct *work)
 	struct wl12xx_vif *wlvif;
 	int ret;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wl = container_of(dwork, struct wl1271, elp_work);
 
 	wl1271_debug(DEBUG_PSM, "elp work");
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c
index 1e3d51c..a384f3f 100644
--- a/drivers/net/wireless/ti/wlcore/scan.c
+++ b/drivers/net/wireless/ti/wlcore/scan.c
@@ -38,7 +38,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
 	struct wl12xx_vif *wlvif;
 	int ret;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wl = container_of(dwork, struct wl1271, scan_complete_work);
 
 	wl1271_debug(DEBUG_SCAN, "Scanning complete");
-- 
2.5.0



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

* [PATCH 3/6] wl1251: use to_delayed_work
  2016-01-01 15:48 [PATCH 1/6] cfg80211/mac80211: use to_delayed_work Geliang Tang
  2016-01-01 15:48 ` [PATCH 2/6] wlcore: " Geliang Tang
@ 2016-01-01 15:48 ` Geliang Tang
  2016-01-01 15:48 ` [PATCH 4/6] rtlwifi: " Geliang Tang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2016-01-01 15:48 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Geliang Tang, linux-wireless, netdev, linux-kernel

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/net/wireless/ti/wl1251/ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wl1251/ps.c b/drivers/net/wireless/ti/wl1251/ps.c
index b9e27b9..fa01b0a 100644
--- a/drivers/net/wireless/ti/wl1251/ps.c
+++ b/drivers/net/wireless/ti/wl1251/ps.c
@@ -32,7 +32,7 @@ void wl1251_elp_work(struct work_struct *work)
 	struct delayed_work *dwork;
 	struct wl1251 *wl;
 
-	dwork = container_of(work, struct delayed_work, work);
+	dwork = to_delayed_work(work);
 	wl = container_of(dwork, struct wl1251, elp_work);
 
 	wl1251_debug(DEBUG_PSM, "elp work");
-- 
2.5.0



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

* [PATCH 4/6] rtlwifi: use to_delayed_work
  2016-01-01 15:48 [PATCH 1/6] cfg80211/mac80211: use to_delayed_work Geliang Tang
  2016-01-01 15:48 ` [PATCH 2/6] wlcore: " Geliang Tang
  2016-01-01 15:48 ` [PATCH 3/6] wl1251: " Geliang Tang
@ 2016-01-01 15:48 ` Geliang Tang
  2016-01-01 15:48 ` [PATCH 5/6] mwifiex: " Geliang Tang
  2016-01-01 15:48 ` [PATCH 6/6] tilepro: " Geliang Tang
  4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2016-01-01 15:48 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: Geliang Tang, linux-wireless, netdev, linux-kernel

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index 4544752..d37ce16 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -2873,7 +2873,7 @@ value to host byte ordering.*/
 	(ppsc->cur_ps_level |= _ps_flg)
 
 #define container_of_dwork_rtl(x, y, z) \
-	container_of(container_of(x, struct delayed_work, work), y, z)
+	container_of(to_delayed_work(x), y, z)
 
 #define FILL_OCTET_STRING(_os, _octet, _len)	\
 		(_os).octet = (u8 *)(_octet);		\
-- 
2.5.0



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

* [PATCH 5/6] mwifiex: use to_delayed_work
  2016-01-01 15:48 [PATCH 1/6] cfg80211/mac80211: use to_delayed_work Geliang Tang
                   ` (2 preceding siblings ...)
  2016-01-01 15:48 ` [PATCH 4/6] rtlwifi: " Geliang Tang
@ 2016-01-01 15:48 ` Geliang Tang
  2016-01-01 15:48 ` [PATCH 6/6] tilepro: " Geliang Tang
  4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2016-01-01 15:48 UTC (permalink / raw)
  To: Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo
  Cc: Geliang Tang, linux-wireless, netdev, linux-kernel

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/net/wireless/marvell/mwifiex/11h.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/11h.c b/drivers/net/wireless/marvell/mwifiex/11h.c
index 71a1b58..81c60d0 100644
--- a/drivers/net/wireless/marvell/mwifiex/11h.c
+++ b/drivers/net/wireless/marvell/mwifiex/11h.c
@@ -123,8 +123,7 @@ void mwifiex_11h_process_join(struct mwifiex_private *priv, u8 **buffer,
 void mwifiex_dfs_cac_work_queue(struct work_struct *work)
 {
 	struct cfg80211_chan_def chandef;
-	struct delayed_work *delayed_work =
-			container_of(work, struct delayed_work, work);
+	struct delayed_work *delayed_work = to_delayed_work(work);
 	struct mwifiex_private *priv =
 			container_of(delayed_work, struct mwifiex_private,
 				     dfs_cac_work);
@@ -289,8 +288,7 @@ int mwifiex_11h_handle_radar_detected(struct mwifiex_private *priv,
 void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work)
 {
 	struct mwifiex_uap_bss_param *bss_cfg;
-	struct delayed_work *delayed_work =
-			container_of(work, struct delayed_work, work);
+	struct delayed_work *delayed_work = to_delayed_work(work);
 	struct mwifiex_private *priv =
 			container_of(delayed_work, struct mwifiex_private,
 				     dfs_chan_sw_work);
-- 
2.5.0



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

* [PATCH 6/6] tilepro: use to_delayed_work
  2016-01-01 15:48 [PATCH 1/6] cfg80211/mac80211: use to_delayed_work Geliang Tang
                   ` (3 preceding siblings ...)
  2016-01-01 15:48 ` [PATCH 5/6] mwifiex: " Geliang Tang
@ 2016-01-01 15:48 ` Geliang Tang
  2016-01-04 21:07   ` David Miller
  4 siblings, 1 reply; 7+ messages in thread
From: Geliang Tang @ 2016-01-01 15:48 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: Geliang Tang, netdev, linux-kernel

Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/net/ethernet/tile/tilepro.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c
index 6f0a449..298e059 100644
--- a/drivers/net/ethernet/tile/tilepro.c
+++ b/drivers/net/ethernet/tile/tilepro.c
@@ -1349,8 +1349,7 @@ static int tile_net_open_inner(struct net_device *dev)
  */
 static void tile_net_open_retry(struct work_struct *w)
 {
-	struct delayed_work *dw =
-		container_of(w, struct delayed_work, work);
+	struct delayed_work *dw = to_delayed_work(w);
 
 	struct tile_net_priv *priv =
 		container_of(dw, struct tile_net_priv, retry_work);
-- 
2.5.0



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

* Re: [PATCH 6/6] tilepro: use to_delayed_work
  2016-01-01 15:48 ` [PATCH 6/6] tilepro: " Geliang Tang
@ 2016-01-04 21:07   ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2016-01-04 21:07 UTC (permalink / raw)
  To: geliangtang; +Cc: cmetcalf, netdev, linux-kernel

From: Geliang Tang <geliangtang@163.com>
Date: Fri,  1 Jan 2016 23:48:57 +0800

> Use to_delayed_work() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied, thanks.

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

end of thread, other threads:[~2016-01-04 21:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01 15:48 [PATCH 1/6] cfg80211/mac80211: use to_delayed_work Geliang Tang
2016-01-01 15:48 ` [PATCH 2/6] wlcore: " Geliang Tang
2016-01-01 15:48 ` [PATCH 3/6] wl1251: " Geliang Tang
2016-01-01 15:48 ` [PATCH 4/6] rtlwifi: " Geliang Tang
2016-01-01 15:48 ` [PATCH 5/6] mwifiex: " Geliang Tang
2016-01-01 15:48 ` [PATCH 6/6] tilepro: " Geliang Tang
2016-01-04 21:07   ` David Miller

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).