public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Piel <eric.piel@tremplin-utc.net>
To: "J.A. Magallon" <jamagallon@able.es>
Cc: Russell King <rmk@arm.linux.org.uk>,
	Michal Srajer <michal@mat.uni.torun.pl>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] include/linux/etherdevice.h, kernel 2.6.14
Date: Sun, 30 Oct 2005 19:22:05 +0900	[thread overview]
Message-ID: <43649ECD.3020700@tremplin-utc.net> (raw)
In-Reply-To: <95B34D3D-B658-4933-81CF-4DA25BD0F37F@able.es>

J.A. Magallon wrote:
> 
> Just for curiosity, could you both benchmark this also:
> 
> int is_zero_ether_addr0(const unsigned char *addr)
> {
>     return !(((unsigned long *)addr)[0] | ((unsigned short*)addr)[2]);
> }
> 

This is probably safer (wrt 64 bits systems):

int is_zero_ether_addr0(const unsigned char *addr)
{
     return !(((u32*)addr)[0] | ((u16*)addr)[2]);
}

Eric

  reply	other threads:[~2005-10-30 10:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29 14:10 [PATCH] include/linux/etherdevice.h, kernel 2.6.14 Michal Srajer
2005-10-29 14:17 ` Russell King
     [not found]   ` <20051029154027.GC17715@ultra60.mat.uni.torun.pl>
2005-10-29 16:00     ` Russell King
2005-10-29 21:36       ` J.A. Magallon
2005-10-30 10:22         ` Eric Piel [this message]
2005-10-30 10:46         ` Andreas Schwab

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=43649ECD.3020700@tremplin-utc.net \
    --to=eric.piel@tremplin-utc.net \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal@mat.uni.torun.pl \
    --cc=rmk@arm.linux.org.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