Subject: [RFC 3/7] ixgbe: use netdev_irqname

From: Stephen Hemminger <[email-masked]>
Date: Tue, 21 Jun 2011 10:05:44 -0700

New standard function for generating irq names.

Signed-off-by: Stephen Hemminger <[email-masked]>

--- a/drivers/net/ixgbe/ixgbe_main.c	2011-06-21 09:30:35.327952251 -0700
+++ b/drivers/net/ixgbe/ixgbe_main.c	2011-06-21 09:32:33.483952184 -0700
@@ -2352,20 +2352,19 @@ static int ixgbe_request_msix_irqs(struc
 		struct ixgbe_q_vector *q_vector = adapter->q_vector[vector];
 		handler = SET_HANDLER(q_vector);
 
-		if (handler == &ixgbe_msix_clean_rx) {
-			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
-			         "%s-%s-%d", netdev->name, "rx", ri++);
-		} else if (handler == &ixgbe_msix_clean_tx) {
-			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
-			         "%s-%s-%d", netdev->name, "tx", ti++);
-		} else if (handler == &ixgbe_msix_clean_many) {
-			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
-			         "%s-%s-%d", netdev->name, "TxRx", ri++);
+		if (handler == &ixgbe_msix_clean_rx)
+			netdev_irqname(q_vector->name, sizeof(q_vector->name),
+				       netdev, NETIF_IRQ_RX, ri++);
+		else if (handler == &ixgbe_msix_clean_tx)
+			netdev_irqname(q_vector->name, sizeof(q_vector->name),
+				       netdev, NETIF_IRQ_TX, ti++);
+		else if (handler == &ixgbe_msix_clean_many) {
+			netdev_irqname(q_vector->name, sizeof(q_vector->name),
+				       netdev, NETIF_IRQ_TXRX, ri++);
 			ti++;
-		} else {
-			/* skip this unused q_vector */
+		} else /* skip this unused q_vector */
 			continue;
-		}
+
 		err = request_irq(adapter->msix_entries[vector].vector,
 				  handler, 0, q_vector->name,
 				  q_vector);