RE: [Linux-ia64] Re: memcpy failure

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2002-11-15 07:32:20
Here is the patch that I promised.

Bjorn, would you please apply it to the 2.4 tree? and
David, would you please apply it to the 2.5 tree?

Thanks.

- Ken


-----Original Message-----
From: Chen, Kenneth W 
Sent: Thursday, November 14, 2002 7:53 AM
To: Matthew Wilcox; Christian Cotte-Barrot
Cc: linux-ia64@linuxia64.org
Subject: RE: [Linux-ia64] Re: memcpy failure



> >On Thu, Nov 14, 2002 at 10:01:44AM +0100, Christian Cotte-Barrot wrote:
> > But memcpy from memcpy.S is returning a pointer to dest area.
> > That would lead to quasi non-portable code when the return from memcopy
> > is correctly checked depending on which memcopy function is addressed.
> > But BTW, is it meaningful to take into account a return code
> > that is always the same and which value is known in advance ?
> > Does memcpy suppose to failed in some cases ?

> no, memcpy cannot fail (you get a SIGSEGV in userspace or an MCA in
> kernel space).  checking the return value is meaningless.

That's what I feel as well that it is kind of silly to return something that the caller already has. BUt then, I'm not here to judge the specification ;-)

Anyhow, the fix is fairly easy and won't affect the code size as well as the copy throughput, I should have a patch ready shortly to make everyone happy!

- Ken

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64



Received on Thu Nov 14 12:32:24 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:10 EST