From: Arjan van de Ven <arjanv@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, Dave Jones <davej@redhat.com>
Subject: Re: [PATCH] further __KERNEL_SYSCALLS__ removal
Date: Fri, 27 Feb 2004 19:00:55 +0100 [thread overview]
Message-ID: <1077904855.10066.2.camel@laptop.fenrus.com> (raw)
In-Reply-To: <200402271835.48649.arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 4932 bytes --]
On Fri, 2004-02-27 at 18:35, Arnd Bergmann wrote:
> ===== drivers/media/dvb/frontends/alps_tdlb7.c 1.8 vs edited =====
> --- 1.8/drivers/media/dvb/frontends/alps_tdlb7.c Thu Feb 26 03:09:55 2004
> +++ edited/drivers/media/dvb/frontends/alps_tdlb7.c Thu Feb 26 23:57:05 2004
> @@ -29,8 +29,6 @@
> */
>
>
> -
> -#define __KERNEL_SYSCALLS__
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/vmalloc.h>
> @@ -58,8 +56,6 @@
> #define SP8870_FIRMWARE_OFFSET 0x0A
>
>
> -static int errno;
> -
> static struct dvb_frontend_info tdlb7_info = {
> .name = "Alps TDLB7",
> .type = FE_OFDM,
> @@ -174,13 +170,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);
> @@ -194,8 +190,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);
this is the wrong way to "fix" this; might as well leave this driver as
is until it is fixed to use request_firmware()
> ===== drivers/media/dvb/frontends/sp887x.c 1.6 vs edited =====
> --- 1.6/drivers/media/dvb/frontends/sp887x.c Thu Feb 26 03:09:55 2004
> +++ edited/drivers/media/dvb/frontends/sp887x.c Thu Feb 26 23:57:05 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>
> @@ -68,8 +67,6 @@
> 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)
> {
> @@ -216,13 +213,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);
same here
> 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);
same here
> ===== sound/isa/wavefront/wavefront_synth.c 1.13 vs edited =====
> --- 1.13/sound/isa/wavefront/wavefront_synth.c Tue Feb 25 19:44:25 2003
> +++ edited/sound/isa/wavefront/wavefront_synth.c Thu Feb 26 23:57:05 2004
> @@ -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 = open (path, 0, 0)) < 0) {
> + if ((fd = sys_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 = read (fd, §ion_length, sizeof (section_length))) !=
> + if ((x = sys_read (fd, §ion_length, sizeof (section_length))) !=
> sizeof (section_length)) {
> snd_printk ("firmware read error.\n");
> goto failure;
same here
> ===== sound/oss/wavfront.c 1.15 vs edited =====
> --- 1.15/sound/oss/wavfront.c Mon Apr 21 09:32:53 2003
> +++ edited/sound/oss/wavfront.c Thu Feb 26 23:57:05 2004
> @@ -2489,11 +2489,9 @@
> }
>
> #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;
> @@ -2523,7 +2521,7 @@
> fs = get_fs();
> set_fs (get_ds());
>
> - if ((fd = open (path, 0, 0)) < 0) {
> + if ((fd = sys_open (path, 0, 0)) < 0) {
> printk (KERN_WARNING LOGNAME "Unable to load \"%s\".\n",
> path);
> return 1;
and here
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-02-27 18:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 17:35 Arnd Bergmann
2004-02-27 18:00 ` Arjan van de Ven [this message]
2004-02-27 18:57 ` Arnd Bergmann
2004-02-28 22:39 ` Johannes Stezenbach
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=1077904855.10066.2.camel@laptop.fenrus.com \
--to=arjanv@redhat.com \
--cc=arnd@arndb.de \
--cc=davej@redhat.com \
--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
all inboxes | Powered by JetHome®