staging: rdma: amso1100: c2: Remove wrapper function
PATCH 1/1 staging: rdma: amso1100: c2: Remove 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 the pr_debug() call and comment has been been added to ensure readability.
--- drivers/staging/rdma/amso1100/c2.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/staging/rdma/amso1100/c2.c +5 -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); +/* Print out the MAC address */ +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, + netdev->dev_addr, netdev->irq);free_netdev (netdev);return NULL ; }
@@ -1142,7 +1139,8 @@ 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
drivers/staging/rdma/amso1100/c2.c static struct net_device *c2_devinit(struct c2_dev *c2dev, · line 908
Quoted 11 lines
static void
c2_set_rxbufsize(struct c2_port *c2_port){drivers/staging/rdma/amso1100/c2.c +3
-1struct 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); +/* Print out the MAC address */ +pr_debug ("%s: MAC %pM, IRQ %u\n" , netdev->name, + netdev->dev_addr, netdev->irq);
I think that the commen is not needed here. One can see from the comment just above that the MAC address is tested, and there is the word MAC in the string. On the other hand, the indentation of the continuation line seems like too much.
drivers/staging/rdma/amso1100/c2.c static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) · line 1143
Quoted 10 lines
drivers/staging/rdma/amso1100/c2.c +2
-1free_netdev (netdev);return NULL ; }@@ -1142,7 +1139,8 @@ 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);
Here too, why so much indentation for the last argument?
julia
Quoted 13 lines
drivers/staging/rdma/amso1100/c2.c +0
-0ret =c2_rnic_init (c2dev);if (ret) {Signature · 8 lines
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/20151102055451.GA1326%40amitoj-Inspiron-3542. For more options, visit https://groups.google.com/d/optout.