All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] remove genhd.h from header exports
Date: Tue, 7 Aug 2007 20:47:22 +0200	[thread overview]
Message-ID: <20070807184722.GA31015@aepfle.de> (raw)


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) { }

             reply	other threads:[~2007-08-07 18:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 18:47 Olaf Hering [this message]
2007-08-07 19:01 ` [PATCH] remove genhd.h from header exports Jeff Garzik
2007-08-07 20:09   ` Olaf Hering

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=20070807184722.GA31015@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.