Add an error return if CONFIG_HAVE_MEMBLOCK is not set instead
of having to add #ifdef CONFIG_HAVE_MEMBLOCK around blocks of
code calling that function.
Authored-by: Yinghai Lu <[email protected]>
Signed-off-by: Mike Travis <[email protected]>
---
include/linux/memblock.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- linux.orig/include/linux/memblock.h
+++ linux/include/linux/memblock.h
@@ -2,6 +2,8 @@
#define _LINUX_MEMBLOCK_H
#ifdef __KERNEL__
+#define MEMBLOCK_ERROR 0
+
#ifdef CONFIG_HAVE_MEMBLOCK
/*
* Logical memory blocks.
@@ -20,7 +22,6 @@
#include <asm/memblock.h>
#define INIT_MEMBLOCK_REGIONS 128
-#define MEMBLOCK_ERROR 0
struct memblock_region {
phys_addr_t base;
@@ -160,6 +161,12 @@ static inline unsigned long memblock_reg
#define __initdata_memblock
#endif
+#else
+static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align)
+{
+ return MEMBLOCK_ERROR;
+}
+
#endif /* CONFIG_HAVE_MEMBLOCK */
#endif /* __KERNEL__ */
--
On Mon, 25 Apr 2011 13:11:37 -0500
Mike Travis <[email protected]> wrote:
> Add an error return if CONFIG_HAVE_MEMBLOCK is not set instead
> of having to add #ifdef CONFIG_HAVE_MEMBLOCK around blocks of
> code calling that function.
>
> Authored-by: Yinghai Lu <[email protected]>
> Signed-off-by: Mike Travis <[email protected]>
There is no such thing as "Authored-by:". If this patch was written by
yinghai then it must be tagged as From:him at the top of the changelog
and preferably has his signed-off-by: at the end.
Please clarify?
Andrew Morton wrote:
> On Mon, 25 Apr 2011 13:11:37 -0500
> Mike Travis <[email protected]> wrote:
>
>> Add an error return if CONFIG_HAVE_MEMBLOCK is not set instead
>> of having to add #ifdef CONFIG_HAVE_MEMBLOCK around blocks of
>> code calling that function.
>>
>> Authored-by: Yinghai Lu <[email protected]>
>> Signed-off-by: Mike Travis <[email protected]>
>
> There is no such thing as "Authored-by:". If this patch was written by
> yinghai then it must be tagged as From:him at the top of the changelog
> and preferably has his signed-off-by: at the end.
>
> Please clarify?
Yes, you have it correct. I had added the From: line but when I receive
the email, it's removed.
Why not have an "Authored-by"? That would eliminate the sendmail program
from screwing it up?
Thanks,
Mike
* Mike Travis <[email protected]> wrote:
>
>
> Andrew Morton wrote:
> >On Mon, 25 Apr 2011 13:11:37 -0500
> >Mike Travis <[email protected]> wrote:
> >
> >> Add an error return if CONFIG_HAVE_MEMBLOCK is not set instead
> >> of having to add #ifdef CONFIG_HAVE_MEMBLOCK around blocks of
> >> code calling that function.
> >>
> >>Authored-by: Yinghai Lu <[email protected]>
> >>Signed-off-by: Mike Travis <[email protected]>
> >
> >There is no such thing as "Authored-by:". If this patch was written by
> >yinghai then it must be tagged as From:him at the top of the changelog
> >and preferably has his signed-off-by: at the end.
> >
> >Please clarify?
>
> Yes, you have it correct. I had added the From: line but when I receive
> the email, it's removed.
>
> Why not have an "Authored-by"? That would eliminate the sendmail program
> from screwing it up?
"From:" headers are properly recognized by Git and both git log and git
annotate will show the right authorship. Authored-by does not get propagated.
Also, sendmail does not screw up From: headers that are in the body of the
email - forwarding emails is one of the oldest things that can be done to
emails.
Thanks,
Ingo
On Wed, 27 Apr 2011 08:33:18 +0200, Ingo Molnar said:
> Also, sendmail does not screw up From: headers that are in the body of the
> email - forwarding emails is one of the oldest things that can be done to
> emails.
What some Sendmail configurations *do* eat is lines that start with 'From ' (no
colon). Those will get escaped as '>From ...' to prevent them from looking
like a separator line for what's known as 'mbox' format - which is basically
the same info as in the Return-Path: header plus a timestamp. They look like:
>From [email protected] Fri Apr 19 15:50:15 2002
(If the above line has a >From, you have the issue. Yes, it could be smarter
and do a full parse for a mbox header rather than just '^From '. And yes, I
had to go digging to find an old archived mbox format file to snarf the example
from.