tg3: use <linux/io.h> and <linux/uaccess.h> instead <asm/io.h> and <asm/uaccess.h>
Subsystems (3)
PATCH 1/3 tg3: use <linux/io.h> and <linux/uaccess.h> instead <asm/io.h> and <asm/uaccess.h>
It is proper style to include linux/foo.h instead asm/foo.h if both exist
--- drivers/net/tg3.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/tg3.c +2 -2
@@ -48,9 +48,9 @@#include <net/ip.h> #include <asm/system.h> -#include <asm/io.h> +#include <linux/io.h> #include <asm/byteorder.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #ifdef CONFIG_SPARC #include <asm/idprom.h>
Signature · 1 line
1.7.2.3
PATCH 2/3 tg3: Don't use IRQF_SAMPLE_RANDOM
This flag is scheduled for removal so we shouldn't used it.
--- drivers/net/tg3.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/net/tg3.c +2 -3
@@ -8844,12 +8844,11 @@ static int tg3_request_irq(struct tg3 *tp, int irq_num) fn = tg3_msi;if (tp->tg3_flags2 &TG3_FLG2_1SHOT_MSI ) fn = tg3_msi_1shot; - flags =IRQF_SAMPLE_RANDOM ; }else { fn = tg3_interrupt;if (tp->tg3_flags &TG3_FLAG_TAGGED_STATUS ) fn = tg3_interrupt_tagged; - flags =IRQF_SHARED |IRQF_SAMPLE_RANDOM ; + flags =IRQF_SHARED ; }return request_irq (tnapi->irq_vec, fn, flags, name, tnapi);
@@ -8880,7 +8879,7 @@ static int tg3_test_interrupt(struct tg3 *tp) } err =request_irq (tnapi->irq_vec, tg3_test_isr, -IRQF_SHARED |IRQF_SAMPLE_RANDOM , dev->name, tnapi); +IRQF_SHARED , dev->name, tnapi);if (err)return err;
Signature · 1 line
1.7.2.3
Re: [PATCH 2/3] tg3: Don't use IRQF_SAMPLE_RANDOM
Quoted 12 lines · Javier Martinez Canillas
This flag is scheduled for removal so we shouldn't used it.
Signed-off-by Javier Martinez Canillas <[email protected]>--- drivers/net/tg3.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)drivers/net/tg3.c +0
-0
drivers/net/tg3.c static int tg3_request_irq(struct tg3 *tp, int irq_num) · line 8847
Quoted 4 lines
drivers/net/tg3.c +0
-1@@ -8844,12 +8844,11 @@ static int tg3_request_irq(struct tg3 *tp, int irq_num) fn = tg3_msi;if (tp->tg3_flags2 &TG3_FLG2_1SHOT_MSI ) fn = tg3_msi_1shot; - flags =IRQF_SAMPLE_RANDOM ;
You need initialize flags to zero here. Apparently gcc doesn't catch this. I'm using gcc 4.4.3-4ubuntu5.
regards,
dan carpenter
v
Quoted 9 lines
drivers/net/tg3.c +1
-1}else { fn = tg3_interrupt;if (tp->tg3_flags &TG3_FLAG_TAGGED_STATUS ) fn = tg3_interrupt_tagged; - flags =IRQF_SHARED |IRQF_SAMPLE_RANDOM ; + flags =IRQF_SHARED ; }return request_irq (tnapi->irq_vec, fn, flags, name, tnapi);
David Miller
maintainerRe: [PATCH 2/3] tg3: Don't use IRQF_SAMPLE_RANDOM
From: Dan Carpenter <[email protected]>
Date: Sun, 27 Mar 2011 06:08:30 +0300
Quoted 8 lines · Javier Martinez Canillas
Quoted 7 lines
This flag is scheduled for removal so we shouldn't used it.
Signed-off-by Javier Martinez Canillas <[email protected]>--- drivers/net/tg3.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
Quoted 12 lines
drivers/net/tg3.c static int tg3_request_irq(struct tg3 *tp, int irq_num) · line 8847
Quoted 9 lines
drivers/net/tg3.c +0
-1@@ -8844,12 +8844,11 @@ static int tg3_request_irq(struct tg3 *tp, int irq_num) fn = tg3_msi;if (tp->tg3_flags2 &TG3_FLG2_1SHOT_MSI ) fn = tg3_msi_1shot; - flags =IRQF_SAMPLE_RANDOM ;You need initialize flags to zero here. Apparently gcc doesn't catch this. I'm using gcc 4.4.3-4ubuntu5.
Javier please fix this up and resubmit your patch.
Thanks.
PATCH 3/3 tg3: Fix inline keyword usage
In reply to Javier Martinez CanillasThe correct usage is "static inline void" not "static void inline".
--- drivers/net/tg3.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/tg3.c +1 -1
@@ -13061,7 +13061,7 @@ done:static struct pci_dev *__devinit tg3_find_peer (struct tg3 *); -static void inline vlan_features_add (struct net_device *dev,unsigned long flags) +static inline void vlan_features_add (struct net_device *dev,unsigned long flags) { dev->vlan_features |= flags; }
Signature · 1 line
1.7.2.3
Re: [PATCH 3/3] tg3: Fix inline keyword usage
From: Javier Martinez Canillas <[email protected]>
Date: Sun, 27 Mar 2011 04:42:33 +0200
Quoted 3 lines
The correct usage is "static inline void" not "static void inline".
Signed-off-by Javier Martinez Canillas <[email protected]>
Applied.
From: Javier Martinez Canillas <[email protected]>
Date: Sun, 27 Mar 2011 04:42:31 +0200
Quoted 3 lines
It is proper style to include
linux/foo.hinsteadasm/foo.hif both existSigned-off-by Javier Martinez Canillas <[email protected]>
Applied.