diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 01:18:11 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 01:18:11 (GMT) |
commit | 41630959ed5ce694ec2e8c0f3c69743e011394c8 (patch) | |
tree | 868cfa36577ebfad69f78180656cdca313c7498d /drivers | |
parent | 2b8c70b2174402ca3dec13310ce56597233392d7 (diff) | |
parent | c4d1409bbed8cf2a11b48ce3a075e142f686a588 (diff) | |
download | linux-41630959ed5ce694ec2e8c0f3c69743e011394c8.tar.xz |
Merge branch 'ibft-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6
* 'ibft-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6:
ibft: Update MAINTAINERS file.
drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4
Diffstat (limited to 'drivers')
-rw-r--r-- | 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); |