netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/5] [IrDA] stir4200 fixes
  2007-12-03  9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
@ 2007-12-03  9:28 ` Samuel Ortiz
  0 siblings, 0 replies; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-03  9:28 UTC (permalink / raw)
  To: Herbert Xu, netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: David S. Miller

[-- Attachment #1: stir4200.patch --]
[-- Type: text/plain, Size: 1742 bytes --]

The attached patch observes the stir4200 fifo size and will clear the fifo, if
the size is increasing, while it should be transmitting bytes

From: Olaf Hartmann <olaf.hartmann-kAcfE3m5wwkaBlGTGt4zH4SGEyLTKazZ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

---
 drivers/net/irda/stir4200.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Index: net-2.6/drivers/net/irda/stir4200.c
===================================================================
--- net-2.6.orig/drivers/net/irda/stir4200.c	2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/stir4200.c	2007-11-26 02:16:12.000000000 +0100
@@ -142,9 +142,6 @@
 };
 
 enum StirFifoCtlMask {
-	FIFOCTL_EOF = 0x80,
-	FIFOCTL_UNDER = 0x40,
-	FIFOCTL_OVER = 0x20,
 	FIFOCTL_DIR = 0x10,
 	FIFOCTL_CLR = 0x08,
 	FIFOCTL_EMPTY = 0x04,
@@ -594,9 +591,10 @@
 {
 	int err;
 	unsigned long count, status;
+	unsigned long prev_count = 0x1fff;
 
 	/* Read FIFO status and count */
-	for(;;) {
+	for (;; prev_count = count) {
 		err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, 
 				   FIFO_REGS_SIZE);
 		if (unlikely(err != FIFO_REGS_SIZE)) {
@@ -629,6 +627,10 @@
 		if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count)
 			return 0;
 
+		/* queue confused */
+		if (prev_count < count)
+			break;
+
 		/* estimate transfer time for remaining chars */
 		msleep((count * 8000) / stir->speed);
 	}

-- 


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

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

* Re: [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb
  2007-12-16 23:46 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
@ 2007-12-16 22:07   ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2007-12-16 22:07 UTC (permalink / raw)
  To: samuel; +Cc: netdev, irda-users, oneukum

From: Samuel Ortiz <samuel@sortiz.org>
Date: Mon, 17 Dec 2007 00:46:49 +0100

> It seems to me that irda_usb_net_open() must set self->netopen
> under spinlock or disconnect() may fail to kill all URBs, if it is called
> while an interface is opened.
> 
> From: Oliver Neukum <oneukum@suse.de>
> Signed-off-by: Oliver Neukum <oneukum@suse.de>
> Signed-off-by: Samuel Ortiz <samuel@sortiz.org>

Applied, thanks.

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

* Re: [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer
       [not found]   ` <20071216234933.121032143-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
@ 2007-12-16 22:08     ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2007-12-16 22:08 UTC (permalink / raw)
  To: samuel-jcdQHdrhKHMdnm+yROfE0A
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Date: Mon, 17 Dec 2007 00:46:50 +0100

> While testing the mcs7780 based IrDA USB dongle I've stumbled upon
> memory leak in mcs_net_close(). Patch below fixes it.
> 
> From: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
> Signed-off-by: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
> Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

