netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ding Tianhong <dingtianhong@huawei.com>,
	Rupesh Gujare <rupesh.gujare@atmel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, Netdev <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 08/19] ozwpan: slight optimization of addr compare
Date: Wed, 25 Dec 2013 14:54:59 +0400	[thread overview]
Message-ID: <52BAB983.3090201@cogentembedded.com> (raw)
In-Reply-To: <52BA50E9.1080203@huawei.com>

Hello.

On 25-12-2013 7:28, Ding Tianhong wrote:

> Use possibly more efficient ether_addr_equal
> instead of memcmp.

> Cc: Rupesh Gujare <rupesh.gujare@atmel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: devel@driverdev.osuosl.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> ---
>   drivers/staging/ozwpan/ozcdev.c  | 2 +-
>   drivers/staging/ozwpan/ozproto.c | 5 +++--
>   2 files changed, 4 insertions(+), 3 deletions(-)

> diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
> index 6ce0af9..c363f66 100644
> --- a/drivers/staging/ozwpan/ozcdev.c
> +++ b/drivers/staging/ozwpan/ozcdev.c
> @@ -448,7 +448,7 @@ int oz_cdev_start(struct oz_pd *pd, int resume)
>   	}
>   	spin_lock(&g_cdev.lock);
>   	if ((g_cdev.active_pd == NULL) &&
> -		(memcmp(pd->mac_addr, g_cdev.active_addr, ETH_ALEN) == 0)) {
> +		(ether_addr_equal(pd->mac_addr, g_cdev.active_addr))) {

    There's no point in enclosing function call into parens.

WBR, Sergei

  reply	other threads:[~2013-12-25 10:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-25  3:28 [PATCH v3 08/19] ozwpan: slight optimization of addr compare Ding Tianhong
2013-12-25 10:54 ` Sergei Shtylyov [this message]
2013-12-26  8:35   ` Ding Tianhong

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=52BAB983.3090201@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dingtianhong@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rupesh.gujare@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).