summaryrefslogtreecommitdiff
path: root/drivers/nfc
diff options
context:
space:
mode:
authorSimon Horman <horms@kernel.org>2023-06-09 15:31:57 +0200
committerDavid S. Miller <davem@davemloft.net>2023-06-12 09:40:31 +0100
commitf2ea0c3582abc721ce9e090cf496b96e6b204e2c (patch)
treedec9a247bf3edf2a639308594ce304a039257ae3 /drivers/nfc
parentb803d1fded4085d268507a432dac8077ead68971 (diff)
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@kernel.org> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/nxp-nci/i2c.c2
1 files changed, 1 insertions, 1 deletions
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);