Skip to content

Commit bf1099b

Browse files
jacob-kellerJeff Kirsher
authored andcommitted
i40e: use %pI4b instead of byte swapping before dev_err
Fix warnings regarding restricted __be32 type usage by strictly specifying the type of the ipv4 address being printed in the dev_err statement. Signed-off-by: Jacob Keller <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent d0fda04 commit bf1099b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7213,8 +7213,7 @@ static int i40e_parse_cls_flower(struct i40e_vsi *vsi,
72137213
if (mask->dst == cpu_to_be32(0xffffffff)) {
72147214
field_flags |= I40E_CLOUD_FIELD_IIP;
72157215
} else {
7216-
mask->dst = be32_to_cpu(mask->dst);
7217-
dev_err(&pf->pdev->dev, "Bad ip dst mask %pI4\n",
7216+
dev_err(&pf->pdev->dev, "Bad ip dst mask %pI4b\n",
72187217
&mask->dst);
72197218
return I40E_ERR_CONFIG;
72207219
}
@@ -7224,8 +7223,7 @@ static int i40e_parse_cls_flower(struct i40e_vsi *vsi,
72247223
if (mask->src == cpu_to_be32(0xffffffff)) {
72257224
field_flags |= I40E_CLOUD_FIELD_IIP;
72267225
} else {
7227-
mask->src = be32_to_cpu(mask->src);
7228-
dev_err(&pf->pdev->dev, "Bad ip src mask %pI4\n",
7226+
dev_err(&pf->pdev->dev, "Bad ip src mask %pI4b\n",
72297227
&mask->src);
72307228
return I40E_ERR_CONFIG;
72317229
}

0 commit comments

Comments
 (0)