staging: rdma: amso1100: c2: Drop wrapper function
PATCH v2 1/1 staging: rdma: amso1100: c2: Drop wrapper function
This patch removes the c2_print_macaddr() wrapper function which calls the pr_debug standard kernel function only.
c2_print_macaddr() has been replaced by directly calling pr_debug().
---
Changes in v2:
-Corrected indentation
-Removed comment added in previous version
drivers/staging/rdma/amso1100/c2.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/staging/rdma/amso1100/c2.c +6 -7
@@ -87,11 +87,6 @@ static struct pci_device_id c2_pci_table[] = {MODULE_DEVICE_TABLE (pci, c2_pci_table); -static void c2_print_macaddr (struct net_device *netdev) -{ -pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, netdev->dev_addr, netdev->irq); -} -static void c2_set_rxbufsize (struct c2_port *c2_port) {struct net_device *netdev = c2_port->netdev;
@@ -908,7 +903,9 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev,/* Validate the MAC address */ if (!is_valid_ether_addr (netdev->dev_addr)) {pr_debug ("Invalid MAC Address\n" ); -c2_print_macaddr (netdev); +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, + netdev->dev_addr, netdev->irq); +free_netdev (netdev);return NULL ; }
@@ -1142,7 +1139,9 @@ static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) }/* Print out the MAC address */ -c2_print_macaddr (netdev); +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, netdev->dev_addr, + netdev->irq); + ret =c2_rnic_init (c2dev);if (ret) {
Signature · 1 line
1.9.1
Quoted 31 lines · Amitoj Kaur Chawla
This patch removes the
c2_print_macaddr()wrapper function which calls thepr_debugstandard kernel function only.
c2_print_macaddr()has been replaced by directly callingpr_debug().Signed-off-by Amitoj Kaur Chawla <[email protected]>---
Changes in v2:
-Corrected indentation
-Removed comment added in previous versiondrivers/staging/rdma/amso1100/c2.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)drivers/staging/rdma/amso1100/c2.c +0
-5@@ -87,11 +87,6 @@ static struct pci_device_id c2_pci_table[] = {MODULE_DEVICE_TABLE (pci, c2_pci_table); -static void c2_print_macaddr (struct net_device *netdev) -{ -pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, netdev->dev_addr, netdev->irq); -} -static void c2_set_rxbufsize (struct c2_port *c2_port) {struct net_device *netdev = c2_port->netdev;
drivers/staging/rdma/amso1100/c2.c static struct net_device *c2_devinit(struct c2_dev *c2dev, · line 908
Quoted 7 lines
drivers/staging/rdma/amso1100/c2.c +3
-1@@ -908,7 +903,9 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev,/* Validate the MAC address */ if (!is_valid_ether_addr (netdev->dev_addr)) {pr_debug ("Invalid MAC Address\n" ); -c2_print_macaddr (netdev); +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, + netdev->dev_addr, netdev->irq); +
I'm still not sure to understand the indentation. If you look at the function c2_probe in the same file, a continuation line has as few tabs as are needed to pass the (. It looks like you are trying to put the arguments as far to the right as possible, especially in the next case. Also the extra blank line is not needed.
julia
Quoted 24 lines
drivers/staging/rdma/amso1100/c2.c +3
-2free_netdev (netdev);return NULL ; }@@ -1142,7 +1139,9 @@ static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) }/* Print out the MAC address */ -c2_print_macaddr (netdev); +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, netdev->dev_addr, + netdev->irq); + ret =c2_rnic_init (c2dev);if (ret) { --1.9.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151102111842.GA2845%40amitoj-Inspiron-3542.
For more options, visit https://groups.google.com/d/optout.
Quoted 47 lines · Julia Lawall
Quoted 31 lines · Amitoj Kaur Chawla
This patch removes the
c2_print_macaddr()wrapper function which calls thepr_debugstandard kernel function only.
c2_print_macaddr()has been replaced by directly callingpr_debug().Signed-off-by Amitoj Kaur Chawla <[email protected]>---
Changes in v2:
-Corrected indentation
-Removed comment added in previous versiondrivers/staging/rdma/amso1100/c2.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)drivers/staging/rdma/amso1100/c2.c +0
-5@@ -87,11 +87,6 @@ static struct pci_device_id c2_pci_table[] = {MODULE_DEVICE_TABLE (pci, c2_pci_table); -static void c2_print_macaddr (struct net_device *netdev) -{ -pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, netdev->dev_addr, netdev->irq); -} -static void c2_set_rxbufsize (struct c2_port *c2_port) {struct net_device *netdev = c2_port->netdev;drivers/staging/rdma/amso1100/c2.c static struct net_device *c2_devinit(struct c2_dev *c2dev, · line 908
Quoted 7 lines
drivers/staging/rdma/amso1100/c2.c +3
-1@@ -908,7 +903,9 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev,/* Validate the MAC address */ if (!is_valid_ether_addr (netdev->dev_addr)) {pr_debug ("Invalid MAC Address\n" ); -c2_print_macaddr (netdev); +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, + netdev->dev_addr, netdev->irq); +I'm still not sure to understand the indentation. If you look at the function
c2_probein the same file, a continuation line has as few tabs as are needed to pass the (. It looks like you are trying to put the arguments as far to the right as possible, especially in the next case. Also the extra blank line is not needed.
Quoted 2 lines
julia
I was under the impression that you have to keep it as much to the right as possible. My bad.
Quoted 24 lines
Quoted 24 lines
drivers/staging/rdma/amso1100/c2.c +3
-2free_netdev (netdev);return NULL ; }@@ -1142,7 +1139,9 @@ static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) }/* Print out the MAC address */ -c2_print_macaddr (netdev); +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, netdev->dev_addr, + netdev->irq); + ret =c2_rnic_init (c2dev);if (ret) { --1.9.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151102111842.GA2845%40amitoj-Inspiron-3542.
For more options, visit https://groups.google.com/d/optout.
Signature · 1 line
Amitoj