From: Simon Horman Date: Fri, 9 Jun 2023 13:31:57 +0000 (+0200) Subject: nfc: nxp-nci: store __be16 value in __be16 variable X-Git-Tag: v6.6.17~4555^2~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2ea0c3582abc721ce9e090cf496b96e6b204e2c;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Sridhar Samudrala Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller --- diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index baddaf2..dca25a0 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);