lkml.org 
[lkml]   [2008]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] "big box" x86 changes, boot protocol


On Sun, 27 Apr 2008, Adrian Bunk wrote:

> On Sat, Apr 26, 2008 at 01:39:28PM -0700, Andrew Morton wrote:
> > On Sat, 26 Apr 2008 21:54:07 +0200 Ingo Molnar <mingo@elte.hu> wrote:
> >...
> > > +
> > > + memcpy(&early_res[i], &early_res[i + 1],
> > > + (j - 1 - i) * sizeof(struct early_res));
> >
> > nit: memcpy() shouldn't be used for overlapping copies. It happens to be
> > OK (for dst<src) in the kernel implementations. We hope.
> >...
>
> We always use the gcc builtin for memcpy() here.

It's probably hard to write a reasonable x86 memcpy() that wouldn't happen
to do the right thing for this case, but I do agee - we should still use
memmove() for this, just to make it clear that it does overlapping things.

Linus


\
 
 \ /
  Last update: 2008-04-26 23:15    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site