net: drop pointless static qualifier in atl2_probe()
Subsystems (3)
PATCH 1/1 net: drop pointless static qualifier in atl2_probe()
There is no need to have the 'T *v' variable static since new value always be assigned before use it.
--- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/atheros/atlx/atl2.c +1 -3
@@ -1335,13 +1335,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {struct net_device *netdev;struct atl2_adapter *adapter; -static int cards_found; +int cards_found =0 ;unsigned long mmio_start;int mmio_len;int err; - cards_found =0 ; - err =pci_enable_device (pdev);if (err)return err;
Signature · 1 line
2.20.1
PATCH 1/1 net: drop pointless static qualifier in atl2_probe()
There is no need to have the 'T *v' variable static since new value always be assigned before use it.
--- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/atheros/atlx/atl2.c +1 -3
@@ -1335,13 +1335,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {struct net_device *netdev;struct atl2_adapter *adapter; -static int cards_found; +int cards_found =0 ;unsigned long mmio_start;int mmio_len;int err; - cards_found =0 ; - err =pci_enable_device (pdev);if (err)return err;
Signature · 1 line
2.20.1
Quoted 13 lines · Mao Wenan
There is no need to have the 'T *v' variable static since new value always be assigned before use it.
Signed-off-by Mao Wenan <[email protected]>--- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/atheros/atlx/atl2.c +0
-0
drivers/net/ethernet/atheros/atlx/atl2.c static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1343
Quoted 10 lines
drivers/net/ethernet/atheros/atlx/atl2.c +1
-2@@ -1335,13 +1335,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {struct net_device *netdev;struct atl2_adapter *adapter; -static int cards_found; +int cards_found =0 ;unsigned long mmio_start;int mmio_len;int err; - cards_found =0 ;
You're sending patches too quickly and you're not thinking about what
you're doing. If someone asks you to redo a patch, that should take
over night to accomplish when you take time to think about what you're doing, but you have sent several versions of a patch in the same day.
This one is obviously wrong, but please take some time and slow down before resending.
regards,
dan carpenter
You send this one twice. You didn't CC netdev so no one is going to apply it.
regards,
dan carpenter
Quoted 30 lines · Dan Carpenter
Quoted 13 lines · Mao Wenan
There is no need to have the 'T *v' variable static since new value always be assigned before use it.
Signed-off-by Mao Wenan <[email protected]>--- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/atheros/atlx/atl2.c +0
-0drivers/net/ethernet/atheros/atlx/atl2.c static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1343
Quoted 10 lines
drivers/net/ethernet/atheros/atlx/atl2.c +1
-2@@ -1335,13 +1335,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {struct net_device *netdev;struct atl2_adapter *adapter; -static int cards_found; +int cards_found =0 ;unsigned long mmio_start;int mmio_len;int err; - cards_found =0 ;You're sending patches too quickly and you're not thinking about what
you're doing. If someone asks you to redo a patch, that should take
over night to accomplish when you take time to think about what you're doing, but you have sent several versions of a patch in the same day.
Quoted 2 lines
This one is obviously wrong, but please take some time and slow down before resending.
I'm sorry for this, I have checked again, that the fixes will be as below:
drivers/net/ethernet/atheros/atlx/atl2.c +1 -3
@@ -1335,13 +1335,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {struct net_device *netdev;struct atl2_adapter *adapter; -static int cards_found; +static int cards_found =0 ;unsigned long mmio_start;int mmio_len;int err; - cards_found =0 ; - err =pci_enable_device (pdev);if (err)return err;
Quoted 8 lines
regards,
dan carpenter.