netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: davem@redhat.com, ap@cipherica.com, netdev@oss.sgi.com
Subject: Re: [PATCH] more improvement to dev_alloc_name -- strnchr
Date: Mon, 19 Jan 2004 22:15:15 +0100	[thread overview]
Message-ID: <20040119221515.74629ac4.ak@suse.de> (raw)
In-Reply-To: <20040119130744.324f582b.shemminger@osdl.org>

On Mon, 19 Jan 2004 13:07:44 -0800
Stephen Hemminger <shemminger@osdl.org> wrote:

> On Mon, 19 Jan 2004 21:06:05 +0100
> Andi Kleen <ak@suse.de> wrote:
> 
> > On Mon, 19 Jan 2004 11:32:04 -0800
> > Stephen Hemminger <shemminger@osdl.org> wrote:
> > 
> > > +#ifndef __HAVE_ARCH_STRNCHR
> > 
> > Please drop the ifdef. Don't want to encourage anybody to write
> > strrchr() in assembly.
> > 
> > -Andi
> 
> I assume you mean strnchr not strrchr. Mainly just following the style
> of all the other string routines.

Yep, strnchr. 

> What if gcc does it inline in some future version?

Not sure what it has to do with that. The #ifdef __HAVE_ARCH_* stuff 
is that architectures with crazy enough hackers can add assembly
optimized functions if they want. But it clearly doesn't make any sense
with this function (in fact it doesn't make much sense with any string
function except memset/memcpy), so better not encourage it.

-Andi 

  reply	other threads:[~2004-01-19 21:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1074302619.40088e9bd44a6@www.geekmail.cc>
2004-01-19 19:32 ` [PATCH] more improvement to dev_alloc_name -- strnchr Stephen Hemminger
2004-01-19 20:06   ` Andi Kleen
2004-01-19 21:07     ` Stephen Hemminger
2004-01-19 21:15       ` Andi Kleen [this message]
2004-01-19 21:44         ` David S. Miller
2004-01-19 23:27         ` Alex Pankratov
2004-01-20  5:25   ` David S. Miller

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=20040119221515.74629ac4.ak@suse.de \
    --to=ak@suse.de \
    --cc=ap@cipherica.com \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.org \
    /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).