* [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation
@ 2005-07-23 17:08 Adrian Bunk
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2005-07-23 17:08 UTC (permalink / raw)
To: perex; +Cc: alsa-devel, linux-kernel
This patch fixes the following compile error with CONFIG_PROC_FS=n:
<-- snip -->
...
CC sound/core/memalloc.o
sound/core/memalloc.c: In function 'snd_mem_exit':
sound/core/memalloc.c:657: error: 'snd_mem_proc' undeclared (first use in this function)
sound/core/memalloc.c:657: error: (Each undeclared identifier is reported only once
sound/core/memalloc.c:657: error: for each function it appears in.)
make[2]: *** [sound/core/memalloc.o] Error 1
<-- snip -->
Since snd_mem_proc was needlessly global, I've also made it static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.13-rc3-mm1-full/sound/core/memalloc.c.old 2005-07-23 01:25:03.000000000 +0200
+++ linux-2.6.13-rc3-mm1-full/sound/core/memalloc.c 2005-07-23 01:30:35.000000000 +0200
@@ -505,13 +505,13 @@
up(&list_mutex);
}
+static struct proc_dir_entry *snd_mem_proc;
#ifdef CONFIG_PROC_FS
/*
* proc file interface
*/
#define SND_MEM_PROC_FILE "driver/snd-page-alloc"
-struct proc_dir_entry *snd_mem_proc;
static int snd_mem_proc_read(char *page, char **start, off_t off,
int count, int *eof, void *data)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation
@ 2005-08-20 19:02 Adrian Bunk
2005-08-22 12:41 ` [Alsa-devel] " Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2005-08-20 19:02 UTC (permalink / raw)
To: perex; +Cc: alsa-devel, linux-kernel
This patch fixes the following compile error with CONFIG_PROC_FS=n:
<-- snip -->
...
CC sound/core/memalloc.o
sound/core/memalloc.c: In function 'snd_mem_exit':
sound/core/memalloc.c:658: error: 'snd_mem_proc' undeclared (first use in this function)
sound/core/memalloc.c:658: error: (Each undeclared identifier is reported only once
sound/core/memalloc.c:658: error: for each function it appears in.)
make[2]: *** [sound/core/memalloc.o] Error 1
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.13-rc6-mm1-full/sound/core/memalloc.c.old 2005-08-20 15:12:55.000000000 +0200
+++ linux-2.6.13-rc6-mm1-full/sound/core/memalloc.c 2005-08-20 15:16:55.000000000 +0200
@@ -506,13 +506,13 @@
up(&list_mutex);
}
+static struct proc_dir_entry *snd_mem_proc;
#ifdef CONFIG_PROC_FS
/*
* proc file interface
*/
#define SND_MEM_PROC_FILE "driver/snd-page-alloc"
-static struct proc_dir_entry *snd_mem_proc;
static int snd_mem_proc_read(char *page, char **start, off_t off,
int count, int *eof, void *data)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Alsa-devel] [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation
2005-08-20 19:02 [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation Adrian Bunk
@ 2005-08-22 12:41 ` Takashi Iwai
2005-08-23 1:24 ` Adrian Bunk
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2005-08-22 12:41 UTC (permalink / raw)
To: Adrian Bunk; +Cc: perex, alsa-devel, linux-kernel
At Sat, 20 Aug 2005 21:02:58 +0200,
Adrian Bunk wrote:
>
> This patch fixes the following compile error with CONFIG_PROC_FS=n:
>
> <-- snip -->
>
> ...
> CC sound/core/memalloc.o
> sound/core/memalloc.c: In function 'snd_mem_exit':
> sound/core/memalloc.c:658: error: 'snd_mem_proc' undeclared (first use in this function)
> sound/core/memalloc.c:658: error: (Each undeclared identifier is reported only once
> sound/core/memalloc.c:658: error: for each function it appears in.)
> make[2]: *** [sound/core/memalloc.o] Error 1
>
> <-- snip -->
>
>
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> --- linux-2.6.13-rc6-mm1-full/sound/core/memalloc.c.old 2005-08-20 15:12:55.000000000 +0200
> +++ linux-2.6.13-rc6-mm1-full/sound/core/memalloc.c 2005-08-20 15:16:55.000000000 +0200
> @@ -506,13 +506,13 @@
> up(&list_mutex);
> }
>
> +static struct proc_dir_entry *snd_mem_proc;
>
> #ifdef CONFIG_PROC_FS
> /*
> * proc file interface
> */
> #define SND_MEM_PROC_FILE "driver/snd-page-alloc"
> -static struct proc_dir_entry *snd_mem_proc;
>
> static int snd_mem_proc_read(char *page, char **start, off_t off,
> int count, int *eof, void *data)
>
I think the below is simpler.
Takashi
--- linux/sound/core/memalloc.c 12 Aug 2005 15:39:48 -0000 1.44
+++ linux/sound/core/memalloc.c 22 Aug 2005 12:39:23 -0000
@@ -655,8 +655,7 @@
static void __exit snd_mem_exit(void)
{
- if (snd_mem_proc)
- remove_proc_entry(SND_MEM_PROC_FILE, NULL);
+ remove_proc_entry(SND_MEM_PROC_FILE, NULL);
free_all_reserved_pages();
if (snd_allocated_pages > 0)
printk(KERN_ERR "snd-malloc: Memory leak? pages not freed = %li\n", snd_allocated_pages);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Alsa-devel] [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation
2005-08-22 12:41 ` [Alsa-devel] " Takashi Iwai
@ 2005-08-23 1:24 ` Adrian Bunk
2005-08-23 10:12 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2005-08-23 1:24 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, alsa-devel, linux-kernel
On Mon, Aug 22, 2005 at 02:41:07PM +0200, Takashi Iwai wrote:
>...
> I think the below is simpler.
Looks good.
> Takashi
>...
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Alsa-devel] [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation
2005-08-23 1:24 ` Adrian Bunk
@ 2005-08-23 10:12 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2005-08-23 10:12 UTC (permalink / raw)
To: Adrian Bunk; +Cc: perex, alsa-devel, linux-kernel
At Tue, 23 Aug 2005 03:24:25 +0200,
Adrian Bunk wrote:
>
> On Mon, Aug 22, 2005 at 02:41:07PM +0200, Takashi Iwai wrote:
> >...
> > I think the below is simpler.
>
> Looks good.
OK, it's now on ALSA tree.
Thanks.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-08-23 10:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-20 19:02 [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation Adrian Bunk
2005-08-22 12:41 ` [Alsa-devel] " Takashi Iwai
2005-08-23 1:24 ` Adrian Bunk
2005-08-23 10:12 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2005-07-23 17:08 Adrian Bunk
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).