All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini@unipv.it>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a	time if possible
Date: Sat, 10 Oct 2009 09:44:31 +0200	[thread overview]
Message-ID: <20091010074431.GA3732@mail.gnudd.com> (raw)
In-Reply-To: <4AD0261B.1060501@free.fr>

Hello Chris

>> +	unsigned long *dl = (unsigned long *)dest, *sl = (unsigned long *)src;

> Nitpick: Are you sure the casts are necessary here ?

Without the one on src it complains because of "const". So I write
both for symetry.

> +	if ( (((ulong)dest | (ulong)src) & (sizeof(*dl) - 1)) == 0) {
> 
> The "or" should not include count: the remaining count % sizeof(unsigned 
> long) bytes are copied below.

Yes, that's why I'm sending V4 today. Actually, I booted V3 but didn't
measure it, so this bug went unnoticed. But I won't measure it today,
either...

Ok for spaces around operators (even if the whole of string.c is
strangely spaced, but that's historical).

thanks
/alessandro

  reply	other threads:[~2009-10-10  7:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  9:12 [U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a time if possible Alessandro Rubini
2009-10-09 10:21 ` Mike Frysinger
2009-10-09 10:50   ` Alessandro Rubini
2009-10-10  6:13 ` Chris Moore
2009-10-10  7:44   ` Alessandro Rubini [this message]
2009-10-12  4:37     ` Chris Moore

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=20091010074431.GA3732@mail.gnudd.com \
    --to=rubini@unipv.it \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.