From patchwork Fri Jun 9 13:31:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 13273966 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AF81747F for ; Fri, 9 Jun 2023 13:32:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F9F5C433EF; Fri, 9 Jun 2023 13:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686317530; bh=GzVyjaMKsSNVMyIcLo7GRDB/ojwZw/meKMPwZHpibwQ=; h=From:Date:Subject:To:Cc:From; b=pg21tS0He519d2oJnfWU3lvKGfWYooKUJAKp8DH7fWdjyHAhHiRkNbwLx4tvLvzfq QAlUktSlu7zvyCOw+xZXlODfEoZd8Lz0QFWI3eJYAXngBhLfwuZNBW6lax3R1vy1+B WGhgD9Jh2NvD80pfz7G0avRaYR7C2CNH3031isERLy5rXcJV+b529IS0rm13s6/fVY QRq+PxotEO/bwgKMTpN3e/AH4kwm5a76o5iYNdx6yFsK83sMO8GycMUwV75DiBf5fy S4bQd1QMnuxTcXn5WZkVcCMYhiEGalDU0dtgBc8cKGtOPY1ByurzHLBhr7/YhZcUd3 FrilxM+HDupeA== From: Simon Horman Date: Fri, 09 Jun 2023 15:31:57 +0200 Subject: [PATCH net-next v2] nfc: nxp-nci: store __be16 value in __be16 variable Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230608-nxp-nci-be16-v2-1-cd9fa22a41fd@kernel.org> X-B4-Tracking: v=1; b=H4sIAMwpg2QC/22NQQ6CMBBFr2Jm7RhaENCV9zAs2jrARDKQKRIM4 e42rF2+//PyNoikTBHupw2UFo48SgJ7PkHonXSE/EoMNrN5VmY1yjqhBEZPpkRT5aG+2bqtCg9 J8S4SenUS+iTJZxjSOCm1vB6NJwjNKLTO0KSn5ziP+j3iizn+/53FoEFbuNQrrt5W7vEmFRouo 3bQ7Pv+A1RpBQ7IAAAA To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Krzysztof Kozlowski , Luca Ceresoli , Michael Walle , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Sridhar Samudrala , Kalesh Anakkur Purayil , netdev@vger.kernel.org X-Mailer: b4 0.12.2 X-Patchwork-Delegate: kuba@kernel.org 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 --- 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);