Skip to contentSkip to conversation

IBFT patches for 2.6.33-rc8

PATCH New Konrad Rzeszutek Wilk 1 participant 2 messages Feb 17, 2010 iSCSI boot firmware table (iBFT) driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IBFT patches for 2.6.33-rc8

Here is a IBFT patch for 2.6.33-rc8.

Please pull from:

	master.kernel.org:/pub/scm/linux/kernel/git/ibft-2.6.git/

The patch has been in the mm-tree.

-----

 drivers/firmware/iscsi_ibft.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
#1 lore raw

PATCH 1/1 drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4

From: Joe Perches <[email protected]>

Convert netmask to __be32 and format it with %pI4

---
 drivers/firmware/iscsi_ibft.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
drivers/firmware/iscsi_ibft.c +3 -5
index 051d1eb..f82bcda 100644
@@ -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);
Signature · 1 line
1.7.0