All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging: rtl8723bs: include: Remove typedef for struct.
Date: Tue, 2 Apr 2019 08:42:14 +0200	[thread overview]
Message-ID: <20190402064214.GA8270@kroah.com> (raw)
In-Reply-To: <20190402062706.13340-1-sanjana99reddy99@gmail.com>

On Tue, Apr 02, 2019 at 11:57:06AM +0530, Sanjana Sanikommu wrote:
> Challenge suggested by coccinelle.
> 
> Linux kernel coding style guidelines suggest not using typedefs for
> structure.
> 
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
>  drivers/staging/rtl8723bs/include/ieee80211.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
> index 9efb4dcb9d3a..ce523dfb6faf 100644
> --- a/drivers/staging/rtl8723bs/include/ieee80211.h
> +++ b/drivers/staging/rtl8723bs/include/ieee80211.h
> @@ -202,7 +202,7 @@ enum NETWORK_TYPE
>  #define IsSupportedVHT(NetType) (((NetType) & (WIRELESS_11AC)) ? true : false)
>  
>  
> -typedef struct ieee_param {
> +struct ieee_param {
>  	u32 cmd;
>  	u8 sta_addr[ETH_ALEN];
>  	union {
> @@ -240,13 +240,13 @@ typedef struct ieee_param {
>  			u8 buf[0];
>  		} bcn_ie;
>  	} u;
> -}ieee_param;
> +};
>  
> -typedef struct ieee_param_ex {
> +struct ieee_param_ex {
>  	u32 cmd;
>  	u8 sta_addr[ETH_ALEN];
>  	u8 data[0];
> -}ieee_param_ex;
> +};
>  
>  struct sta_data{
>  	u16 aid;
> @@ -870,10 +870,10 @@ static inline int is_zero_mac_addr(const u8 *addr)
>  #define CFG_IEEE80211_RESERVE_FCS (1<<0)
>  #define CFG_IEEE80211_COMPUTE_FCS (1<<1)
>  
> -typedef struct tx_pending_t{
> +struct tx_pending_t {
>  	int frag;
>  	struct ieee80211_txb *txb;
> -}tx_pending_t;
> +};

This structure isn't used anywhere, right?  So why not just submit a
patch to delete it?

thanks,

greg k-h


  reply	other threads:[~2019-04-02  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  6:27 [PATCH] staging: rtl8723bs: include: Remove typedef for struct Sanjana Sanikommu
2019-04-02  6:42 ` Greg KH [this message]
2019-04-02  6:44   ` Sanjana Sanikommu

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=20190402064214.GA8270@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sanjana99reddy99@gmail.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 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.