public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Meelis Roos <mroos@linux.ee>
Cc: unlisted-recipients:"; no To-header on input"
	<""@mail.ravnborg.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [ppc] fix mot_info section
Date: Wed, 30 May 2007 19:08:14 +0200	[thread overview]
Message-ID: <20070530170814.GD15335@uranus.ravnborg.org> (raw)
In-Reply-To: <Pine.SOC.4.64.0705301805390.23769@math>

On Wed, May 30, 2007 at 07:14:49PM +0300, Meelis Roos wrote:
> The following patch makes mot_info __initdata since it is used only in 
> __init functions. prep_pci.c change has been tested in real life on 
> Motorola Powerstack II (compiles without modpost warnings and boots 
> fine), pplus.c has not been tested but seems similar.
> 
> Signed-off-by: Meelis Roos <mroos@linux.ee>
> 
> diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c
> index 8a1788c..9744108 100644
> --- a/arch/ppc/platforms/pplus.c
> +++ b/arch/ppc/platforms/pplus.c
> @@ -256,7 +256,7 @@ struct brd_info {
>  	const char *name;
>  	int (*map_irq) (struct pci_dev *, unsigned char, unsigned char);
>  };
> -struct brd_info mot_info[] = {
> +__initdata struct brd_info mot_info[] = {
>  	{0x300, 0x00, 0x00, "MVME 2400", Genesis2_map_irq},
>  	{0x1E0, 0xE0, 0x00, "Mesquite cPCI (MCP750)", mesquite_map_irq},
>  	{0x1E0, 0xE1, 0x00, "Sitka cPCI (MCPN750)", sitka_map_irq},
> diff --git a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
> index 1df3150..bdec1f1 100644
> --- a/arch/ppc/platforms/prep_pci.c
> +++ b/arch/ppc/platforms/prep_pci.c
> @@ -792,7 +792,7 @@ raven_init(void)
>  	return 1;
>  }
>  
> -struct mot_info {
> +__initdata struct mot_info {
>  	int		cpu_type;	/* 0x100 mask assumes for Raven and Hawk boards that the level/edge are set */
>  					/* 0x200 if this board has a Hawk chip. */
>  	int		base_type;

The way you place __initdata is bogus.
Please read following from init.h again:

 * For initialized data:
 * You should insert __initdata between the variable name and equal
 * sign followed by value, e.g.:
 *
 * static int init_variable __initdata = 0;
 * static char linux_logo[] __initdata = { 0x32, 0x36, ... };

If gcc happes to accept your placement does not make it correct.
It is still bogus and unreadable.

	Sam

  reply	other threads:[~2007-05-30 17:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 14:20 ppc modprost warnings in 2.6.22-rc1 Meelis Roos
2007-05-15 20:45 ` Sam Ravnborg
2007-05-30 13:55   ` Meelis Roos
2007-05-30 14:58     ` Satyam Sharma
2007-05-30 16:14       ` [PATCH] [ppc] fix mot_info section Meelis Roos
2007-05-30 17:08         ` Sam Ravnborg [this message]
2007-05-30 17:23           ` Meelis Roos
2007-05-30 16:15       ` ppc modprost warnings in 2.6.22-rc1 Meelis Roos
2007-05-30 15:14     ` Sam Ravnborg

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=20070530170814.GD15335@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox