linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Adrian Bunk <bunk@fs.tum.de>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.4-mm1: unknown symbols cauased by remove-more-KERNEL_SYSCALLS.patch
Date: Fri, 12 Mar 2004 10:14:40 +0100	[thread overview]
Message-ID: <200403121014.40889.arnd@arndb.de> (raw)
In-Reply-To: <20040311203108.GE14833@fs.tum.de>

On Thursday 11 March 2004 21:31, you wrote:
> This causes the following unknown symbols in modules on i386:

Sorry, that could not work. This patch reverts my changes to loadable
device drivers. As Arjan van de Ven already noted, they have to
be converted to request_firmware() anyway.

	Arnd <><

 drivers/media/dvb/frontends/alps_tdlb7.c |   12 ++++++++----
 drivers/media/dvb/frontends/sp887x.c     |   11 +++++++----
 drivers/media/dvb/frontends/tda1004x.c   |   10 ++++++----
 sound/isa/wavefront/wavefront_synth.c    |   12 ++++++------
 sound/oss/wavfront.c                     |   12 +++++++-----
 5 files changed, 34 insertions(+), 23 deletions(-)

diff -u -r linux-2.6.4-mm1/drivers/media/dvb/frontends/alps_tdlb7.c linux-2.6.4-mm1-patched/drivers/media/dvb/frontends/alps_tdlb7.c
--- linux-2.6.4-mm1/drivers/media/dvb/frontends/alps_tdlb7.c	2004-03-12 10:03:46.000000000 +0100
+++ linux-2.6.4-mm1-patched/drivers/media/dvb/frontends/alps_tdlb7.c	2004-03-12 10:07:51.000000000 +0100
@@ -29,6 +29,8 @@
 */  
 
 
+
+#define __KERNEL_SYSCALLS__
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/vmalloc.h>
@@ -56,6 +58,8 @@
 #define SP8870_FIRMWARE_OFFSET 0x0A
 
 
+static int errno;
+
 static struct dvb_frontend_info tdlb7_info = {
 	.name			= "Alps TDLB7",
 	.type			= FE_OFDM,
@@ -170,13 +174,13 @@
 	loff_t filesize;
 	char *dp;
 
-	fd = sys_open(fn, 0, 0);
+	fd = open(fn, 0, 0);
 	if (fd == -1) {
                 printk("%s: unable to open '%s'.\n", __FUNCTION__, fn);
 		return -EIO;
 	}
 
-	filesize = sys_lseek(fd, 0L, 2);
+	filesize = 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);
@@ -190,8 +194,8 @@
 		return -EIO;
 	}
 
