From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: elder@kernel.org, evgreen@chromium.org,
bjorn.andersson@linaro.org, cpratapa@codeaurora.org,
subashab@codeaurora.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net 2/4] net: ipa: be explicit about endianness
Date: Mon, 1 Feb 2021 17:26:07 -0600 [thread overview]
Message-ID: <20210201232609.3524451-3-elder@linaro.org> (raw)
In-Reply-To: <20210201232609.3524451-1-elder@linaro.org>
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>
---
drivers/net/ipa/ipa_endpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c
index 9f4be9812a1f3..448d89da1e456 100644
--- a/drivers/net/ipa/ipa_endpoint.c
+++ b/drivers/net/ipa/ipa_endpoint.c
@@ -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);
}
--
2.27.0
next prev parent reply other threads:[~2021-02-01 23:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 23:26 [PATCH net 0/4] net: ipa: a few bug fixes Alex Elder
2021-02-01 23:26 ` [PATCH net 1/4] net: ipa: add a missing __iomem attribute Alex Elder
2021-02-02 0:09 ` Amy Parker
2021-02-01 23:26 ` Alex Elder [this message]
2021-02-01 23:26 ` [PATCH net 3/4] net: ipa: use the right accessor in ipa_endpoint_status_skip() Alex Elder
2021-02-02 0:02 ` Amy Parker
2021-02-02 0:03 ` Amy Parker
2021-02-02 0:15 ` Alex Elder
2021-02-02 0:49 ` Amy Parker
2021-02-01 23:26 ` [PATCH net 4/4] net: ipa: fix two format specifier errors Alex Elder
2021-02-02 17:00 ` [PATCH net 0/4] net: ipa: a few bug fixes patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210201232609.3524451-3-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=cpratapa@codeaurora.org \
--cc=davem@davemloft.net \
--cc=elder@kernel.org \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox