[2.6 patch] remove CONFIG_IDE_MAX_HWIFS

From: Adrian Bunk
Date: Tue Jul 29 2008 - 12:49:07 EST


On Sun, Jul 27, 2008 at 04:32:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Sunday 27 July 2008, Adrian Bunk wrote:
>...
> > <-- snip -->
> >
> > Considering the little benefits of all this fiddling with IDE_MAX_HWIFS
> > I decided to fix it through a simplification:
> > - always #define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
> > - always set CONFIG_IDE_MAX_HWIFS in kconfig
> > - let IDE_MAX_HWIFS default to 10
> > - allow changing the value of IDE_MAX_HWIFS only if IDE && EMBEDDED
>
> I was actually wondering whether it is worth to keep IDE_MAX_HWIFS
> now that ide_hwif_t instances are allocated dynamically.
>
> [ The difference between MAX_HWIFS == 10 and MAX_HWIFS == 2 is now
> ~100 bytes (x86_32) and between MAX_HWIFS == 10 and MAX_HWIFS == 1
> it is ~1kb (IIRC). ]
>
> Since there were also many other improvements in shrinking drivers/ide/
> code size which should keep embedded users happy and compensate for
> the above 1kB-worst-case I would prefer to have IDE_MAX_HWIFS removed
> completely.
>...

Patch below.

cu
Adrian


<-- snip -->


The benefits of a user settable CONFIG_IDE_MAX_HWIFS have become pretty
tiny and are no longer considered worth the trouble of an own option.

Simply always #define MAX_HWIFS to 10.

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxxx>

---

drivers/ide/Kconfig | 10 ----------
include/linux/ide.h | 13 +------------
2 files changed, 1 insertion(+), 22 deletions(-)

f09c0c4e445dff712ad883c173e4da02ce943e5d
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 130ef64..a34758d 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -54,16 +54,6 @@ menuconfig IDE

if IDE

-config IDE_MAX_HWIFS
- int "Max IDE interfaces"
- depends on ALPHA || SUPERH || IA64 || EMBEDDED
- range 1 10
- default 4
- help
- This is the maximum number of IDE hardware interfaces that will
- be supported by the driver. Make sure it is at least as high as
- the number of IDE interfaces in your system.
-
config BLK_DEV_IDE
tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support"
---help---
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b846bc4..1347c82 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -219,18 +219,7 @@ static inline int __ide_default_irq(unsigned long base)
#include <asm-generic/ide_iops.h>
#endif

-#ifndef MAX_HWIFS
-#if defined(CONFIG_BLACKFIN) || defined(CONFIG_H8300) || defined(CONFIG_XTENSA)
-# define MAX_HWIFS 1
-#else
-# define MAX_HWIFS 10
-#endif
-#endif
-
-#if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED)
-#undef MAX_HWIFS
-#define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
-#endif
+#define MAX_HWIFS 10

/* Currently only m68k, apus and m8xx need it */
#ifndef IDE_ARCH_ACK_INTR

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/