Re: [PATCH 10/13] staging: r8188eu: Remove wrapper _enter_critical_mutex()

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

 



On Fri, Feb 14, 2014 at 04:54:14PM -0600, Larry Finger wrote:
> This wrapper returned the result of mutex_lock_interruptible(); however,
> none of the callers checked the returned value.

Then why is the code logic changing?

> 
> As a result of a gcc upgrade to version 4.8.1, two false unitialized variable
> warnings appeared. To silence the warnings, they are initialized to 0.
> 
> Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
> ---
>  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c     | 3 ++-
>  drivers/staging/rtl8188eu/hal/usb_ops_linux.c     | 8 +++++---
>  drivers/staging/rtl8188eu/include/osdep_service.h | 9 ---------
>  drivers/staging/rtl8188eu/os_dep/os_intfs.c       | 3 ++-
>  4 files changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> index c197b22..e95a1ba 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> @@ -4429,7 +4429,8 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg
>  	if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
>  		return -1;
>  
> -	_enter_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL);
> +	if (mutex_lock_interruptible(&pxmitpriv->ack_tx_mutex))
> +		return -1;

That's not what the original code did, so this change could cause
problems, right?

> -static inline int _enter_critical_mutex(struct mutex *pmutex,
> -					unsigned long *pirqL)
> -{
> -	int ret;
> -
> -	ret = mutex_lock_interruptible(pmutex);
> -	return ret;
> -}

This didn't affect the caller function's code path...

I've applied this series up to here.

thanks,

greg k-h
_______________________________________________
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