Message ID | 20230608-nxp-nci-be16-v1-1-24a17345b27a@kernel.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] nfc: store __be16 value in __be16 variable | expand |
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 |
On 6/8/2023 4:21 AM, Simon Horman wrote: > 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 <horms@kernel.org> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com> > --- > 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); > >
On Thu, Jun 8, 2023 at 4:52 PM Simon Horman <horms@kernel.org> wrote: > Use a __be16 variable to store the store the big endian value of header > [Kalesh]: Minor nit, looks like a typo as "store the" is repeating. > 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> > --- > 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); > > >
On Fri, Jun 09, 2023 at 09:53:16AM +0530, Kalesh Anakkur Purayil wrote: > On Thu, Jun 8, 2023 at 4:52 PM Simon Horman <horms@kernel.org> wrote: > > > Use a __be16 variable to store the store the big endian value of header > > > [Kalesh]: Minor nit, looks like a typo as "store the" is repeating. Thanks, of course you are right. I'll address this in a v2.
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);
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 <horms@kernel.org> --- drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)