linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FIx compile of swim3 as module
@ 2008-02-13  2:40 Tony Breeds
  2008-02-13  2:48 ` Josh Boyer
  2008-02-13  3:26 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 5+ messages in thread
From: Tony Breeds @ 2008-02-13  2:40 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds, LinuxPPC-dev
  Cc: Paul Mackerras, Bartlomiej Zolnierkiewicz

The current pmac32_defconfig fails to build with the following error:

  Building modules, stage 2.
ERROR: "check_media_bay" [drivers/block/swim3.ko] undefined!
WARNING: modpost: Found 23 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[2]: *** [__modpost] Error 1

This patch fixes that.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

---

 drivers/block/swim3.c        |    4 ----
 drivers/macintosh/mediabay.c |    2 --
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index b4e462f..730ccea 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -251,10 +251,6 @@ static int floppy_release(struct inode *inode, struct file *filp);
 static int floppy_check_change(struct gendisk *disk);
 static int floppy_revalidate(struct gendisk *disk);
 
-#ifndef CONFIG_PMAC_MEDIABAY
-#define check_media_bay(which, what)	1
-#endif
-
 static void swim3_select(struct floppy_state *fs, int sel)
 {
 	struct swim3 __iomem *sw = fs->swim3;
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 9367882..51a1128 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -416,7 +416,6 @@ static void poll_media_bay(struct media_bay_info* bay)
 	}
 }
 
-#ifdef CONFIG_MAC_FLOPPY
 int check_media_bay(struct device_node *which_bay, int what)
 {
 	int	i;
@@ -431,7 +430,6 @@ int check_media_bay(struct device_node *which_bay, int what)
 	return -ENODEV;
 }
 EXPORT_SYMBOL(check_media_bay);
-#endif /* CONFIG_MAC_FLOPPY */
 
 #ifdef CONFIG_BLK_DEV_IDE_PMAC
 int check_media_bay_by_base(unsigned long base, int what)

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] FIx compile of swim3 as module
  2008-02-13  2:40 [PATCH] FIx compile of swim3 as module Tony Breeds
@ 2008-02-13  2:48 ` Josh Boyer
  2008-02-13  2:51   ` Tony Breeds
  2008-02-13  6:03   ` Benjamin Herrenschmidt
  2008-02-13  3:26 ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 5+ messages in thread
From: Josh Boyer @ 2008-02-13  2:48 UTC (permalink / raw)
  To: Tony Breeds
  Cc: Bartlomiej Zolnierkiewicz, kyle, LinuxPPC-dev, Paul Mackerras,
	Andrew Morton, Linus Torvalds

On Wed, 13 Feb 2008 13:40:20 +1100
tony@bakeyournoodle.com (Tony Breeds) wrote:

> The current pmac32_defconfig fails to build with the following error:
> 
>   Building modules, stage 2.
> ERROR: "check_media_bay" [drivers/block/swim3.ko] undefined!
> WARNING: modpost: Found 23 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> make[2]: *** [__modpost] Error 1
> 
> This patch fixes that.

Kyle posted a slightly different patch that seemed to still keep
the original intention of ifdefery in tact.  I've no idea which is
better, but the three of you might want to compare notes.

josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] FIx compile of swim3 as module
  2008-02-13  2:48 ` Josh Boyer
@ 2008-02-13  2:51   ` Tony Breeds
  2008-02-13  6:03   ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 5+ messages in thread
From: Tony Breeds @ 2008-02-13  2:51 UTC (permalink / raw)
  To: Josh Boyer
  Cc: Bartlomiej Zolnierkiewicz, kyle, LinuxPPC-dev, Paul Mackerras,
	Andrew Morton, Linus Torvalds

On Tue, Feb 12, 2008 at 08:48:02PM -0600, Josh Boyer wrote:

> Kyle posted a slightly different patch that seemed to still keep
> the original intention of ifdefery in tact.  I've no idea which is
> better, but the three of you might want to compare notes.

/me checks ....

Hmm Kyle's seem the leave the:
#ifndef CONFIG_PMAC_MEDIABAY
#define check_media_bay(which, what)	1
#endif

in swim3.c, which doesn't seem right.

