From patchwork Thu Jun 8 11:21:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 13272148 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 77F4F63CF for ; Thu, 8 Jun 2023 11:21:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6186CC433D2; Thu, 8 Jun 2023 11:21:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686223306; bh=xdA8tN4jZ7ITP8RWRq/+oaJnbO5Hr0u4N0lUrl94O6A=; h=From:Date:Subject:To:Cc:From; b=RFzYmJe7kNzjpK1wNFq+fBCQe2wWEnQSpy1nh3bYYF7dg1pGnU1uZ1BYv1jSRi1r7 HOMQivSdxqO43bTYhjljo9nI9nKdk00fy3iToNQ0B1+qNHpVFzMTCbc1wqqGZQQyFE hB8W0PfwM+Zl+VHOgUKx7mPTFUN9V/m9xwqVCDTyFdGkNugfr9MVbXrs3fjaseYdXi P7eVJ1tdJ0YaMpNaoBIk/V9MoMpVtjdAcL4R+n8NWrv1ot37or5tJSWc7lO9DNNCbg FaVEM8qrZaf3BWT/vH61Agmgg9nIsBNRcNhA9sM/Ti8qX59YWCE+D7i8C6Ia1ee3iq oeQo7/OMyEE8Q== From: Simon Horman Date: Thu, 08 Jun 2023 13:21:15 +0200 Subject: [PATCH net-next] nfc: 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-v1-1-24a17345b27a@kernel.org> X-B4-Tracking: v=1; b=H4sIAKq5gWQC/x2NQQqDMBAAvyJ77kISi6b9SvGQxLUuyFYSlYD49 y4eZ2CYEwplpgLv5oRMBxf+iYJ9NJDmIF9CHpXBGdeazniUuqIkxki2Q9u3yb+cn/pnBE1iKIQ xB0mzRrIvi8o108T1fnxAaEOhusFwXX8AlVOjfQAAAA== 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?= , netdev@vger.kernel.org X-Mailer: b4 0.12.2 X-Patchwork-Delegate: kuba@kernel.org Use a __be16 variable to store the 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 --- 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);