linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jaehee Park <jhpark1013@gmail.com>
Cc: "Jérôme Pouiller" <jerome.pouiller@silabs.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	outreachy@lists.linux.dev, "Stefano Brivio" <sbrivio@redhat.com>
Subject: Re: [PATCH V3] wfx: use container_of() to get vif
Date: Tue, 12 Apr 2022 10:34:44 +0300	[thread overview]
Message-ID: <20220412073444.GE3293@kadam> (raw)
In-Reply-To: <20220412041218.GA2859599@jaehee-ThinkPad-X1-Extreme>

On Tue, Apr 12, 2022 at 12:12:18AM -0400, Jaehee Park wrote:
> diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
> index 78f2a416fe4f..a07baadc5e70 100644
> --- a/drivers/staging/wfx/wfx.h
> +++ b/drivers/staging/wfx/wfx.h
> @@ -25,7 +25,7 @@
>  #define USEC_PER_TXOP 32 /* see struct ieee80211_tx_queue_params */
>  #define USEC_PER_TU 1024
>  
> -#define wvif_to_vif(ptr)(container_of((void *)ptr, struct ieee80211_vif, drv_priv))
> +#define to_vif(wvif)container_of((void *)wvif, struct ieee80211_vif, drv_priv)

Missing space character:

#define to_vif(wvif) container_of((void *)wvif, struct ieee80211_vif, drv_priv)

> diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c
> index 5c25fde3fc41..e90170062d42 100644
> --- a/drivers/staging/wfx/scan.c
> +++ b/drivers/staging/wfx/scan.c
> @@ -24,8 +24,9 @@ static void wfx_ieee80211_scan_completed_compat(struct ieee80211_hw *hw, bool ab
>  static int update_probe_tmpl(struct wfx_vif *wvif, struct cfg80211_scan_request *req)
>  {
>  	struct sk_buff *skb;
> -
> -	skb = ieee80211_probereq_get(wvif->wdev->hw, wvif_to_vif(wvif)->addr, NULL, 0, req->ie_len);
> +	struct ieee80211_vif *vif = to_vif(wvif);
> +	skb = ieee80211_probereq_get(wvif->wdev->hw, vif->addr, 
> +				     NULL, 0, req->ie_len);


You need to add a blank line after the declaration block.  Also there
is trailing white space.  Run checkpatch.pl --strict on your patches.

regards,
dan carpenter


  parent reply	other threads:[~2022-04-12  9:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  4:12 [PATCH V3] wfx: use container_of() to get vif Jaehee Park
2022-04-12  4:59 ` Greg Kroah-Hartman
2022-04-12  7:34 ` Dan Carpenter [this message]
2022-04-13  7:26 ` Jérôme Pouiller
2022-04-18  4:56   ` Jaehee Park

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=20220412073444.GE3293@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jerome.pouiller@silabs.com \
    --cc=jhpark1013@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    --cc=sbrivio@redhat.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).