-	sys_lseek(fd, SP8870_FIRMWARE_OFFSET, 0);
-	if (sys_read(fd, dp, SP8870_FIRMWARE_SIZE) != SP8870_FIRMWARE_SIZE) {
+	lseek(fd, SP8870_FIRMWARE_OFFSET, 0);
+	if (read(fd, dp, SP8870_FIRMWARE_SIZE) != SP8870_FIRMWARE_SIZE) {
 		printk("%s: failed to read '%s'.\n",__FUNCTION__, fn);
 		vfree(dp);
 		sys_close(fd);
diff -u -r linux-2.6.4-mm1/drivers/media/dvb/frontends/sp887x.c linux-2.6.4-mm1-patched/drivers/media/dvb/frontends/sp887x.c
--- linux-2.6.4-mm1/drivers/media/dvb/frontends/sp887x.c	2004-03-12 10:03:46.000000000 +0100
+++ linux-2.6.4-mm1-patched/drivers/media/dvb/frontends/sp887x.c	2004-03-12 10:07:51.000000000 +0100
@@ -12,6 +12,7 @@
    next 0x4000 loaded. This may change in future versions.
  */
 
+#define __KERNEL_SYSCALLS__
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/module.h>
@@ -67,6 +68,8 @@
 		FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_RECOVER
 };
 
+static int errno;
+
 static
 int i2c_writebytes (struct dvb_frontend *fe, u8 addr, u8 *buf, u8 len)
 {
@@ -213,13 +216,13 @@
 
 	// Load the firmware
 	set_fs(get_ds());
-	fd = sys_open(sp887x_firmware, 0, 0);
+	fd = open(sp887x_firmware, 0, 0);
 	if (fd < 0) {
 		printk(KERN_WARNING "%s: Unable to open firmware %s\n", __FUNCTION__,
 		       sp887x_firmware);
 		return -EIO;
 	}
-	filesize = sys_lseek(fd, 0L, 2);
+	filesize = lseek(fd, 0L, 2);
 	if (filesize <= 0) {
 		printk(KERN_WARNING "%s: Firmware %s is empty\n", __FUNCTION__,
 		       sp887x_firmware);
@@ -241,8 +244,8 @@
 	// read it!
 	// read the first 16384 bytes from the file
 	// ignore the first 10 bytes
-	sys_lseek(fd, 10, 0);
-	if (sys_read(fd, firmware, fw_size) != fw_size) {
+	lseek(fd, 10, 0);
+	if (read(fd, firmware, fw_size) != fw_size) {
 		printk(KERN_WARNING "%s: Failed to read firmware\n", __FUNCTION__);
 		vfree(firmware);
 		sys_close(fd);
diff -u -r linux-2.6.4-mm1/drivers/media/dvb/frontends/tda1004x.c linux-2.6.4-mm1-patched/drivers/media/dvb/frontends/tda1004x.c
--- linux-2.6.4-mm1/drivers/media/dvb/frontends/tda1004x.c	2004-03-12 10:03:46.000000000 +0100
+++ linux-2.6.4-mm1-patched/drivers/media/dvb/frontends/tda1004x.c	2004-03-12 10:07:51.000000000 +0100
@@ -32,6 +32,7 @@
  */
 
 
+#define __KERNEL_SYSCALLS__
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/module.h>
@@ -40,6 +41,7 @@
 #include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/fs.h>
+#include <linux/unistd.h>
 #include <linux/fcntl.h>
 #include <linux/errno.h>
 #include "dvb_frontend.h"
@@ -397,13 +399,13 @@
 
 	// Load the firmware
 	set_fs(get_ds());
-	fd = sys_open(tda1004x_firmware, 0, 0);
+	fd = open(tda1004x_firmware, 0, 0);
 	if (fd < 0) {
 		printk("%s: Unable to open firmware %s\n", __FUNCTION__,
 		       tda1004x_firmware);
 		return -EIO;
 	}
-	filesize = sys_lseek(fd, 0L, 2);
+	filesize = lseek(fd, 0L, 2);
 	if (filesize <= 0) {
 		printk("%s: Firmware %s is empty\n", __FUNCTION__,
 		       tda1004x_firmware);
@@ -434,8 +436,8 @@
 	}
 
 	// read it!
-        sys_lseek(fd, fw_offset, 0);
-	if (sys_read(fd, firmware, fw_size) != fw_size) {
+        lseek(fd, fw_offset, 0);
+	if (read(fd, firmware, fw_size) != fw_size) {
 		printk("%s: Failed to read firmware\n", __FUNCTION__);
 		vfree(firmware);
 		sys_close(fd);
diff -u -r linux-2.6.4-mm1/sound/isa/wavefront/wavefront_synth.c linux-2.6.4-mm1-patched/sound/isa/wavefront/wavefront_synth.c
--- linux-2.6.4-mm1/sound/isa/wavefront/wavefront_synth.c	2004-03-12 10:03:50.000000000 +0100
+++ linux-2.6.4-mm1-patched/sound/isa/wavefront/wavefront_synth.c	2004-03-12 10:07:51.000000000 +0100
@@ -1913,11 +1913,11 @@
 	return (1);
 }
 
+#define __KERNEL_SYSCALLS__
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/unistd.h>
-#include <linux/syscalls.h>
 #include <asm/uaccess.h>
 
 static int errno;
@@ -1947,7 +1947,7 @@
 	fs = get_fs();
 	set_fs (get_ds());
 
-	if ((fd = sys_open (path, 0, 0)) < 0) {
+	if ((fd = open (path, 0, 0)) < 0) {
 		snd_printk ("Unable to load \"%s\".\n",
 			path);
 		return 1;
@@ -1956,7 +1956,7 @@
 	while (1) {
 		int x;
 
-		if ((x = sys_read (fd, &section_length, sizeof (section_length))) !=
+		if ((x = read (fd, &section_length, sizeof (section_length))) !=
 		    sizeof (section_length)) {
 			snd_printk ("firmware read error.\n");
 			goto failure;
@@ -1966,7 +1966,7 @@
 			break;
 		}
 
-		if (sys_read (fd, section, section_length) != section_length) {
+		if (read (fd, section, section_length) != section_length) {
 			snd_printk ("firmware section "
 				"read error.\n");
 			goto failure;
@@ -2005,12 +2005,12 @@
 
 	}
 
-	sys_close (fd);
+	close (fd);
 	set_fs (fs);
 	return 0;
 
  failure:
-	sys_close (fd);
+	close (fd);
 	set_fs (fs);
 	snd_printk ("firmware download failed!!!\n");
 	return 1;
diff -u -r linux-2.6.4-mm1/sound/oss/wavfront.c linux-2.6.4-mm1-patched/sound/oss/wavfront.c
--- linux-2.6.4-mm1/sound/oss/wavfront.c	2004-03-12 10:03:50.000000000 +0100
+++ linux-2.6.4-mm1-patched/sound/oss/wavfront.c	2004-03-12 10:07:51.000000000 +0100
@@ -2490,9 +2490,11 @@
 }
 
 #include "os.h"
+#define __KERNEL_SYSCALLS__
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/slab.h>
+#include <linux/unistd.h>
 #include <asm/uaccess.h>
 
 static int errno; 
@@ -2522,7 +2524,7 @@
 	fs = get_fs();
 	set_fs (get_ds());
 
-	if ((fd = sys_open (path, 0, 0)) < 0) {
+	if ((fd = open (path, 0, 0)) < 0) {
 		printk (KERN_WARNING LOGNAME "Unable to load \"%s\".\n",
 			path);
 		return 1;
@@ -2531,7 +2533,7 @@
 	while (1) {
 		int x;
 
-		if ((x = sys_read (fd, &section_length, sizeof (section_length))) !=
+		if ((x = read (fd, &section_length, sizeof (section_length))) !=
 		    sizeof (section_length)) {
 			printk (KERN_ERR LOGNAME "firmware read error.\n");
 			goto failure;
@@ -2541,7 +2543,7 @@
 			break;
 		}
 
-		if (sys_read (fd, section, section_length) != section_length) {
+		if (read (fd, section, section_length) != section_length) {
 			printk (KERN_ERR LOGNAME "firmware section "
 				"read error.\n");
 			goto failure;
@@ -2580,12 +2582,12 @@
 
 	}
 
-	sys_close (fd);
+	close (fd);
 	set_fs (fs);
 	return 0;
 
  failure:
-	sys_close (fd);
+	close (fd);
 	set_fs (fs);
 	printk (KERN_ERR "\nWaveFront: firmware download failed!!!\n");
 	return 1;

  reply	other threads:[~2004-03-12  9:23 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-11  7:31 2.6.4-mm1 Andrew Morton
2004-03-11  8:26 ` 2.6.4-mm1 Jens Axboe
2004-03-11  8:30 ` 2.6.4-mm1 Andrew Morton
2004-03-11  9:34   ` 2.6.4-mm1 Matthias Urlichs
2004-03-11  9:17 ` 2.6.4-mm1 Mickael Marchand
2004-03-11 11:06   ` 2.6.4-mm1 Andrew Morton
2004-03-11 11:22     ` 2.6.4-mm1 Anton Blanchard
2004-03-11 12:23     ` 2.6.4-mm1 Mickael Marchand
2004-03-11 13:40 ` 2.6.4-mm1 jlnance
2004-03-11 19:25   ` 2.6.4-mm1 Mike Fedyk
2004-03-11 22:22   ` 2.6.4-mm1 Andrew Morton
2004-03-11 13:49 ` 2.6.4-mm1 Anton Blanchard
2004-03-11 23:29   ` 2.6.4-mm1 Nick Piggin
2004-03-12  2:03     ` 2.6.4-mm1 Nick Piggin
2004-03-12  2:12       ` 2.6.4-mm1 Anton Blanchard
2004-03-12  5:11       ` 2.6.4-mm1 Anton Blanchard
2004-03-11 13:52 ` 2.6.4-mm1 Anton Blanchard
2004-03-11 15:23 ` 2.6.4-mm1 William Lee Irwin III
2004-03-11 15:54   ` 2.6.4-mm1 William Lee Irwin III
2004-03-11 17:06 ` 2.6.4-mm1 Redeeman
2004-03-11 17:53   ` 2.6.4-mm1 Norberto Bensa
2004-03-11 18:09     ` 2.6.4-mm1 Andrew Morton
2004-03-11 18:14       ` 2.6.4-mm1 Redeeman
2004-03-11 18:46         ` 2.6.4-mm1 Andrew Morton
2004-03-11 20:58           ` 2.6.4-mm1 Redeeman
2004-03-11 21:10             ` 2.6.4-mm1 Redeeman
2004-03-11 18:22       ` 2.6.4-mm1 Norberto Bensa
2004-03-11 20:29   ` 2.6.4-mm1 Felipe Alfaro Solana
2004-03-11 17:56 ` 2.6.4-mm1 boot Richard A Nelson
2004-03-12 20:08   ` swsusp (Re: 2.6.4-mm1 boot) Pavel Machek
2004-03-11 20:23 ` 2.6.4-mm1: modular quota needs unknown symbol Adrian Bunk
2004-03-12  8:51   ` Marc-Christian Petersen
2004-03-15 11:02     ` Jan Kara
2004-03-11 20:31 ` 2.6.4-mm1: unknown symbols cauased by remove-more-KERNEL_SYSCALLS.patch Adrian Bunk
2004-03-12  9:14   ` Arnd Bergmann [this message]
2004-03-12  9:29     ` Andrew Morton
2004-03-12  9:35       ` Arnd Bergmann
2004-03-12  9:48         ` Andrew Morton
2004-03-12 10:08           ` Dave Jones
2004-03-13 20:25             ` Francois Romieu
2004-03-12 10:11           ` Arjan van de Ven
2004-03-12 19:42             ` 2.6.4-mm1: unknown symbols cauased byremove-more-KERNEL_SYSCALLS.patch Adrian Bunk
2004-03-12 19:45               ` Arjan van de Ven
2004-03-12  1:03 ` 2.6.4-mm1 Neil Brown
2004-03-12  1:22   ` 2.6.4-mm1 Andrew Morton
2004-03-12  5:48     ` 2.6.4-mm1 Neil Brown
2004-03-12  7:50       ` 2.6.4-mm1 Andrew Morton
2004-03-13 10:25         ` 2.6.4-mm1 Neil Brown
2004-03-15  1:46           ` 2.6.4-mm1 - 4g patch breaks when X86_4G not selected Neil Brown
2004-03-15  8:09             ` Ingo Molnar
2004-03-15 22:19               ` Zwane Mwaikambo
2004-03-15 22:41                 ` Andrew Morton
2004-03-15  9:19             ` Ingo Molnar
2004-03-16  1:35               ` Neil Brown
2004-03-16  4:52                 ` Andrew Morton
2004-03-16  5:03                   ` Neil Brown
2004-03-16  7:23                   ` Ingo Molnar
2004-03-16  7:28                     ` Andrew Morton
2004-03-16  7:24                   ` Ingo Molnar
2004-04-04  9:07                   ` [PATCH][2.6-mm] setup_identity_mappings depends on zone init Zwane Mwaikambo
2004-04-04  9:27                     ` William Lee Irwin III
2004-03-12  9:04 ` 2.6.4-mm1 Helge Hafting

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=200403121014.40889.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@osdl.org \
    --cc=bunk@fs.tum.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).