Skip to content

Commit 088f8a2

Browse files
Alex Elderkuba-moo
authored andcommitted
net: ipa: be explicit about endianness
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>
1 parent e6cdd6d commit 088f8a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ipa/ipa_endpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ static void ipa_endpoint_init_hdr_metadata_mask(struct ipa_endpoint *endpoint)
588588

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

593593
iowrite32(val, endpoint->ipa->reg_virt + offset);
594594
}

0 commit comments

Comments
 (0)