public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Adrian Bunk <bunk@fs.tum.de>
Cc: "Kenneth Aafløy" <lists@kenneth.aafloy.net>,
	"Andrew Morton" <akpm@osdl.org>, "Andi Kleen" <ak@muc.de>,
	linux-kernel@vger.kernel.org, hunold@linuxtv.org
Subject: Re: 2.6.8-rc2-mm1: DVB: "errno" undefined
Date: Fri, 30 Jul 2004 16:30:17 +0200	[thread overview]
Message-ID: <200407301630.20864.arnd@arndb.de> (raw)
In-Reply-To: <20040729232427.GK23589@fs.tum.de>

[-- Attachment #1: Type: text/plain, Size: 6617 bytes --]

On Freitag, 30. Juli 2004 01:24, Adrian Bunk <bunk@fs.tum.de> wrote:

> The removal of errno from this three drivers is currently only in -mm.
> 
> So unless someone forwards them (they were sent by Andi Kleen as gcc 3.5 
> build fixes, but he apparently didn't test a modular build) to Linus 
> which hopefully won't happen before the affected modules are properly 
> fixed, Linus' tree isn't affected.

Actually, the problem has its origin in my removal of all in-kernel
syscalls (except execve, which is non-trivial) earlier this year.
This change was blindly reverted by the maintainer, while at the same
time the local errno variable was removed. See also
http://linux.bkbits.net:8080/linux-2.5/hist/drivers/media/dvb/frontends/tda1004x.c

This patch is the one that was already merged earlier. I'm now also
removing the definitions for the kernel syscalls on i386 to make it
harder to reintroduce them again. This was already done for ppc64,
the others should probably follow.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

 drivers/media/dvb/frontends/alps_tdlb7.c |   10 ++++------
 drivers/media/dvb/frontends/sp887x.c     |    9 ++++-----
 drivers/media/dvb/frontends/tda1004x.c   |   10 ++++------
 drivers/net/wireless/prism54/isl_38xx.c  |    2 --
 include/asm-i386/unistd.h                |    8 --------
 5 files changed, 12 insertions(+), 27 deletions(-)

===== drivers/media/dvb/frontends/alps_tdlb7.c 1.14 vs edited =====
--- 1.14/drivers/media/dvb/frontends/alps_tdlb7.c	Wed Jul 14 02:09:53 2004
+++ edited/drivers/media/dvb/frontends/alps_tdlb7.c	Fri Jul 30 16:00:28 2004
@@ -28,8 +28,6 @@
     
 */  
 
-
-#define __KERNEL_SYSCALLS__
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/vmalloc.h>
@@ -148,13 +146,13 @@
 	loff_t filesize;
 	char *dp;
 
-	fd = open(fn, 0, 0);
+	fd = sys_open(fn, 0, 0);
 	if (fd == -1) {
                 printk("%s: unable to open '%s'.\n", __FUNCTION__, fn);
 		return -EIO;
 	}
 
-	filesize = lseek(fd, 0L, 2);
+	filesize = sys_lseek(fd, 0L, 2);
 	if (filesize <= 0 || filesize < SP8870_FIRMWARE_OFFSET + SP8870_FIRMWARE_SIZE) {
 	        printk("%s: firmware filesize to small '%s'\n", __FUNCTION__, fn);
 		sys_close(fd);
@@ -168,8 +166,8 @@
 		return -EIO;
 	}
 
-	lseek(fd, SP8870_FIRMWARE_OFFSET, 0);
-	if (read(fd, dp, SP8870_FIRMWARE_SIZE) != SP8870_FIRMWARE_SIZE) {
+	sys_lseek(fd, SP8870_FIRMWARE_OFFSET, 0);
+	if (sys_read(fd, dp, SP8870_FIRMWARE_SIZE) != SP8870_FIRMWARE_SIZE) {
 		printk("%s: failed to read '%s'.\n",__FUNCTION__, fn);
 		vfree(dp);
 		sys_close(fd);
===== drivers/media/dvb/frontends/sp887x.c 1.12 vs edited =====
--- 1.12/drivers/media/dvb/frontends/sp887x.c	Wed Jul 14 02:09:55 2004
+++ edited/drivers/media/dvb/frontends/sp887x.c	Fri Jul 30 16:00:28 2004
@@ -12,7 +12,6 @@
    next 0x4000 loaded. This may change in future versions.
  */
 
-#define __KERNEL_SYSCALLS__
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/module.h>
@@ -209,13 +208,13 @@
 
 	// Load the firmware
 	set_fs(get_ds());
-	fd = open(sp887x_firmware, 0, 0);
+	fd = sys_open(sp887x_firmware, 0, 0);
 	if (fd < 0) {
 		printk(KERN_WARNING "%s: Unable to open firmware %s\n", __FUNCTION__,
 		       sp887x_firmware);
 		return -EIO;
 	}
-	filesize = lseek(fd, 0L, 2);
+	filesize = sys_lseek(fd, 0L, 2);
 	if (filesize <= 0) {
 		printk(KERN_WARNING "%s: Firmware %s is empty\n", __FUNCTION__,
 		       sp887x_firmware);
@@ -237,8 +236,8 @@
 	// read it!
 	// read the first 16384 bytes from the file
 	// ignore the first 10 bytes
-	lseek(fd, 10, 0);
-	if (read(fd, firmware, fw_size) != fw_size) {
+	sys_lseek(fd, 10, 0);
+	if (sys_read(fd, firmware, fw_size) != fw_size) {
 		printk(KERN_WARNING "%s: Failed to read firmware\n", __FUNCTION__);
 		vfree(firmware);
 		sys_close(fd);
===== drivers/media/dvb/frontends/tda1004x.c 1.14 vs edited =====
--- 1.14/drivers/media/dvb/frontends/tda1004x.c	Wed Jul 14 02:09:55 2004
+++ edited/drivers/media/dvb/frontends/tda1004x.c	Fri Jul 30 16:02:15 2004
@@ -32,7 +32,6 @@
  */
 
 
-#define __KERNEL_SYSCALLS__
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/module.h>
@@ -40,7 +39,6 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
-#include <linux/unistd.h>
 #include <linux/fcntl.h>
 #include <linux/errno.h>
 #include <linux/syscalls.h>
@@ -397,13 +395,13 @@
 
 	// Load the firmware
 	set_fs(get_ds());
-	fd = open(tda1004x_firmware, 0, 0);
+	fd = sys_open(tda1004x_firmware, 0, 0);
 	if (fd < 0) {
 		printk("%s: Unable to open firmware %s\n", __FUNCTION__,
 		       tda1004x_firmware);
 		return -EIO;
 	}
-	filesize = lseek(fd, 0L, 2);
+	filesize = sys_lseek(fd, 0L, 2);
 	if (filesize <= 0) {
 		printk("%s: Firmware %s is empty\n", __FUNCTION__,
 		       tda1004x_firmware);
@@ -434,8 +432,8 @@
 	}
 
 	// read it!
-	lseek(fd, fw_offset, 0);
-	if (read(fd, firmware, fw_size) != fw_size) {
+	sys_lseek(fd, fw_offset, 0);
+	if (sys_read(fd, firmware, fw_size) != fw_size) {
 		printk("%s: Failed to read firmware\n", __FUNCTION__);
 		vfree(firmware);
 		sys_close(fd);
===== drivers/net/wireless/prism54/isl_38xx.c 1.3 vs edited =====
--- 1.3/drivers/net/wireless/prism54/isl_38xx.c	Sat Jun  5 13:45:32 2004
+++ edited/drivers/net/wireless/prism54/isl_38xx.c	Fri Jul 30 16:06:25 2004
@@ -18,8 +18,6 @@
  *
  */
 
-#define __KERNEL_SYSCALLS__
-
 #include <linux/version.h>
 #include <linux/module.h>
 #include <linux/types.h>
===== include/asm-i386/unistd.h 1.39 vs edited =====
--- 1.39/include/asm-i386/unistd.h	Wed Jul 14 02:09:34 2004
+++ edited/include/asm-i386/unistd.h	Fri Jul 30 16:07:06 2004
@@ -431,15 +431,7 @@
  * won't be any messing with the stack from main(), but we define
  * some others too.
  */
-static inline _syscall0(pid_t,setsid)
-static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
-static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
-static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
-static inline _syscall1(int,dup,int,fd)
 static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
-static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
-static inline _syscall1(int,close,int,fd)
-static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
 
 asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount);
 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-07-30 14:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28  9:04 2.6.8-rc2-mm1 Andrew Morton
2004-07-28 16:36 ` 2.6.8-rc2-mm1 Jesse Barnes
2004-07-28 17:08 ` 2.6.8-rc2-mm1 (compile stats) John Cherry
2004-07-28 19:37 ` 2.6.8-rc2-mm1 Peter Osterlund
2004-07-28 22:24 ` 2.6.8-rc2-mm1 Johannes Stezenbach
2004-07-28 22:44   ` 2.6.8-rc2-mm1 viro
2004-07-28 23:24     ` 2.6.8-rc2-mm1 Johannes Stezenbach
2004-07-28 23:34       ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-29  0:08         ` 2.6.8-rc2-mm1 Johannes Stezenbach
2004-07-29  6:42           ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-29 19:35       ` 2.6.8-rc2-mm1 Michael Hunold
2004-07-29 21:02         ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-28 22:49 ` 2.6.8-rc2-mm1 Adam Kropelin
2004-07-28 23:20   ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-28 23:13 ` 2.6.8-rc2-mm1 Paul Jackson
2004-07-29 14:36 ` 2.6.8-rc2-mm1 Adrian Bunk
2004-07-29 19:36   ` 2.6.8-rc2-mm1 David Woodhouse
2004-07-29 14:41 ` 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95 Adrian Bunk
2004-07-29 15:54   ` Jan-Benedict Glaw
2004-07-29 20:42     ` [patch] " Adrian Bunk
     [not found]       ` <Pine.LNX.4.60.0407292249120.25661@hermes-1.csi.cam.ac.uk>
2004-07-29 23:18         ` Adrian Bunk
2004-07-29 21:27 ` 2.6.8-rc2-mm1: DVB: "errno" undefined Adrian Bunk
2004-07-29 22:44   ` Kenneth Aafløy
2004-07-29 23:24     ` Adrian Bunk
2004-07-30 14:30       ` Arnd Bergmann [this message]
2004-07-31 10:09 ` 2.6.8-rc2-mm1 breaks PPPoE for me (was: 2.6.8-rc2-mm1) Matthias Andree
2004-07-31 16:39 ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-07-31 18:47   ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-31 19:54     ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-07-31 20:09       ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-07-31 20:21         ` 2.6.8-rc2-mm1 Andrew Morton
2004-08-01  4:21           ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-08-01 11:16           ` 2.6.8-rc2-mm1 Ingo Molnar
2004-08-01 11:05     ` 2.6.8-rc2-mm1 Ingo Molnar
2004-08-01  2:36 ` 2.6.8-rc2-mm1 William Lee Irwin III
2004-08-01  8:05   ` 2.6.8-rc2-mm1 Andrew Morton
2004-08-01 12:33     ` 2.6.8-rc2-mm1 William Lee Irwin III
2004-08-01 21:11       ` 2.6.8-rc2-mm1 Sam Ravnborg
2004-08-01 23:57         ` 2.6.8-rc2-mm1 William Lee Irwin III
2004-08-03 20:46           ` 2.6.8-rc2-mm1 Sam Ravnborg

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=200407301630.20864.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=bunk@fs.tum.de \
    --cc=hunold@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@kenneth.aafloy.net \
    /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