public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Fix compilation for sound/oss/vwsnd.c
@ 2006-03-23 22:04 Eric Sesterhenn
  2006-03-23 22:09 ` Eric Sesterhenn
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sesterhenn @ 2006-03-23 22:04 UTC (permalink / raw)
  To: linux-kernel

hi,

this patch fixes compilation for sound/oss/vwsnd.o, by moving
li_destroy() above li_create()

sound/oss/vwsnd.c:275: warning: conflicting types for ‘li_destroy’
sound/oss/vwsnd.c:275: error: static declaration of ‘li_destroy’ follows non-static declaration
sound/oss/vwsnd.c:264: error: previous implicit declaration of ‘li_destroy’ was here

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.16-git6/sound/oss/vwsnd.c	2006-03-23 22:57:54.000000000 +0100
+++ linux-2.6.16-git6.new/sound/oss/vwsnd.c	2006-03-23 22:58:30.000000000 +0100
@@ -247,6 +247,26 @@ typedef struct lithium {
 } lithium_t;
 
 /*
+ * li_destroy destroys the lithium_t structure and vm mappings.
+ */
+
+static void li_destroy(lithium_t *lith)
+{
+	if (lith->page0) {
+		iounmap(lith->page0);
+		lith->page0 = NULL;
+	}
+	if (lith->page1) {
+		iounmap(lith->page1);
+		lith->page1 = NULL;
+	}
+	if (lith->page2) {
+		iounmap(lith->page2);
+		lith->page2 = NULL;
+	}
+}
+
+/*
  * li_create initializes the lithium_t structure and sets up vm mappings
  * to access the registers.
  * Returns 0 on success, -errno on failure.
@@ -268,26 +288,6 @@ static int __init li_create(lithium_t *l
 }
 
 /*
- * li_destroy destroys the lithium_t structure and vm mappings.
- */
-
-static void li_destroy(lithium_t *lith)
-{
-	if (lith->page0) {
-		iounmap(lith->page0);
-		lith->page0 = NULL;
-	}
-	if (lith->page1) {
-		iounmap(lith->page1);
-		lith->page1 = NULL;
-	}
-	if (lith->page2) {
-		iounmap(lith->page2);
-		lith->page2 = NULL;
-	}
-}
-
-/*
  * basic register accessors - read/write long/byte
  */
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fix compilation for sound/oss/vwsnd.c
  2006-03-23 22:04 [Patch] Fix compilation for sound/oss/vwsnd.c Eric Sesterhenn
@ 2006-03-23 22:09 ` Eric Sesterhenn
  2006-03-25 18:36   ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sesterhenn @ 2006-03-23 22:09 UTC (permalink / raw)
  To: linux-kernel

sorry,

fixed patch below between all the switching i forgot to remove
the declaration in li_create()

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>


--- linux-2.6.16-git6/sound/oss/vwsnd.c	2006-03-23 23:07:15.000000000 +0100
+++ linux-2.6.16-git6.new/sound/oss/vwsnd.c	2006-03-23 23:07:32.000000000 +0100
@@ -247,27 +247,6 @@ typedef struct lithium {
 } lithium_t;
 
 /*
- * li_create initializes the lithium_t structure and sets up vm mappings
- * to access the registers.
- * Returns 0 on success, -errno on failure.
- */
-
-static int __init li_create(lithium_t *lith, unsigned long baseaddr)
-{
-	static void li_destroy(lithium_t *);
-
-	spin_lock_init(&lith->lock);
-	lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE);
-	lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE);
-	lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE);
-	if (!lith->page0 || !lith->page1 || !lith->page2) {
-		li_destroy(lith);
-		return -ENOMEM;
-	}
-	return 0;
-}
-
-/*
  * li_destroy destroys the lithium_t structure and vm mappings.
  */
 
@@ -288,6 +267,25 @@ static void li_destroy(lithium_t *lith)
 }
 
 /*
+ * li_create initializes the lithium_t structure and sets up vm mappings
+ * to access the registers.
+ * Returns 0 on success, -errno on failure.
+ */
+
+static int __init li_create(lithium_t *lith, unsigned long baseaddr)
+{
+	spin_lock_init(&lith->lock);
+	lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE);
+	lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE);
+	lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE);
+	if (!lith->page0 || !lith->page1 || !lith->page2) {
+		li_destroy(lith);
+		return -ENOMEM;
+	}
+	return 0;
+}
+
+/*
  * basic register accessors - read/write long/byte
  */
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fix compilation for sound/oss/vwsnd.c
  2006-03-23 22:09 ` Eric Sesterhenn
@ 2006-03-25 18:36   ` Jan Engelhardt
  2006-03-25 19:01     ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2006-03-25 18:36 UTC (permalink / raw)
  To: Eric Sesterhenn; +Cc: linux-kernel

>sorry,
>
>fixed patch below between all the switching i forgot to remove
>the declaration in li_create()
>

It would have been a lot simpler to add a (proper) prototype.


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fix compilation for sound/oss/vwsnd.c
  2006-03-25 18:36   ` Jan Engelhardt
@ 2006-03-25 19:01     ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-03-25 19:01 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Eric Sesterhenn, linux-kernel

On Sat, Mar 25, 2006 at 07:36:31PM +0100, Jan Engelhardt wrote:
> >sorry,
> >
> >fixed patch below between all the switching i forgot to remove
> >the declaration in li_create()
> >
> 
> It would have been a lot simpler to add a (proper) prototype.

Eric's patch looks fine.

> Jan Engelhardt

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] 4+ messages in thread

end of thread, other threads:[~2006-03-25 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-23 22:04 [Patch] Fix compilation for sound/oss/vwsnd.c Eric Sesterhenn
2006-03-23 22:09 ` Eric Sesterhenn
2006-03-25 18:36   ` Jan Engelhardt
2006-03-25 19:01     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox