Subject: Re: [PATCH] more improvement to dev_alloc_name -- strnchr

From: "David S. Miller" <[email-masked]>
Date: Mon, 19 Jan 2004 13:44:29 -0800

On Mon, 19 Jan 2004 22:15:15 +0100
Andi Kleen <[email-masked]> wrote:

> On Mon, 19 Jan 2004 13:07:44 -0800
> Stephen Hemminger <[email-masked]> wrote:
> 
> > 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.

Sometimes it is just used on a platform to force a call to the gcc builtin.

I think it's perfectly reasonable what Stephen has done.