public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong-hv44wF8Li93QT0dZR+AlfA@public•gmane.org>
To: Bing Zhao <bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public•gmane.org>
Cc: "John W. Linville"
	<linville-2XuSBdqkA4R54TAoqtyWWQ@public•gmane.org>,
	"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org"
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
	Netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>
Subject: Re: [PATCH v3.5 17/19] mwifiex: slight optimization of addr compare
Date: Wed, 8 Jan 2014 10:58:09 +0800	[thread overview]
Message-ID: <52CCBEC1.1010309@huawei.com> (raw)
In-Reply-To: <477F20668A386D41ADCC57781B1F70430F534B5541-r8ILAu4/owuHXkj8w7BxOhL4W9x8LtSr@public.gmane.org>

On 2014/1/8 10:50, Bing Zhao wrote:
> Hi Ding,
> 
>> Use possibly more efficient ether_addr_equal
>> instead of memcmp.
> 
>> @@ -782,8 +782,7 @@ static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv,
>>  	}
>>
>>  	/* If BSSID is diff, modify current BSS parameters */
>> -	if (memcmp(priv->curr_bss_params.bss_descriptor.mac_address,
>> -		   ibss_coal_resp->bssid, ETH_ALEN)) {
>> +	if (!ether_addr_equal(priv->curr_bss_params.bss_descriptor.mac_address, ibss_coal_resp->bssid))
> 
> Could you break the line?
> If you run "checkpatch.pl" you will spot this warning.
> 
>>  	if (!IS_11N_ENABLED(priv) ||
>> -	    memcmp(priv->curr_addr, rx_pkt_hdr->eth803_hdr.h_dest, ETH_ALEN)) {
>> +	    !ether_addr_equal_unaligned(priv->curr_addr, rx_pkt_hdr->eth803_hdr.h_dest)) {
> 
> Also over 80 characters here.
> 
> Thanks,
> Bing
> 

Ok, thanks

Regards
Ding

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-01-08  2:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26 11:41 [PATCH v3.5 17/19] mwifiex: slight optimization of addr compare Ding Tianhong
     [not found] ` <52BC15E7.7050205-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-01-08  2:50   ` Bing Zhao
     [not found]     ` <477F20668A386D41ADCC57781B1F70430F534B5541-r8ILAu4/owuHXkj8w7BxOhL4W9x8LtSr@public.gmane.org>
2014-01-08  2:58       ` Ding Tianhong [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=52CCBEC1.1010309@huawei.com \
    --to=dingtianhong-hv44wf8li93qt0dzr+alfa@public$(echo .)gmane.org \
    --cc=bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public$(echo .)gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public$(echo .)gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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