nfc: nxp-nci: store __be16 value in __be16 variable
Subsystems (4)
Simon Horman
reviewerPATCH 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
@@ -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 );
Quoted 5 lines · Simon Horman
Use a
__be16variable to store the big endian value of header innxp_nci_i2c_fw_read().Flagged by Sparse as:
Quoted 7 lines
.../i2c.c:113:22: warning: cast to restricted__be16No functional changes intended.
Compile tested only.Signed-off-by Simon Horman <[email protected]>Reviewed-by Sridhar Samudrala <[email protected]>
Best regards,
Krzysztof
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
__be16variable to store the big endian value of header innxp_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