public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Jacob Bai <jacob.bai.au@gmail.com>
To: Joe Perches <joe@perches.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Pavel Skripkin <paskripkin@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: replace IEs with ies
Date: Fri, 21 Oct 2022 22:20:52 +1100	[thread overview]
Message-ID: <Y1KAlCIt64/y/PE7@jacob-Ubuntu> (raw)
In-Reply-To: <8617109bdc3e192b98e5c3b21ba871501a87f6d9.camel@perches.com>

On Wed, Oct 19, 2022 at 09:35:32PM -0700, Joe Perches wrote:
> On Tue, 2022-10-18 at 21:54 +1100, Jacob Bai wrote:
> > Replace wlan_bssid_ex struct member IEs to ies.
> > CamelCase issue found by checkpatch.
> 
> Please try to avoid changing code merely to appease checkpatch.
> 
> What is the value of the last s?
> When is a specific index of the IEs array actually used?
> 
> Mere renaming may be removing useful markings.
> 
> (removing a lot of the rename blocks)
> 
Thanks for those advices. As this was my first patch, I tried to 
pick up an easier one to start with and followed commit 341f27d0
but changed "IEs" only. 
> > diff --git a/drivers/staging/r8188eu/include/wlan_bssdef.h b/drivers/staging/r8188eu/include/wlan_bssdef.h
> []
> > @@ -239,7 +239,7 @@ struct wlan_bssid_ex {
> >  	unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
> >  	struct wlan_phy_info	PhyInfo;
> >  	u32  IELength;
> > -	u8  IEs[MAX_IE_SZ];	/* timestamp, beacon interval, and
> > +	u8  ies[MAX_IE_SZ];	/* timestamp, beacon interval, and
> >  				 * capability information) */
> >  } __packed;
> []
> > diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> []
> > @@ -104,11 +104,11 @@ static char *translate_scan(struct adapter *padapter,
> >  
> >  			if (pnetwork->network.Reserved[0] == 2) {/*  Probe Request */
> >  				/*	Verifying the P2P IE */
> > -				if (rtw_get_p2p_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &p2pielen))
> > +				if (rtw_get_p2p_ie(pnetwork->network.ies, pnetwork->network.IELength, NULL, &p2pielen))
> >  					blnGotP2PIE = true;
> >  			} else {/*  Beacon or Probe Respones */
> >  				/*	Verifying the P2P IE */
> > -				if (rtw_get_p2p_ie(&pnetwork->network.IEs[12], pnetwork->network.IELength - 12, NULL, &p2pielen))
> > +				if (rtw_get_p2p_ie(&pnetwork->network.ies[12], pnetwork->network.IELength - 12, NULL, &p2pielen))
> 
> For instance, these consistent 12 and "- 12" uses may be better as some
> alternate array.
Could you please be more detail on this?
> 
> >  					blnGotP2PIE = true;
> >  			}
> >  		}
> > @@ -131,7 +131,7 @@ static char *translate_scan(struct adapter *padapter,
> >  	start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid);
> >  
> >  	/* parsing HT_CAP_IE */
> > -	p = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - 12);
> > +	p = rtw_get_ie(&pnetwork->network.ies[12], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - 12);
> >  
> >  	if (p && ht_ielen > 0) {
> >  		struct ieee80211_ht_cap *pht_capie;
> 
> etc...
> 
> Also this may be removing similarities between a few other realtek
> staging drivers
> 
> $ git grep  "\[MAX_IE_SZ\]"
> drivers/staging/r8188eu/include/wlan_bssdef.h:  u8  IEs[MAX_IE_SZ];     /* timestamp, beacon interval, and
> drivers/staging/rtl8712/wlan_bssdef.h:  u8 IEs[MAX_IE_SZ];
> drivers/staging/rtl8723bs/include/wlan_bssdef.h:        u8  ies[MAX_IE_SZ];     /* timestamp, beacon interval, and capability information) */
> 
looks like rtl8723bs has already been updated with ies, should I replace
IELength as well like the commit I followed?

      reply	other threads:[~2022-10-21 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 10:54 [PATCH] staging: r8188eu: replace IEs with ies Jacob Bai
2022-10-20  4:35 ` Joe Perches
2022-10-21 11:20   ` Jacob Bai [this message]

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=Y1KAlCIt64/y/PE7@jacob-Ubuntu \
    --to=jacob.bai.au@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    /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