Re: [PATCH V3] wfx: use container_of() to get vif

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux