aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-01-14 11:34:19 -0500
committerKonrad Rzeszutek Wilk <konrad@kernel.org>2010-02-26 16:02:14 -0500
commit00e7825b943f486e80ff1305cd0594d8791870f8 (patch)
treee30ebefa147e658d52aa54139f991d8af3c5a727 /drivers
parent6ebdc661b608671e9ca572af8bb42d58108cc008 (diff)
drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4
Convert netmask to __be32 and format it with %pI4 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Konrad Rzeszutek <ketuzsezr@darnok.org> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Peter Jones <pjones@redhat.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firmware/iscsi_ibft.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 051d1ebbd287..f82bcdae130b 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -381,7 +381,7 @@ static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry,
381 void *ibft_loc = entry->header; 381 void *ibft_loc = entry->header;
382 char *str = buf; 382 char *str = buf;
383 char *mac; 383 char *mac;
384 int val; 384 __be32 val;
385 385
386 if (!nic) 386 if (!nic)
387 return 0; 387 return 0;
@@ -397,10 +397,8 @@ static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry,
397 str += sprintf_ipaddr(str, nic->ip_addr); 397 str += sprintf_ipaddr(str, nic->ip_addr);
398 break; 398 break;
399 case ibft_eth_subnet_mask: 399 case ibft_eth_subnet_mask:
400 val = ~((1 << (32-nic->subnet_mask_prefix))-1); 400 val = cpu_to_be32(~((1 << (32-nic->subnet_mask_prefix))-1));
401 str += sprintf(str, NIPQUAD_FMT, 401 str += sprintf(str, "%pI4", &val);
402 (u8)(val >> 24), (u8)(val >> 16),
403 (u8)(val >> 8), (u8)(val));
404 break; 402 break;
405 case ibft_eth_origin: 403 case ibft_eth_origin:
406 str += sprintf(str, "%d\n", nic->origin); 404 str += sprintf(str, "%d\n", nic->origin);