diff mbox series

[net-next,v2] nfc: nxp-nci: store __be16 value in __be16 variable

Message ID 20230608-nxp-nci-be16-v2-1-cd9fa22a41fd@kernel.org (mailing list archive)
State Accepted
Commit f2ea0c3582abc721ce9e090cf496b96e6b204e2c
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] nfc: nxp-nci: store __be16 value in __be16 variable | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 8
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Simon Horman June 9, 2023, 1:31 p.m. UTC
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>
---
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(-)

Comments

Krzysztof Kozlowski June 10, 2023, 10:08 a.m. UTC | #1
On 09/06/2023 15:31, Simon Horman wrote:
> 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>

Best regards,
Krzysztof
patchwork-bot+netdevbpf@kernel.org June 12, 2023, 8:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 09 Jun 2023 15:31:57 +0200 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [net-next,v2] nfc: nxp-nci: store __be16 value in __be16 variable
    https://git.kernel.org/netdev/net-next/c/f2ea0c3582ab

You are awesome, thank you!
diff mbox series

Patch

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);