]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/netconsole.c
OMAP1: clock: Typo fix for clock in omap1
[linux-2.6-omap-h63xx.git] / drivers / net / netconsole.c
index 9681618c32321912c522e9953cd71eac4db06443..eceadf787a67d5762cad157b5104a033f952a063 100644 (file)
@@ -294,30 +294,25 @@ static ssize_t show_remote_port(struct netconsole_target *nt, char *buf)
 
 static ssize_t show_local_ip(struct netconsole_target *nt, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n",
-                       HIPQUAD(nt->np.local_ip));
+       return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.local_ip);
 }
 
 static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n",
-                       HIPQUAD(nt->np.remote_ip));
+       return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.remote_ip);
 }
 
 static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
 {
        struct net_device *dev = nt->np.dev;
+       static const u8 bcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
-       DECLARE_MAC_BUF(mac);
-       return snprintf(buf, PAGE_SIZE, "%s\n", dev ?
-                       print_mac(mac, dev->dev_addr) : "ff:ff:ff:ff:ff:ff");
+       return snprintf(buf, PAGE_SIZE, "%pM\n", dev ? dev->dev_addr : bcast);
 }
 
 static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf)
 {
-       DECLARE_MAC_BUF(mac);
-       return snprintf(buf, PAGE_SIZE, "%s\n",
-                       print_mac(mac, nt->np.remote_mac));
+       return snprintf(buf, PAGE_SIZE, "%pM\n", nt->np.remote_mac);
 }
 
 /*
@@ -441,7 +436,7 @@ static ssize_t store_local_ip(struct netconsole_target *nt,
                return -EINVAL;
        }
 
-       nt->np.local_ip = ntohl(in_aton(buf));
+       nt->np.local_ip = in_aton(buf);
 
        return strnlen(buf, count);
 }
@@ -457,7 +452,7 @@ static ssize_t store_remote_ip(struct netconsole_target *nt,
                return -EINVAL;
        }
 
-       nt->np.remote_ip = ntohl(in_aton(buf));
+       nt->np.remote_ip = in_aton(buf);
 
        return strnlen(buf, count);
 }