Applied.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* Re: [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps
       [not found]   ` <20071216234933.289314655-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
@ 2007-12-16 22:09     ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2007-12-16 22:09 UTC (permalink / raw)
  To: samuel-jcdQHdrhKHMdnm+yROfE0A
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Date: Mon, 17 Dec 2007 00:46:51 +0100

> While testing the mcs7780 based IrDA USB dongle I've stumbled upon
> memory leak in irlmp_unregister_link(). Hashbin for lsaps is created in
> irlmp_register_link and should probably be freed in irlmp_unregister_link().
> 
> Signed-off-by: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
> Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

Applied.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* Re: [PATCH 4/5] [IrDA] stir4200 fixes
       [not found]   ` <20071216234933.459646638-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
@ 2007-12-16 22:09     ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2007-12-16 22:09 UTC (permalink / raw)
  To: samuel-jcdQHdrhKHMdnm+yROfE0A
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Date: Mon, 17 Dec 2007 00:46:52 +0100

> The attached patch observes the stir4200 fifo size and will clear the fifo, if
> the size is increasing, while it should be transmitting bytes
> 
> From: Olaf Hartmann <olaf.hartmann-kAcfE3m5wwkaBlGTGt4zH4SGEyLTKazZ@public.gmane.org>
> Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

Applied.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* Re: [PATCH 5/5] [IrDA] irda parameters warning fixes.
       [not found]   ` <20071216234933.666730217-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
@ 2007-12-16 22:11     ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2007-12-16 22:11 UTC (permalink / raw)
  To: samuel-jcdQHdrhKHMdnm+yROfE0A
  Cc: ricknu-0-oe7qfRrRQfd5oVVtFh8HQg, netdev-u79uwXL29TY76Z2rM5mHXA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Date: Mon, 17 Dec 2007 00:46:53 +0100

> This patch fixes:
>   CHECK   /home/kernel/src/net/irda/parameters.c
> /home/kernel/src/net/irda/parameters.c:466:2: warning: Using plain integer as NULL pointer
> /home/kernel/src/net/irda/parameters.c:520:2: warning: Using plain integer as NULL pointer
> /home/kernel/src/net/irda/parameters.c:573:2: warning: Using plain integer as NULL pointer
> 
> From: Richard Knutsson <ricknu-0-oe7qfRrRQfd5oVVtFh8HQg@public.gmane.org>
> Signed-off-by: Richard Knutsson <ricknu-0-oe7qfRrRQfd5oVVtFh8HQg@public.gmane.org>
> Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
> Cc: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>

Applied.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* [PATCH 0/5] [IrDA] IrDA net-2.6 fixes
@ 2007-12-16 23:46 Samuel Ortiz
  2007-12-16 23:46 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-16 23:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi Dave,

Here goes a batch of 5 IrDA patches against your latest net-2.6 tree.

Cheers,
Samuel.
-- 


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb
  2007-12-16 23:46 [PATCH 0/5] [IrDA] IrDA net-2.6 fixes Samuel Ortiz
@ 2007-12-16 23:46 ` Samuel Ortiz
  2007-12-16 22:07   ` David Miller
  2007-12-16 23:46 ` [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Samuel Ortiz
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-16 23:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Oliver Neukum,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: irda-usb.patch --]
[-- Type: text/plain, Size: 1944 bytes --]

It seems to me that irda_usb_net_open() must set self->netopen
under spinlock or disconnect() may fail to kill all URBs, if it is called
while an interface is opened.

From: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

---
 drivers/net/irda/irda-usb.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: net-2.6/drivers/net/irda/irda-usb.c
===================================================================
--- net-2.6.orig/drivers/net/irda/irda-usb.c	2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/irda-usb.c	2007-11-25 07:12:09.000000000 +0100
@@ -1168,6 +1168,7 @@
 static int irda_usb_net_open(struct net_device *netdev)
 {
 	struct irda_usb_cb *self;
+	unsigned long flags;
 	char	hwname[16];
 	int i;
 	
@@ -1177,13 +1178,16 @@
 	self = (struct irda_usb_cb *) netdev->priv;
 	IRDA_ASSERT(self != NULL, return -1;);
 
+	spin_lock_irqsave(&self->lock, flags);
 	/* Can only open the device if it's there */
 	if(!self->present) {
+		spin_unlock_irqrestore(&self->lock, flags);
 		IRDA_WARNING("%s(), device not present!\n", __FUNCTION__);
 		return -1;
 	}
 
 	if(self->needspatch) {
+		spin_unlock_irqrestore(&self->lock, flags);
 		IRDA_WARNING("%s(), device needs patch\n", __FUNCTION__) ;
 		return -EIO ;
 	}
@@ -1198,6 +1202,7 @@
 	/* To do *before* submitting Rx urbs and starting net Tx queue
 	 * Jean II */
 	self->netopen = 1;
+	spin_unlock_irqrestore(&self->lock, flags);
 
 	/* 
 	 * Now that everything should be initialized properly,

-- 


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer
  2007-12-16 23:46 [PATCH 0/5] [IrDA] IrDA net-2.6 fixes Samuel Ortiz
  2007-12-16 23:46 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
@ 2007-12-16 23:46 ` Samuel Ortiz
       [not found]   ` <20071216234933.121032143-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
  2007-12-16 23:46 ` [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps Samuel Ortiz
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-16 23:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: mcs7780-free-rx_buff.diff --]
[-- Type: text/plain, Size: 1244 bytes --]

While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in mcs_net_close(). Patch below fixes it.

From: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
Signed-off-by: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

---
 drivers/net/irda/mcs7780.c |    2 ++
 1 file changed, 2 insertions(+)

Index: net-2.6/drivers/net/irda/mcs7780.c
===================================================================
--- net-2.6.orig/drivers/net/irda/mcs7780.c	2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/mcs7780.c	2007-11-25 07:12:11.000000000 +0100
@@ -677,6 +677,8 @@
 	/* Stop transmit processing */
 	netif_stop_queue(netdev);
 
+	kfree_skb(mcs->rx_buff.skb);
+
 	/* kill and free the receive and transmit URBs */
 	usb_kill_urb(mcs->rx_urb);
 	usb_free_urb(mcs->rx_urb);

-- 


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps
  2007-12-16 23:46 [PATCH 0/5] [IrDA] IrDA net-2.6 fixes Samuel Ortiz
  2007-12-16 23:46 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
  2007-12-16 23:46 ` [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Samuel Ortiz
@ 2007-12-16 23:46 ` Samuel Ortiz
       [not found]   ` <20071216234933.289314655-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
  2007-12-16 23:46 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz
  2007-12-16 23:46 ` [PATCH 5/5] [IrDA] irda parameters warning fixes Samuel Ortiz
  4 siblings, 1 reply; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-16 23:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: irlmp-delete-lsaps-hashbin.diff --]
[-- Type: text/plain, Size: 1178 bytes --]

While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in irlmp_unregister_link(). Hashbin for lsaps is created in
irlmp_register_link and should probably be freed in irlmp_unregister_link().

Signed-off-by: Hinko Kocevar <hinko.kocevar-oztQky9TsV0CZtS6sZ44uQ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

---
 net/irda/irlmp.c |    1 +
 1 file changed, 1 insertion(+)

Index: net-2.6/net/irda/irlmp.c
===================================================================
--- net-2.6.orig/net/irda/irlmp.c	2007-11-25 05:54:02.000000000 +0100
+++ net-2.6/net/irda/irlmp.c	2007-11-25 07:12:13.000000000 +0100
@@ -353,6 +353,7 @@
 		/* Final cleanup */
 		del_timer(&link->idle_timer);
 		link->magic = 0;
+		hashbin_delete(link->lsaps, (FREE_FUNC) __irlmp_close_lsap);
 		kfree(link);
 	}
 }

