[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191008120116.GF25098@kadam>
Date: Tue, 8 Oct 2019 15:01:16 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Jerome Pouiller <Jerome.Pouiller@...abs.com>
Cc: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/7] staging: wfx: correctly cast data on big-endian
targets
On Tue, Oct 08, 2019 at 09:43:00AM +0000, Jerome Pouiller wrote:
> From: Jérôme Pouiller <jerome.pouiller@...abs.com>
>
> When built for a big-endian target, original code caused error:
>
> include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int *}' but argument is of type 'struct hif_mib_protected_mgmt_policy *'
>
> Fixes: f95a29d40782 ("staging: wfx: add HIF commands helpers")
> Reported-by: kbuild test robot <lkp@...el.com>
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
> ---
> drivers/staging/wfx/hif_tx_mib.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h
> index 167c5dec009f..4f132348f5fa 100644
> --- a/drivers/staging/wfx/hif_tx_mib.h
> +++ b/drivers/staging/wfx/hif_tx_mib.h
> @@ -145,7 +145,7 @@ static inline int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required)
> }
> if (!required)
> val.unpmf_allowed = 1;
> - cpu_to_le32s(&val);
> + cpu_to_le32s((uint32_t *) &val);
Again, this is fine for now, but in the future there shouldn't be a
space after the cast. It's to mark that it's a high precedence
operation.
cpu_to_le32s((uint32_t *)&val);
regards,
dan carpenter
Powered by blists - more mailing lists