[PATCH] Including asm/segment.h is obsolete

From: NIIBE Yutaka (gniibe@chroot.org)
Date: Fri Jun 16 2000 - 04:37:20 EST


There's some places uselessly including <asm/segment.h>.

At least, following is not needed.

--- linux-2.4.0-test1-ac19/net/ipv4/ipconfig.c Tue May 16 09:51:31 2000
+++ linux/net/ipv4/ipconfig.c Fri Jun 16 18:22:08 2000
@@ -40,7 +40,6 @@
 #include <net/ip.h>
 #include <net/ipconfig.h>
 
-#include <asm/segment.h>
 #include <asm/uaccess.h>
 #include <asm/checksum.h>

I've found this for SuperH, which has no <asm/segment.h>.

Besides, here's the patch for NFS code. It's OK for x86 too.

Index: net/sunrpc/clnt.c
===================================================================
RCS file: /cvsroot/linuxsh/kernel/net/sunrpc/clnt.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 clnt.c
--- net/sunrpc/clnt.c 2000/04/14 17:36:00 1.1.1.2
+++ net/sunrpc/clnt.c 2000/05/14 08:13:14
@@ -22,7 +22,6 @@
  */
 
 #include <asm/system.h>
-#include <asm/segment.h>
 
 #include <linux/types.h>
 #include <linux/mm.h>
Index: fs/nfs/read.c
===================================================================
RCS file: /cvsroot/linuxsh/kernel/fs/nfs/read.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 read.c
--- fs/nfs/read.c 2000/05/08 18:55:50 1.1.1.4
+++ fs/nfs/read.c 2000/05/14 08:13:06
@@ -30,7 +30,6 @@
 #include <linux/nfs_flushd.h>
 #include <linux/smp_lock.h>
 
-#include <asm/segment.h>
 #include <asm/system.h>
 
 #define NFSDBG_FACILITY NFSDBG_PAGECACHE
Index: fs/nfs/proc.c
===================================================================
RCS file: /cvsroot/linuxsh/kernel/fs/nfs/proc.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 proc.c
--- fs/nfs/proc.c 2000/04/14 17:35:50 1.1.1.2
+++ fs/nfs/proc.c 2000/05/14 08:13:06
@@ -42,8 +42,6 @@
 #include <linux/nfs2.h>
 #include <linux/nfs_fs.h>
 
-#include <asm/segment.h>
-
 #define NFSDBG_FACILITY NFSDBG_PROC
 
 /*
Index: fs/nfs/nfs3proc.c
===================================================================
RCS file: /cvsroot/linuxsh/kernel/fs/nfs/nfs3proc.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 nfs3proc.c
--- fs/nfs/nfs3proc.c 2000/04/14 17:35:50 1.1.1.1
+++ fs/nfs/nfs3proc.c 2000/05/14 08:13:06
@@ -15,8 +15,6 @@
 #include <linux/nfs3.h>
 #include <linux/nfs_fs.h>
 
-#include <asm/segment.h>
-
 #define NFSDBG_FACILITY NFSDBG_PROC
 
 /*
Index: fs/nfs/file.c
===================================================================
RCS file: /cvsroot/linuxsh/kernel/fs/nfs/file.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 file.c
--- fs/nfs/file.c 2000/04/28 16:03:10 1.1.1.3
+++ fs/nfs/file.c 2000/05/14 08:13:06
@@ -30,7 +30,6 @@
 #include <linux/smp_lock.h>
 
 #include <asm/uaccess.h>
-#include <asm/segment.h>
 #include <asm/system.h>
 
 #define NFSDBG_FACILITY NFSDBG_FILE
Index: fs/nfs/dir.c
===================================================================
RCS file: /cvsroot/linuxsh/kernel/fs/nfs/dir.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 dir.c
--- fs/nfs/dir.c 2000/04/24 03:29:50 1.1.1.3
+++ fs/nfs/dir.c 2000/05/14 08:13:05
@@ -30,8 +30,6 @@
 #include <linux/nfs_mount.h>
 #include <linux/pagemap.h>
 
-#include <asm/segment.h> /* for fs functions */
-
 #define NFS_PARANOIA 1
 /* #define NFS_DEBUG_VERBOSE 1 */
 

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



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:11 EST