But I'm easy as long as it gets fixed. :)

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] FIx compile of swim3 as module
  2008-02-13  2:40 [PATCH] FIx compile of swim3 as module Tony Breeds
  2008-02-13  2:48 ` Josh Boyer
@ 2008-02-13  3:26 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2008-02-13  3:26 UTC (permalink / raw)
  To: Tony Breeds
  Cc: LinuxPPC-dev, Andrew Morton, Linus Torvalds,
	Bartlomiej Zolnierkiewicz, Paul Mackerras


On Wed, 2008-02-13 at 13:40 +1100, Tony Breeds wrote:
> The current pmac32_defconfig fails to build with the following error:
> 
>   Building modules, stage 2.
> ERROR: "check_media_bay" [drivers/block/swim3.ko] undefined!
> WARNING: modpost: Found 23 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> make[2]: *** [__modpost] Error 1

Bart, I told you I didn't want those ifdef's in mediabay ... they are
just cluttering things and causing trouble.

> This patch fixes that.
> 
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
> 
>  drivers/block/swim3.c        |    4 ----
>  drivers/macintosh/mediabay.c |    2 --
>  2 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
> index b4e462f..730ccea 100644
> --- a/drivers/block/swim3.c
> +++ b/drivers/block/swim3.c
> @@ -251,10 +251,6 @@ static int floppy_release(struct inode *inode, struct file *filp);
>  static int floppy_check_change(struct gendisk *disk);
>  static int floppy_revalidate(struct gendisk *disk);
>  
> -#ifndef CONFIG_PMAC_MEDIABAY
> -#define check_media_bay(which, what)	1
> -#endif
> -
>  static void swim3_select(struct floppy_state *fs, int sel)
>  {
>  	struct swim3 __iomem *sw = fs->swim3;
> diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
> index 9367882..51a1128 100644
> --- a/drivers/macintosh/mediabay.c
> +++ b/drivers/macintosh/mediabay.c
> @@ -416,7 +416,6 @@ static void poll_media_bay(struct media_bay_info* bay)
>  	}
>  }
>  
> -#ifdef CONFIG_MAC_FLOPPY
>  int check_media_bay(struct device_node *which_bay, int what)
>  {
>  	int	i;
> @@ -431,7 +430,6 @@ int check_media_bay(struct device_node *which_bay, int what)
>  	return -ENODEV;
>  }
>  EXPORT_SYMBOL(check_media_bay);
> -#endif /* CONFIG_MAC_FLOPPY */
>  
>  #ifdef CONFIG_BLK_DEV_IDE_PMAC
>  int check_media_bay_by_base(unsigned long base, int what)
> 
> Yours Tony
> 
>   linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
>   Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] FIx compile of swim3 as module
  2008-02-13  2:48 ` Josh Boyer
  2008-02-13  2:51   ` Tony Breeds
@ 2008-02-13  6:03   ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2008-02-13  6:03 UTC (permalink / raw)
  To: Josh Boyer
  Cc: Bartlomiej Zolnierkiewicz, kyle, LinuxPPC-dev, Paul Mackerras,
	Andrew Morton, Linus Torvalds


On Tue, 2008-02-12 at 20:48 -0600, Josh Boyer wrote:
> > The current pmac32_defconfig fails to build with the following
> error:
> > 
> >   Building modules, stage 2.
> > ERROR: "check_media_bay" [drivers/block/swim3.ko] undefined!
> > WARNING: modpost: Found 23 section mismatch(es).
> > To see full details build your kernel with:
> > 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> > make[2]: *** [__modpost] Error 1
> > 
> > This patch fixes that.
> 
> Kyle posted a slightly different patch that seemed to still keep
> the original intention of ifdefery in tact.  I've no idea which is
> better, but the three of you might want to compare notes.

Just remove the bloody ifdef's, they are just a useless pain.

Ben.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-13  6:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13  2:40 [PATCH] FIx compile of swim3 as module Tony Breeds
2008-02-13  2:48 ` Josh Boyer
2008-02-13  2:51   ` Tony Breeds
2008-02-13  6:03   ` Benjamin Herrenschmidt
2008-02-13  3:26 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).