linux-mips
[Top] [All Lists]

Re: conflicting declaration of prom_getcmdline()

To: Ulrich Eckhardt <eckhardt@satorlaser.com>
Subject: Re: conflicting declaration of prom_getcmdline()
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 4 Apr 2005 07:21:05 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <200504011028.04244.eckhardt@satorlaser.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200504011028.04244.eckhardt@satorlaser.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Fri, Apr 01, 2005 at 10:28:04AM +0200, Ulrich Eckhardt wrote:

> I just stumbled over arch/mips/au1000/common/prom.c, which contains a 
> function 
> defined like this:
>   char* prom_getcmdline(void);
>   EXPORT_SYMBOL(prom_getcmdline);
> while there are implementations that define the function as
>   char* __init prom_getcmdline();
> Further, there are several declarations throughout sourcefiles and in 
> include/asm-mips/mips-boards/prom.h and include/asm-mips/sgialib.h. Just grep 
> for it and you'll see the mess.
> 
> If anyone tells me which one is right and cares to explain why I hereby 
> volunteer to create a patch. ;)

__init was introduced long after prom_getcmdline() and not all definitions
ever got updated.  For prototypes where __init doesn't server any useful
purpose other than for the human reader so we generally don't use it.

You've herewith been volunteered ;-)

  Ralf

<Prev in Thread] Current Thread [Next in Thread>