Re: [PATCH] ppc: fix #ifdef-s in mediabay driver

2008-01-23 Thread Bartlomiej Zolnierkiewicz
On Wednesday 23 January 2008, Benjamin Herrenschmidt wrote:
 
 On Wed, 2008-01-23 at 01:58 +0100, Bartlomiej Zolnierkiewicz wrote:
  I'm more worried about breaking automatic build checking (make randconfig)
  than a few extra bytes so if you remove all #ifdefs you'll have to either
  make BLK_DEV_IDE_PMAC select PMAC_MEDIABAY or make PMAC_MEDIABAY depend
  on BLK_DEV_IDE_PMAC (otherwise BLK_DEV_IDE=n  PMAC_MEDIABAY=y will fail
  since mediabay.c is referencing IDE code).
 
 I was thinking about having the pmac arch code provide an exported
 function pointer to put the hook in to avoid that problem.

BTW the other pending IDE patches (yet to posted) include rework of IDE
hot-plug support for PMAC media-bay so ide_init_hwif_ports()/ide_register_hw()
/ide_unregister() calls in mediabay.c will be replaced by something else.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ppc: fix #ifdef-s in mediabay driver

2008-01-22 Thread Benjamin Herrenschmidt

On Wed, 2008-01-23 at 00:12 +0100, Bartlomiej Zolnierkiewicz wrote:
 * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef in
   check_media_bay() by CONFIG_MAC_FLOPPY one.
 
 * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef-s by
   CONFIG_BLK_DEV_IDE_PMAC ones.
 
 * check_media_bay() is used only by drivers/block/swim3.c
   so make this function available only if CONFIG_MAC_FLOPPY
   is defined.
 
 * check_media_bay_by_base() and media_bay_set_ide_infos()
   are used only by drivers/ide/ppc/pmac.c so so make these
   functions available only if CONFIG_MAC_FLOPPY is defined.
 
 Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
 ---
 Ben, IMO this patch is safe for 2.6.24 (assuming that it builds fine :),
 otherwise I would like to ask for permission to merge it through IDE
 tree since I have other pending IDE patches depending on this one.

I'd rather avoid touching 2.6.24 unless it actually fixes a bug or
regression...

I'm tempted to actually remove all ifdef's ... if you have a media-bay,
then there are about 99% chances it contains an IDE device, with the
remaining percent being split with putting a floppy or a battery in. I
doubt anybody will care building a kernel without the support for these
and with the mediabay support, and still want to save a handful of bytes
in that driver.

Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ppc: fix #ifdef-s in mediabay driver

2008-01-22 Thread Bartlomiej Zolnierkiewicz

Hi,

On Wednesday 23 January 2008, Benjamin Herrenschmidt wrote:
 
 On Wed, 2008-01-23 at 00:12 +0100, Bartlomiej Zolnierkiewicz wrote:
  * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef in
check_media_bay() by CONFIG_MAC_FLOPPY one.
  
  * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef-s by
CONFIG_BLK_DEV_IDE_PMAC ones.
  
  * check_media_bay() is used only by drivers/block/swim3.c
so make this function available only if CONFIG_MAC_FLOPPY
is defined.
  
  * check_media_bay_by_base() and media_bay_set_ide_infos()
are used only by drivers/ide/ppc/pmac.c so so make these
functions available only if CONFIG_MAC_FLOPPY is defined.
  
  Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
  ---
  Ben, IMO this patch is safe for 2.6.24 (assuming that it builds fine :),
  otherwise I would like to ask for permission to merge it through IDE
  tree since I have other pending IDE patches depending on this one.
 
 I'd rather avoid touching 2.6.24 unless it actually fixes a bug or
 regression...

Well, it is a bugfix for PMAC_MEDIABAY=y  BLK_DEV_IDE=n  MAC_FLOPPY=y. :)

 I'm tempted to actually remove all ifdef's ... if you have a media-bay,
 then there are about 99% chances it contains an IDE device, with the
 remaining percent being split with putting a floppy or a battery in. I
 doubt anybody will care building a kernel without the support for these
 and with the mediabay support, and still want to save a handful of bytes
 in that driver.

I'm more worried about breaking automatic build checking (make randconfig)
than a few extra bytes so if you remove all #ifdefs you'll have to either
make BLK_DEV_IDE_PMAC select PMAC_MEDIABAY or make PMAC_MEDIABAY depend
on BLK_DEV_IDE_PMAC (otherwise BLK_DEV_IDE=n  PMAC_MEDIABAY=y will fail
since mediabay.c is referencing IDE code).

Thanks,
Bart
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ppc: fix #ifdef-s in mediabay driver

2008-01-22 Thread Benjamin Herrenschmidt

On Wed, 2008-01-23 at 01:58 +0100, Bartlomiej Zolnierkiewicz wrote:
 I'm more worried about breaking automatic build checking (make randconfig)
 than a few extra bytes so if you remove all #ifdefs you'll have to either
 make BLK_DEV_IDE_PMAC select PMAC_MEDIABAY or make PMAC_MEDIABAY depend
 on BLK_DEV_IDE_PMAC (otherwise BLK_DEV_IDE=n  PMAC_MEDIABAY=y will fail
 since mediabay.c is referencing IDE code).

I was thinking about having the pmac arch code provide an exported
function pointer to put the hook in to avoid that problem.

Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev