Skip to contentSkip to conversation

nfc: nxp-nci: store __be16 value in __be16 variable

PATCH Applied Simon Horman 3 participants 3 messages Jun 9, 2023 – Jun 12, 2023

Subsystems (4)
lore
Share & tools
lore

Simon Horman

author reviewer
#0 lore raw

PATCH v2 1/1 nfc: nxp-nci: store __be16 value in __be16 variable

Use a __be16 variable to 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.

---
Changes in v2:
- Corrected grammar in patch description (Kalesh Anakkur Purayil)
- Added reviewed-by tag from Sridhar Samudrala
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/nfc/nxp-nci/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/nxp-nci/i2c.c +1 -1
index baddaf242d18..dca25a0c2f33 100644
@@ -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);
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines · Simon Horman

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

Flagged by Sparse as:

Quoted 7 lines

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

No functional changes intended.
Compile tested only.

Best regards,
Krzysztof

#2 lore raw
In reply to Simon Horman
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 8 lines · On Fri, 09 Jun 2023 15:31:57 +0200 you wrote:

Use a __be16 variable to 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

[...]

Here is the summary with links:
- [net-next,v2] nfc: nxp-nci: store __be16 value in __be16 variable

    https://git.kernel.org/netdev/net-next/c/f2ea0c3582ab

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html