On Fri, Feb 07, 2014 at 12:45:26AM +0530, Gokulnath A wrote:
> Fixed all the errors related to space prohibition found by 
> checkpatch.pl script
> 
> Signed-off-by: Gokulnath A <gokulnath.avanashilin...@in.bosch.com>
> ---
>  drivers/staging/rtl8821ae/pci.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c
> index 694366e..8e28890 100644
> --- a/drivers/staging/rtl8821ae/pci.c
> +++ b/drivers/staging/rtl8821ae/pci.c
> @@ -756,17 +756,17 @@ static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw 
> *hw,
>       if (rtlpriv->use_new_trx_flow) {
>               rtlpriv->cfg->ops->set_desc(hw, (u8 *) entry, false,
>                                           HW_DESC_RX_PREPARE,
> -                                         (u8 *) & bufferaddress);
> +                                         (u8 *) &bufferaddress);

There shouldn't be a space after the cast.  (This is one of those
unwritten rules).  Leaving the space out reminds you that casting is a
high precedence operation.

Really we shouldn't be casting to (u8 *) anyway.  When you see a lot of
casting like this on every single line then it means something is wrong.
If we pass anything besides a u32 then it ends up corrupting memory.
The (struct rtl_hal_ops)->set_desc() pointer should be updated to take
u32 pointers.

regards,
dan carpenter

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to