diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/netconsole.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index d304d38cd5d1..eceadf787a67 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -294,14 +294,12 @@ static ssize_t show_remote_port(struct netconsole_target *nt, char *buf) | |||
294 | 294 | ||
295 | static ssize_t show_local_ip(struct netconsole_target *nt, char *buf) | 295 | static ssize_t show_local_ip(struct netconsole_target *nt, char *buf) |
296 | { | 296 | { |
297 | return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", | 297 | return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.local_ip); |
298 | HIPQUAD(nt->np.local_ip)); | ||
299 | } | 298 | } |
300 | 299 | ||
301 | static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) | 300 | static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) |
302 | { | 301 | { |
303 | return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", | 302 | return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.remote_ip); |
304 | HIPQUAD(nt->np.remote_ip)); | ||
305 | } | 303 | } |
306 | 304 | ||
307 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) | 305 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) |
@@ -438,7 +436,7 @@ static ssize_t store_local_ip(struct netconsole_target *nt, | |||
438 | return -EINVAL; | 436 | return -EINVAL; |
439 | } | 437 | } |
440 | 438 | ||
441 | nt->np.local_ip = ntohl(in_aton(buf)); | 439 | nt->np.local_ip = in_aton(buf); |
442 | 440 | ||
443 | return strnlen(buf, count); | 441 | return strnlen(buf, count); |
444 | } | 442 | } |
@@ -454,7 +452,7 @@ static ssize_t store_remote_ip(struct netconsole_target *nt, | |||
454 | return -EINVAL; | 452 | return -EINVAL; |
455 | } | 453 | } |
456 | 454 | ||
457 | nt->np.remote_ip = ntohl(in_aton(buf)); | 455 | nt->np.remote_ip = in_aton(buf); |
458 | 456 | ||
459 | return strnlen(buf, count); | 457 | return strnlen(buf, count); |
460 | } | 458 | } |