[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1267219629-31536-2-git-send-email-konrad@kernel.org>
Date: Fri, 26 Feb 2010 21:27:08 +0000
From: Konrad Rzeszutek Wilk <konrad@...nel.org>
To: torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Cc: greg@...ah.com, michaelc@...wisc.edu, pjones@...hat.com,
Joe Perches <joe@...ches.com>,
Konrad Rzeszutek <ketuzsezr@...nok.org>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Konrad Rzeszutek Wilk <konrad@...nel.org>
Subject: [PATCH 1/2] drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4
From: Joe Perches <joe@...ches.com>
Convert netmask to __be32 and format it with %pI4
Signed-off-by: Joe Perches <joe@...ches.com>
Signed-off-by: Konrad Rzeszutek <ketuzsezr@...nok.org>
Reviewed-by: Mike Christie <michaelc@...wisc.edu>
Cc: Peter Jones <pjones@...hat.com>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@...nel.org>
---
drivers/firmware/iscsi_ibft.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 051d1eb..f82bcda 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,
void *ibft_loc = entry->header;
char *str = buf;
char *mac;
- int val;
+ __be32 val;
if (!nic)
return 0;
@@ -397,10 +397,8 @@ static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry,
str += sprintf_ipaddr(str, nic->ip_addr);
break;
case ibft_eth_subnet_mask:
- val = ~((1 << (32-nic->subnet_mask_prefix))-1);
- str += sprintf(str, NIPQUAD_FMT,
- (u8)(val >> 24), (u8)(val >> 16),
- (u8)(val >> 8), (u8)(val));
+ val = cpu_to_be32(~((1 << (32-nic->subnet_mask_prefix))-1));
+ str += sprintf(str, "%pI4", &val);
break;
case ibft_eth_origin:
str += sprintf(str, "%d\n", nic->origin);
--
1.7.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists