Skip to content

Commit

Permalink
net: ipa: be explicit about endianness
Browse files Browse the repository at this point in the history
Sparse warns that the assignment of the metadata mask for a QMAP
endpoint in ipa_endpoint_init_hdr_metadata_mask() is a bad
assignment.  We know we want the mask value to be big endian, even
though the value we write is in host byte order.  Use a __force
tag to indicate we really mean it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Alex Elder authored and Jakub Kicinski committed Feb 2, 2021
1 parent e6cdd6d commit 088f8a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static void ipa_endpoint_init_hdr_metadata_mask(struct ipa_endpoint *endpoint)

/* Note that HDR_ENDIANNESS indicates big endian header fields */
if (endpoint->data->qmap)
val = cpu_to_be32(IPA_ENDPOINT_QMAP_METADATA_MASK);
val = (__force u32)cpu_to_be32(IPA_ENDPOINT_QMAP_METADATA_MASK);

iowrite32(val, endpoint->ipa->reg_virt + offset);
}
Expand Down

0 comments on commit 088f8a2

Please sign in to comment.