[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230608-nxp-nci-be16-v2-1-cd9fa22a41fd@kernel.org>
Date: Fri, 09 Jun 2023 15:31:57 +0200
From: Simon Horman <horms@...nel.org>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Luca Ceresoli <luca.ceresoli@...tlin.com>, Michael Walle <michael@...le.cc>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Sridhar Samudrala <sridhar.samudrala@...el.com>,
Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>,
netdev@...r.kernel.org
Subject: [PATCH net-next v2] 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.
Signed-off-by: Simon Horman <horms@...nel.org>
Reviewed-by: Sridhar Samudrala <sridhar.samudrala@...el.com>
---
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/20230608-nxp-nci-be16-v1-1-24a17345b27a@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);
Powered by blists - more mailing lists