netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] nfc: store __be16 value in __be16 variable
@ 2023-06-08 11:21 Simon Horman
  2023-06-08 23:29 ` Samudrala, Sridhar
  2023-06-09  4:23 ` Kalesh Anakkur Purayil
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Horman @ 2023-06-08 11:21 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Krzysztof Kozlowski, Luca Ceresoli, Michael Walle,
	Uwe Kleine-König, netdev

Use a __be16 variable to store the store the big endian value of header
in nxp_nci_i2c_fw_read().

Flagged by sparse as:

 .../i2c.c:113:22: warning: cast to restricted __be16

No functional changes intended.
Compile tested only.

Signed-off-by: Simon Horman <horms@kernel.org>
---
 drivers/nfc/nxp-nci/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index baddaf242d18..dca25a0c2f33 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -97,8 +97,8 @@ static int nxp_nci_i2c_fw_read(struct nxp_nci_i2c_phy *phy,
 			       struct sk_buff **skb)
 {
 	struct i2c_client *client = phy->i2c_dev;
-	u16 header;
 	size_t frame_len;
+	__be16 header;
 	int r;
 
 	r = i2c_master_recv(client, (u8 *) &header, NXP_NCI_FW_HDR_LEN);


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-09  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 11:21 [PATCH net-next] nfc: store __be16 value in __be16 variable Simon Horman
2023-06-08 23:29 ` Samudrala, Sridhar
2023-06-09  4:23 ` Kalesh Anakkur Purayil
2023-06-09  8:44   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).