From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751299AbVHVVzl (ORCPT ); Mon, 22 Aug 2005 17:55:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751298AbVHVVzj (ORCPT ); Mon, 22 Aug 2005 17:55:39 -0400 Received: from zeus1.kernel.org ([204.152.191.4]:12676 "EHLO zeus1.kernel.org") by vger.kernel.org with ESMTP id S1751207AbVHVVz3 (ORCPT ); Mon, 22 Aug 2005 17:55:29 -0400 Date: Mon, 22 Aug 2005 14:41:07 +0200 Message-ID: From: Takashi Iwai To: Adrian Bunk Cc: perex@suse.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [Alsa-devel] [2.6 patch] sound/core/memalloc.c: fix PROC_FS=n compilation In-Reply-To: <20050820190258.GA3615@stusta.de> References: <20050820190258.GA3615@stusta.de> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta18) (chestnut) (+CVS-20041021) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 > > --- 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);