From: "David S. Miller" <davem@redhat.com>
To: perex@perex.cz
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: ALSA update
Date: Tue, 15 Oct 2002 10:08:11 -0700 (PDT) [thread overview]
Message-ID: <20021015.100811.118915540.davem@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0210150013540.503-100000@pnote.perex-int.cz>
From: Jaroslav Kysela <perex@perex.cz>
Date: Tue, 15 Oct 2002 00:43:53 +0200 (CEST)
Oops. Missing two backslashes. It should be corrected with this patch
(already in linux-sound BK repository):
That's just the tip of the iceberg.
It fails again soon after that, none of the ioctl32.c/pcm32.c
changes were even _compile_ tested.
Try this instead:
--- ./sound/core/ioctl32/pcm32.c.~1~ Mon Oct 14 13:09:55 2002
+++ ./sound/core/ioctl32/pcm32.c Mon Oct 14 13:12:38 2002
@@ -20,6 +20,7 @@
#include <sound/driver.h>
#include <linux/time.h>
+#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include "ioctl32.h"
@@ -230,7 +231,7 @@ static int _snd_ioctl32_xfern(unsigned i
snd_pcm_file_t *pcm_file;
snd_pcm_substream_t *substream;
struct sndrv_xfern32 data32, *srcptr = (struct sndrv_xfern32*)arg;
- void *bufs = NULL;
+ void **bufs = NULL;
int err = 0, ch, i;
u32 *bufptr;
mm_segment_t oldseg;
@@ -260,7 +261,7 @@ static int _snd_ioctl32_xfern(unsigned i
return -EFAULT;
__get_user(data32.bufs, &srcptr->bufs);
bufptr = (u32*)TO_PTR(data32.bufs);
- bufs = kmalloc(sizeof(void *) * 128, GFP_KERNEL)
+ bufs = kmalloc(sizeof(void *) * 128, GFP_KERNEL);
if (bufs == NULL)
return -ENOMEM;
for (i = 0; i < ch; i++) {
@@ -352,8 +353,8 @@ static int _snd_ioctl32_pcm_hw_params_ol
mm_segment_t oldseg;
int err;
- data32 = kcalloc(sizeof(*data32), GFP_KERNEL);
- data = kcalloc(sizeof(*data), GFP_KERNEL);
+ data32 = snd_kcalloc(sizeof(*data32), GFP_KERNEL);
+ data = snd_kcalloc(sizeof(*data), GFP_KERNEL);
if (data32 == NULL || data == NULL) {
err = -ENOMEM;
goto __end;
--- ./sound/core/ioctl32/ioctl32.h.~1~ Mon Oct 14 13:01:25 2002
+++ ./sound/core/ioctl32/ioctl32.h Mon Oct 14 13:12:01 2002
@@ -86,16 +86,16 @@ static int _snd_ioctl32_##type(unsigned
struct sndrv_##type *data;\
mm_segment_t oldseg;\
int err;\
- data32 = kcalloc(sizeof(*data32), GFP_KERNEL); \
- data = kcalloc(sizeof(*data), GFP_KERNEL); \
+ data32 = snd_kcalloc(sizeof(*data32), GFP_KERNEL); \
+ data = snd_kcalloc(sizeof(*data), GFP_KERNEL); \
if (data32 == NULL || data == NULL) { \
err = -ENOMEM; \
goto __end; \
- }
+ } \
if (copy_from_user(data32, (void*)arg, sizeof(*data32))) { \
err = -EFAULT; \
goto __end; \
- }
+ } \
memset(data, 0, sizeof(*data));\
convert_from_32(type, data, data32);\
oldseg = get_fs();\
--- ./sound/core/ioctl32/ioctl32.c.~1~ Mon Oct 14 13:02:21 2002
+++ ./sound/core/ioctl32/ioctl32.c Mon Oct 14 13:03:35 2002
@@ -23,6 +23,7 @@
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/time.h>
+#include <linux/slab.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/control.h>
@@ -287,13 +288,13 @@ static int _snd_ioctl32_ctl_elem_value(u
data->id = data32->id;
data->indirect = data32->indirect;
if (data->indirect) /* FIXME: this is not correct for long arrays */
- data.value.integer.value_ptr = (void*)TO_PTR(data32->value.integer.value_ptr);
+ data->value.integer.value_ptr = (void*)TO_PTR(data32->value.integer.value_ptr);
type = get_ctl_type(file, &data->id);
if (type < 0) {
err = type;
goto __end;
}
- if (! data.indirect) {
+ if (! data->indirect) {
switch (type) {
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
case SNDRV_CTL_ELEM_TYPE_INTEGER:
@@ -328,7 +329,7 @@ static int _snd_ioctl32_ctl_elem_value(u
if (err < 0)
goto __end;
/* restore info to 32bit */
- if (! data.indirect) {
+ if (! data->indirect) {
switch (type) {
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
case SNDRV_CTL_ELEM_TYPE_INTEGER:
next prev parent reply other threads:[~2002-10-15 17:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-14 19:45 Jaroslav Kysela
2002-10-14 19:58 ` David S. Miller
2002-10-14 22:43 ` Jaroslav Kysela
2002-10-15 17:08 ` David S. Miller [this message]
2002-10-15 19:45 ` Jaroslav Kysela
2002-10-15 19:45 ` David S. Miller
2002-10-16 16:20 ` Takashi Iwai
[not found] <Pine.NEB.4.44.0210151048240.20607-100000@mimas.fachschaften.tu-muenchen.de>
2002-10-15 9:55 ` Jaroslav Kysela
2002-11-10 20:44 Jaroslav Kysela
[not found] <200212181807.gBII7Wn28845@hera.kernel.org>
2002-12-18 18:21 ` Greg KH
2002-12-18 19:17 ` Jaroslav Kysela
2002-12-18 19:27 ` Greg KH
2002-12-19 12:17 ` Takashi Iwai
2002-12-18 19:51 ` Ruslan U. Zakirov
2002-12-19 12:07 ` Takashi Iwai
2002-12-19 12:18 ` Jaroslav Kysela
2002-12-20 0:27 ` Greg KH
2002-12-19 23:04 ` Bill Davidsen
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=20021015.100811.118915540.davem@redhat.com \
--to=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=torvalds@transmeta.com \
/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
Powered by JetHome