-- 


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* [PATCH 4/5] [IrDA] stir4200 fixes
  2007-12-16 23:46 [PATCH 0/5] [IrDA] IrDA net-2.6 fixes Samuel Ortiz
                   ` (2 preceding siblings ...)
  2007-12-16 23:46 ` [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps Samuel Ortiz
@ 2007-12-16 23:46 ` Samuel Ortiz
       [not found]   ` <20071216234933.459646638-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
  2007-12-16 23:46 ` [PATCH 5/5] [IrDA] irda parameters warning fixes Samuel Ortiz
  4 siblings, 1 reply; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-16 23:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: stir4200.patch --]
[-- Type: text/plain, Size: 1741 bytes --]

The attached patch observes the stir4200 fifo size and will clear the fifo, if
the size is increasing, while it should be transmitting bytes

From: Olaf Hartmann <olaf.hartmann-kAcfE3m5wwkaBlGTGt4zH4SGEyLTKazZ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

---
 drivers/net/irda/stir4200.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Index: net-2.6/drivers/net/irda/stir4200.c
===================================================================
--- net-2.6.orig/drivers/net/irda/stir4200.c	2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/stir4200.c	2007-11-26 02:16:12.000000000 +0100
@@ -142,9 +142,6 @@
 };
 
 enum StirFifoCtlMask {
-	FIFOCTL_EOF = 0x80,
-	FIFOCTL_UNDER = 0x40,
-	FIFOCTL_OVER = 0x20,
 	FIFOCTL_DIR = 0x10,
 	FIFOCTL_CLR = 0x08,
 	FIFOCTL_EMPTY = 0x04,
@@ -594,9 +591,10 @@
 {
 	int err;
 	unsigned long count, status;
+	unsigned long prev_count = 0x1fff;
 
 	/* Read FIFO status and count */
-	for(;;) {
+	for (;; prev_count = count) {
 		err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, 
 				   FIFO_REGS_SIZE);
 		if (unlikely(err != FIFO_REGS_SIZE)) {
@@ -629,6 +627,10 @@
 		if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count)
 			return 0;
 
+		/* queue confused */
+		if (prev_count < count)
+			break;
+
 		/* estimate transfer time for remaining chars */
 		msleep((count * 8000) / stir->speed);
 	}

-- 


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* [PATCH 5/5] [IrDA] irda parameters warning fixes.
  2007-12-16 23:46 [PATCH 0/5] [IrDA] IrDA net-2.6 fixes Samuel Ortiz
                   ` (3 preceding siblings ...)
  2007-12-16 23:46 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz
@ 2007-12-16 23:46 ` Samuel Ortiz
       [not found]   ` <20071216234933.666730217-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
  4 siblings, 1 reply; 12+ messages in thread
From: Samuel Ortiz @ 2007-12-16 23:46 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, irda-users, Richard Knutsson, Andrew Morton

[-- Attachment #1: irda_parameters.patch --]
[-- Type: text/plain, Size: 1598 bytes --]

This patch fixes:
  CHECK   /home/kernel/src/net/irda/parameters.c
/home/kernel/src/net/irda/parameters.c:466:2: warning: Using plain integer as NULL pointer
/home/kernel/src/net/irda/parameters.c:520:2: warning: Using plain integer as NULL pointer
/home/kernel/src/net/irda/parameters.c:573:2: warning: Using plain integer as NULL pointer

From: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 net/irda/parameters.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: net-2.6/net/irda/parameters.c
===================================================================
--- net-2.6.orig/net/irda/parameters.c	2007-11-25 05:54:02.000000000 +0100
+++ net-2.6/net/irda/parameters.c	2007-11-26 10:20:38.000000000 +0100
@@ -463,7 +463,7 @@
 	int n = 0;
 
 	IRDA_ASSERT(buf != NULL, return ret;);
-	IRDA_ASSERT(info != 0, return ret;);
+	IRDA_ASSERT(info != NULL, return ret;);
 
 	pi_minor = pi & info->pi_mask;
 	pi_major = pi >> info->pi_major_offset;
@@ -517,7 +517,7 @@
 	int n = 0;
 
 	IRDA_ASSERT(buf != NULL, return ret;);
-	IRDA_ASSERT(info != 0, return ret;);
+	IRDA_ASSERT(info != NULL, return ret;);
 
 	pi_minor = buf[n] & info->pi_mask;
 	pi_major = buf[n] >> info->pi_major_offset;
@@ -570,7 +570,7 @@
 	int n = 0;
 
 	IRDA_ASSERT(buf != NULL, return ret;);
-	IRDA_ASSERT(info != 0, return ret;);
+	IRDA_ASSERT(info != NULL, return ret;);
 
 	/*
 	 * Parse all parameters. Each parameter must be at least two bytes

-- 


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

end of thread, other threads:[~2007-12-16 23:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-16 23:46 [PATCH 0/5] [IrDA] IrDA net-2.6 fixes Samuel Ortiz
2007-12-16 23:46 ` [PATCH 1/5] [IrDA] Race between open and disconnect in irda-usb Samuel Ortiz
2007-12-16 22:07   ` David Miller
2007-12-16 23:46 ` [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Samuel Ortiz
     [not found]   ` <20071216234933.121032143-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2007-12-16 22:08     ` David Miller
2007-12-16 23:46 ` [PATCH 3/5] [IrDA] irlmp_unregister_link needs to free lsaps Samuel Ortiz
     [not found]   ` <20071216234933.289314655-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2007-12-16 22:09     ` David Miller
2007-12-16 23:46 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz
     [not found]   ` <20071216234933.459646638-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2007-12-16 22:09     ` David Miller
2007-12-16 23:46 ` [PATCH 5/5] [IrDA] irda parameters warning fixes Samuel Ortiz
     [not found]   ` <20071216234933.666730217-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2007-12-16 22:11     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2007-12-03  9:28 [PATCH 0/5] [IrDA] IrDA updates for net-2.6 Samuel Ortiz
2007-12-03  9:28 ` [PATCH 4/5] [IrDA] stir4200 fixes Samuel Ortiz

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).