Skip to contentSkip to conversation

: ir253_smc_msg.diff

PATCH In review Jean Tourrilhes 2 participants 3 messages May 10, 2002 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : ir253_smc_msg.diff

ir253_smc_msg.diff :
------------------
<Following patch from Jeff Snyder>
o [CRITICA] Release the proper region and not NULL pointer
o [FEATURE] Fix messages

drivers/net/irda/smc-ircc.c renamed from drivers/net/irda/smc-ircc.d8.c +7 -6
diff -u -p linux/drivers/net/irda/smc-ircc.d8.c linux/drivers/net/irda/smc-ircc.c
@@ -10,6 +10,8 @@
  * Modified by:   Dag Brattli <[email protected]>
  * Modified at:   Tue Jun 26 2001
  * Modified by:   Stefani Seibold <[email protected]>
+ * Modified at:   Thur Apr 18 2002
+ * Modified by:   Jeff Snyder <[email protected]>
  * 
  *     Copyright (c) 2001      Stefani Seibold
  *     Copyright (c) 1999-2001 Dag Brattli
@@ -539,7 +541,7 @@ static int __init ircc_open(unsigned int
 	if (ircc_irq < 255) {
 		if (ircc_irq!=irq)
 			MESSAGE("%s, Overriding IRQ - chip says %d, using %d\n",
-				driver_name, self->io->irq, ircc_irq);
+				driver_name, irq, ircc_irq);
 		self->io->irq = ircc_irq;
 	}
 	else
@@ -547,13 +549,13 @@ static int __init ircc_open(unsigned int
 	if (ircc_dma < 255) {
 		if (ircc_dma!=dma)
 			MESSAGE("%s, Overriding DMA - chip says %d, using %d\n",
-				driver_name, self->io->dma, ircc_dma);
+				driver_name, dma, ircc_dma);
 		self->io->dma = ircc_dma;
 	}
 	else
 		self->io->dma = dma;
 
-	request_region(fir_base, CHIP_IO_EXTENT, driver_name);
+	request_region(self->io->fir_base, CHIP_IO_EXTENT, driver_name);
 
 	/* Initialize QoS for this device */
 	irda_init_max_qos_capabilies(&irport->qos);
@@ -1191,10 +1193,9 @@ static int __exit ircc_close(struct ircc
         outb(IRCC_CFGB_IR, iobase+IRCC_SCE_CFGB);
 #endif
 	/* Release the PORT that this driver is using */
-	IRDA_DEBUG(0, __FUNCTION__ "(), releasing 0x%03x\n", 
-		   self->io->fir_base);
+	IRDA_DEBUG(0, __FUNCTION__ "(), releasing 0x%03x\n", iobase);
 
-	release_region(self->io->fir_base, self->io->fir_ext);
+	release_region(iobase, CHIP_IO_EXTENT);
 
 	if (self->tx_buff.head)
 		kfree(self->tx_buff.head);
#1 lore raw

Uz.ytkownik Jean Tourrilhes napisa?:

Quoted 45 lines

ir253_smc_msg.diff :
------------------
<Following patch from Jeff Snyder>
o [CRITICA] Release the proper region and not NULL pointer
o [FEATURE] Fix messages

diff -u -p linux/drivers/net/irda/smc-ircc.d8.c linux/drivers/net/irda/smc-ircc.c

drivers/net/irda/smc-ircc.c renamed from drivers/net/irda/smc-ircc.d8.c +5 -3
@@ -10,6 +10,8 @@
  * Modified by:   Dag Brattli <[email protected]>
  * Modified at:   Tue Jun 26 2001
  * Modified by:   Stefani Seibold <[email protected]>
+ * Modified at:   Thur Apr 18 2002
+ * Modified by:   Jeff Snyder <[email protected]>
  * 
  *     Copyright (c) 2001      Stefani Seibold
  *     Copyright (c) 1999-2001 Dag Brattli
@@ -539,7 +541,7 @@ static int __init ircc_open(unsigned int
 	if (ircc_irq < 255) {
 		if (ircc_irq!=irq)
 			MESSAGE("%s, Overriding IRQ - chip says %d, using %d\n",
-				driver_name, self->io->irq, ircc_irq);
+				driver_name, irq, ircc_irq);
 		self->io->irq = ircc_irq;
 	}
 	else
@@ -547,13 +549,13 @@ static int __init ircc_open(unsigned int
 	if (ircc_dma < 255) {
 		if (ircc_dma!=dma)
 			MESSAGE("%s, Overriding DMA - chip says %d, using %d\n",
-				driver_name, self->io->dma, ircc_dma);
+				driver_name, dma, ircc_dma);
 		self->io->dma = ircc_dma;
 	}
 	else
 		self->io->dma = dma;
 
-	request_region(fir_base, CHIP_IO_EXTENT, driver_name);
+	request_region(self->io->fir_base, CHIP_IO_EXTENT, driver_name);
 
 	/* Initialize QoS for this device */
 	irda_init_max_qos_capabilies(&irport->qos);

drivers/net/irda/smc-ircc.c static int __exit ircc_close(struct ircc · line 1196

Quoted 6 lines
drivers/net/irda/smc-ircc.c renamed from drivers/net/irda/smc-ircc.d8.c +1 -2
@@ -1191,10 +1193,9 @@ static int __exit ircc_close(struct ircc
         outb(IRCC_CFGB_IR, iobase+IRCC_SCE_CFGB);
 #endif
 	/* Release the PORT that this driver is using */
-	IRDA_DEBUG(0, __FUNCTION__ "(), releasing 0x%03x\n", 
-		   self->io->fir_base);
+	IRDA_DEBUG(0, __FUNCTION__ "(), releasing 0x%03x\n", iobase);

Should read:
+ IRDA_DEBUG(0, "%s (), releasin.... ", __FUNCTION__,

due to the fact that newer versions of GCC will be more standard aheren. Well the motivation is to coalesce all the places where __FUNCTION__ is used in to one instance of the corresponding string only.

Quoted 1 line
#2 lore raw
In reply to Jean Tourrilhes
Quoted 1 line · Martin Dalecki

Uz.ytkownik Jean Tourrilhes napisa?:

Qu'est ce que ca veux dire ?

Quoted 7 lines

Should read:
+ IRDA_DEBUG(0, "%s (), releasin.... ", __FUNCTION__,

due to the fact that newer versions of GCC will be more standard aheren. Well the motivation is to coalesce all the places where __FUNCTION__ is used in to one instance of the corresponding string only.

Don't mention it. The IrDA code is full of it :-( If you want
to fix that, be my guest...

Jean