From: Julian Calaby <julian.calaby@gmail.com>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: Amitkumar Karwar <akarwar@marvell.com>,
Nishant Sarmukadam <nishants@marvell.com>,
Kalle Valo <kvalo@codeaurora.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] mwifiex: Use to_delayed_work()
Date: Thu, 18 Feb 2016 11:55:36 +1100 [thread overview]
Message-ID: <CAGRGNgXSuYSGAdY1XxA6d0ro0doDWvgJmNpD15ASGXDTxCmVEA@mail.gmail.com> (raw)
In-Reply-To: <20160217123336.GA30230@amitoj-Inspiron-3542>
Hi All,
On Wed, Feb 17, 2016 at 11:33 PM, Amitoj Kaur Chawla
<amitoj1606@gmail.com> wrote:
> Introduce the use of to_delayed_work() helper function instead of open
> coding it with container_of()
>
> A simplified version of the Coccinelle semantic patch used to make
> this change is:
>
> //<smpl>
> @@
> expression a;
> symbol work;
> @@
> - container_of(a, struct delayed_work, work)
> + to_delayed_work(a)
> //</smpl>
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Looks right to me.
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Thanks,
> ---
> 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);
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
next prev parent reply other threads:[~2016-02-18 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 12:33 [PATCH] mwifiex: Use to_delayed_work() Amitoj Kaur Chawla
2016-02-18 0:55 ` Julian Calaby [this message]
2016-03-07 12:23 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGRGNgXSuYSGAdY1XxA6d0ro0doDWvgJmNpD15ASGXDTxCmVEA@mail.gmail.com \
--to=julian.calaby@gmail.com \
--cc=akarwar@marvell.com \
--cc=amitoj1606@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nishants@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).