Skip to contentSkip to conversation

staging: rdma: amso1100: Drop wrapper function

PATCH Superseded Amitoj Kaur Chawla 2 participants 3 messages Nov 2, 2015 – Nov 4, 2015 Staging

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: rdma: amso1100: 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
Changes in v3:
-Corrected indentation

 drivers/staging/rdma/amso1100/c2.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rdma/amso1100/c2.c +4 -7
index 7f1e794..6688349 100644
@@ -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,8 @@ 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 +1138,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
maintainer
#1 lore raw
Quoted 43 lines · Amitoj Kaur Chawla

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
Changes in v3:
-Corrected indentation

 drivers/staging/rdma/amso1100/c2.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rdma/amso1100/c2.c +2 -6
index 7f1e794..6688349 100644
@@ -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,8 @@ 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;
 	}

drivers/staging/rdma/amso1100/c2.c static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) · line 1142

Quoted 6 lines
drivers/staging/rdma/amso1100/c2.c +2 -1
@@ -1142,7 +1138,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);

You added trailing whitespace, which is not allowed :(

#2 lore raw
Quoted 47 lines · Greg KH
Quoted 45 lines · Amitoj Kaur Chawla

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
Changes in v3:
-Corrected indentation

 drivers/staging/rdma/amso1100/c2.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rdma/amso1100/c2.c +2 -6
index 7f1e794..6688349 100644
@@ -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,8 @@ 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 +1138,8 @@ static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
      }
 
Quoted 6 lines

drivers/staging/rdma/amso1100/c2.c static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) · line 1142

Quoted 4 lines
drivers/staging/rdma/amso1100/c2.c +2 -1
      /* Print out the MAC address */
-     c2_print_macaddr(netdev);
+     pr_debug("%s: MAC %pM, IRQ %u\n", netdev->name, netdev->dev_addr,
+                     netdev->irq);

You added trailing whitespace, which is not allowed :(

I'll fix this up and resend on the getmaintainer.pl provided ids.

Signature · 1 line
Amitoj