Re: [PATCH v2 3/8] staging: rtl8192u: User memset to initialize memory, instead of loop.

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

 



On Sun, Jun 24, 2018 at 07:26:41AM -0700, Joe Perches wrote:
> On Sun, 2018-06-24 at 10:57 +0100, John Whitmore wrote:
> > Replaced memory initialising loop with memset, as suggested by Andy Shevchenko
> []
> > diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
> []
> > @@ -742,8 +742,6 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
> >   */
> >  static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)
> >  {
> > -	u8					i;
> > -
> >  	if (!pOperateMCS) {
> >  		IEEE80211_DEBUG(IEEE80211_DL_ERR, "pOperateMCS can't be null in HT_PickMCSRate()\n");
> >  		return false;
> > @@ -756,8 +754,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)
> >  		//legacy rate routine handled at selectedrate
> >  
> >  		//no MCS rate
> > -		for (i = 0; i <= 15; i++)
> > -			pOperateMCS[i] = 0;
> > +		memset(pOperateMCS, 0, 15);
> 
> Not the same code.
> 
> Loop is <= 15, so memset should use 16
> 

I wonder could I simply edit that single patch file to change "15" to "16" and
re-issue the set as "v3"? There's no checksums on the patch file just but
there are git hashes which will change with content I guess :(

I'll re-do that patch set. Stupid mistake.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [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