public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove genhd.h from header exports
@ 2007-08-07 18:47 Olaf Hering
  2007-08-07 19:01 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2007-08-07 18:47 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton


remove linux/genhd.h from make headers_install

It contains no userinterfaces, only the msdos partition table layout and some
numbers. And it became finally unusable with the CONFIG_BLOCK addition.

Remove it from the Kconfig list, and remove the __KERNEL__ checks.
Move #include block up
remove unused inclusion of linux/major.h

compile tested with ppc64_defconfig


Signed-off-by: Olaf Hering <olaf@aepfle.de>

---
 include/linux/Kbuild  |    1 -
 include/linux/genhd.h |   37 ++++++-------------------------------
 2 files changed, 6 insertions(+), 32 deletions(-)

--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -204,7 +204,6 @@ unifdef-y += futex.h
 unifdef-y += fs.h
 unifdef-y += gameport.h
 unifdef-y += generic_serial.h
-unifdef-y += genhd.h
 unifdef-y += gfs2_ondisk.h
 unifdef-y += hayesesp.h
 unifdef-y += hdlcdrv.h
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -9,9 +9,14 @@
  *		<drew@colorado.edu>
  */
 
+#ifdef CONFIG_BLOCK
 #include <linux/types.h>
+#include <linux/device.h>
+#include <linux/smp.h>
+#include <linux/string.h>
+#include <linux/fs.h>
+#include <linux/workqueue.h>
 
-#ifdef CONFIG_BLOCK
 
 enum {
 /* These three have identical behaviour; use the second one if DOS FDISK gets
@@ -43,31 +48,6 @@ enum {
 	UNIXWARE_PARTITION = 0x63,	/* Same as GNU_HURD and SCO Unix */
 };
 
-#ifndef __KERNEL__
-
-struct partition {
-	unsigned char boot_ind;		/* 0x80 - active */
-	unsigned char head;		/* starting head */
-	unsigned char sector;		/* starting sector */
-	unsigned char cyl;		/* starting cylinder */
-	unsigned char sys_ind;		/* What partition type */
-	unsigned char end_head;		/* end head */
-	unsigned char end_sector;	/* end sector */
-	unsigned char end_cyl;		/* end cylinder */
-	unsigned int start_sect;	/* starting sector counting from 0 */
-	unsigned int nr_sects;		/* nr of sectors in partition */
-} __attribute__((packed));
-
-#endif
-
-#ifdef __KERNEL__
-#include <linux/major.h>
-#include <linux/device.h>
-#include <linux/smp.h>
-#include <linux/string.h>
-#include <linux/fs.h>
-#include <linux/workqueue.h>
-
 struct partition {
 	unsigned char boot_ind;		/* 0x80 - active */
 	unsigned char head;		/* starting head */
@@ -260,8 +240,6 @@ static inline void set_capacity(struct g
 	disk->capacity = size;
 }
 
-#endif  /*  __KERNEL__  */
-
 #ifdef CONFIG_SOLARIS_X86_PARTITION
 
 #define SOLARIS_X86_NUMSLICE	16
@@ -405,7 +383,6 @@ struct unixware_disklabel {
 #   define MINIX_NR_SUBPARTITIONS  4
 #endif /* CONFIG_MINIX_SUBPARTITION */
 
-#ifdef __KERNEL__
 
 #define ADDPART_FLAG_NONE	0
 #define ADDPART_FLAG_RAID	1
@@ -435,8 +412,6 @@ static inline struct block_device *bdget
 	return bdget(MKDEV(disk->major, disk->first_minor) + index);
 }
 
-#endif
-
 #else /* CONFIG_BLOCK */
 
 static inline void printk_all_partitions(void) { }

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

* Re: [PATCH] remove genhd.h from header exports
  2007-08-07 18:47 [PATCH] remove genhd.h from header exports Olaf Hering
@ 2007-08-07 19:01 ` Jeff Garzik
  2007-08-07 20:09   ` Olaf Hering
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2007-08-07 19:01 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-kernel, Andrew Morton

Olaf Hering wrote:
> remove linux/genhd.h from make headers_install
> 
> It contains no userinterfaces, only the msdos partition table layout and some
> numbers. And it became finally unusable with the CONFIG_BLOCK addition.
> 
> Remove it from the Kconfig list, and remove the __KERNEL__ checks.
> Move #include block up
> remove unused inclusion of linux/major.h
> 
> compile tested with ppc64_defconfig
> 
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

AFAICS the proper fix is to undo the CONFIG_BLOCK breakage, not make the 
header unusable.

	Jeff




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

* Re: [PATCH] remove genhd.h from header exports
  2007-08-07 19:01 ` Jeff Garzik
@ 2007-08-07 20:09   ` Olaf Hering
  0 siblings, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2007-08-07 20:09 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel, Andrew Morton

On Tue, Aug 07, Jeff Garzik wrote:

> AFAICS the proper fix is to undo the CONFIG_BLOCK breakage, not make the 
> header unusable.

No package uses linux/genhd.h, it is safe to remove it.

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

end of thread, other threads:[~2007-08-07 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 18:47 [PATCH] remove genhd.h from header exports Olaf Hering
2007-08-07 19:01 ` Jeff Garzik
2007-08-07 20:09   ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox