mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4
Convert netmask to __be32 and format it with %pI4 Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Konrad Rzeszutek <[email protected]> Reviewed-by: Mike Christie <[email protected]> Cc: Peter Jones <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
parent
6ebdc661b6
commit
00e7825b94
1 changed files with 3 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue