Re: [PATCH 5/8] staging:rtl8821ae fix ERROR: space prohibited after that

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.Avanashilingam@xxxxxxxxxxxx>
> ---
>  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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux