public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, Jeff Dike <jdike@addtoit.com>,
	Bjoern Steinbrink <B.Steinbrink@gmx.de>,
	Arjan van de Ven <arjan@infradead.org>,
	Chase Venters <chase.venters@clientec.com>,
	Andrew Morton <akpm@osdl.org>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	rusty@rustcorp.com.au
Subject: [PATCH 7/7] remove the global errno from the kernel
Date: Sun, 27 Aug 2006 23:47:41 +0200	[thread overview]
Message-ID: <20060827215637.781868000@klappe.arndb.de> (raw)
In-Reply-To: 20060827214734.252316000@klappe.arndb.de

[-- Attachment #1: kernel_execve3.diff --]
[-- Type: text/plain, Size: 3891 bytes --]

The last in-kernel user of errno is gone, so we should
remove the definition and everything referring to it.
This also removes the now-unused lib/execve.c file
that was introduced earlier.

Also remove a few bogus definitions of __KERNEL_SYSCALLS__
that were already unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Index: linux-cg/lib/Makefile
===================================================================
--- linux-cg.orig/lib/Makefile	2006-08-27 23:44:35.000000000 +0200
+++ linux-cg/lib/Makefile	2006-08-27 23:44:38.000000000 +0200
@@ -2,7 +2,7 @@
 # Makefile for some libs needed in the kernel.
 #
 
-lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
+lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
 	 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \
 	 sha1.o
Index: linux-cg/lib/execve.c
===================================================================
--- linux-cg.orig/lib/execve.c	2006-08-27 23:44:35.000000000 +0200
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-#include <asm/bug.h>
-#include <asm/uaccess.h>
-
-#define __KERNEL_SYSCALLS__
-static int errno __attribute__((unused));
-#include <asm/unistd.h>
-
-#ifdef _syscall3
-int kernel_execve (const char *filename, char *const argv[], char *const envp[])
-								__attribute__((__weak__));
-int kernel_execve (const char *filename, char *const argv[], char *const envp[])
-{
-	mm_segment_t fs = get_fs();
-	int ret;
-
-	WARN_ON(segment_eq(fs, USER_DS));
-	ret = execve(filename, (char **)argv, (char **)envp);
-	if (ret)
-		ret = -errno;
-
-	return ret;
-}
-#endif
Index: linux-cg/include/linux/unistd.h
===================================================================
--- linux-cg.orig/include/linux/unistd.h	2006-08-27 23:41:34.000000000 +0200
+++ linux-cg/include/linux/unistd.h	2006-08-27 23:44:38.000000000 +0200
@@ -1,12 +1,8 @@
 #ifndef _LINUX_UNISTD_H_
 #define _LINUX_UNISTD_H_
 
-#ifdef __KERNEL__
-extern int errno;
-#endif
-
 /*
- * Include machine specific syscallX macros
+ * Include machine specific syscall numbers
  */
 #include <asm/unistd.h>
 
Index: linux-cg/lib/errno.c
===================================================================
--- linux-cg.orig/lib/errno.c	2006-08-27 23:41:34.000000000 +0200
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,7 +0,0 @@
-/*
- *  linux/lib/errno.c
- *
- *  Copyright (C) 1991, 1992  Linus Torvalds
- */
-
-int errno;
Index: linux-cg/arch/ia64/kernel/process.c
===================================================================
--- linux-cg.orig/arch/ia64/kernel/process.c	2006-08-27 23:44:53.000000000 +0200
+++ linux-cg/arch/ia64/kernel/process.c	2006-08-27 23:44:54.000000000 +0200
@@ -8,8 +8,6 @@
  * 2005-10-07 Keith Owens <kaos@sgi.com>
  *	      Add notify_die() hooks.
  */
-#define __KERNEL_SYSCALLS__	/* see <asm/unistd.h> */
-
 #include <linux/cpu.h>
 #include <linux/pm.h>
 #include <linux/elf.h>
Index: linux-cg/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
===================================================================
--- linux-cg.orig/drivers/media/dvb/dvb-core/dvb_ringbuffer.c	2006-08-27 23:44:53.000000000 +0200
+++ linux-cg/drivers/media/dvb/dvb-core/dvb_ringbuffer.c	2006-08-27 23:44:54.000000000 +0200
@@ -26,7 +26,6 @@
 
 
 
-#define __KERNEL_SYSCALLS__
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
Index: linux-cg/drivers/net/wireless/ipw2100.c
===================================================================
--- linux-cg.orig/drivers/net/wireless/ipw2100.c	2006-08-27 23:44:53.000000000 +0200
+++ linux-cg/drivers/net/wireless/ipw2100.c	2006-08-27 23:44:54.000000000 +0200
@@ -150,7 +150,6 @@
 #include <linux/skbuff.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
-#define __KERNEL_SYSCALLS__
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/slab.h>

--


  parent reply	other threads:[~2006-08-27 23:59 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-27 21:47 [PATCH 0/7] kill __KERNEL_SYSCALLS__ Arnd Bergmann
2006-08-27 21:47 ` [PATCH 2/7] rename the provided execve functions to kernel_execve Arnd Bergmann
2006-08-28  2:20   ` Randy.Dunlap
2006-08-28  7:44     ` Arnd Bergmann
2006-08-27 21:47 ` [PATCH 3/7] provide kernel_execve on all architectures Arnd Bergmann
2006-08-29  2:22   ` Ralf Baechle
2006-08-29 17:21   ` David Howells
2006-08-27 21:47 ` [PATCH 4/7] Remove the use of _syscallX macros in UML Arnd Bergmann
2006-08-28  9:25   ` Andreas Schwab
2006-08-30  5:41   ` H. Peter Anvin
2006-08-30 12:38     ` Arnd Bergmann
2006-08-27 21:47 ` [PATCH 6/7] remove all remaining _syscallX macros Arnd Bergmann
2006-08-28  7:35   ` Andi Kleen
2006-08-28  7:41     ` Arnd Bergmann
2006-08-28  7:46       ` Arjan van de Ven
2006-08-28  8:09         ` Arnd Bergmann
2006-08-28  7:50       ` Andi Kleen
2006-08-28  8:01         ` Arnd Bergmann
2006-08-28  8:03           ` Andi Kleen
2006-08-28  8:09             ` David Miller
2006-08-28  8:15               ` Andi Kleen
2006-08-28  8:19                 ` David Miller
2006-08-28  8:28                   ` Andi Kleen
2006-08-28  8:40                     ` David Woodhouse
2006-08-28  8:53                       ` Andi Kleen
2006-08-28 10:00                         ` David Woodhouse
2006-08-28 10:37                           ` Arjan van de Ven
2006-08-28 10:58                             ` Andi Kleen
2006-08-28 14:05                           ` Arnd Bergmann
2006-08-28 14:42                             ` Andi Kleen
2006-08-28 15:46                               ` Adrian Bunk
2006-08-28 17:00                                 ` Andi Kleen
2006-08-30 17:45                                   ` Adrian Bunk
2006-08-28 20:20                               ` Horst H. von Brand
2006-08-28 21:23                                 ` Arnd Bergmann
2006-08-30  5:44                               ` H. Peter Anvin
2006-08-30  7:22                                 ` Andi Kleen
2006-08-27 21:47 ` Arnd Bergmann [this message]
2006-08-29 17:23   ` [PATCH 7/7] remove the global errno from the kernel David Howells
2006-08-27 22:00 ` [PATCH 5/7] sh64: remove the use of kernel syscalls Arnd Bergmann
2006-08-28  8:05   ` Paul Mundt
2006-08-27 22:01 ` [PATCH 1/7] introduce kernel_execve Arnd Bergmann
2006-08-29  9:12 ` [PATCH 0/7] kill __KERNEL_SYSCALLS__ David Howells
2006-08-29  9:37   ` Arnd Bergmann
2006-08-29  9:38   ` Haavard Skinnemoen

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=20060827215637.781868000@klappe.arndb.de \
    --to=arnd@arndb.de \
    --cc=B.Steinbrink@gmx.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=chase.venters@clientec.com \
    --cc=jdike@addtoit.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox