lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190602171427.GE19671@kroah.com>
Date:   Sun, 2 Jun 2019 19:14:27 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Deepak Mishra <linux.dkm@...il.com>
Cc:     linux-kernel@...r.kernel.org, joe@...ches.com, wlanfae@...ltek.com,
        Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
        himadri18.07@...il.com, straube.linux@...il.com
Subject: Re: [PATCH v2 8/9] staging: rtl8712: fixed enable_rx_ff0_filter as
 bool and CamelCase

On Sun, Jun 02, 2019 at 03:55:37PM +0530, Deepak Mishra wrote:
> This patch fixes CamelCase blnEnableRxFF0Filter by renaming it
> to enable_rx_ff0_filter in drv_types.h and related files rtl871x_cmd.c
> xmit_linux.c
> It was reported by checkpatch.pl
> 
> This fix also makes enable_rx_ff0_filter a bool and uses true false than
> previously used u8 as suggested by joe@...ches.com
> 
> Signed-off-by: Deepak Mishra <linux.dkm@...il.com>
> ---
>  drivers/staging/rtl8712/drv_types.h   | 2 +-
>  drivers/staging/rtl8712/rtl871x_cmd.c | 2 +-
>  drivers/staging/rtl8712/xmit_linux.c  | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h
> index ddab6514a549..e3e2b32e964e 100644
> --- a/drivers/staging/rtl8712/drv_types.h
> +++ b/drivers/staging/rtl8712/drv_types.h
> @@ -164,7 +164,7 @@ struct _adapter {
>  	struct iw_statistics iwstats;
>  	int pid; /*process id from UI*/
>  	struct work_struct wk_filter_rx_ff0;
> -	u8 blnEnableRxFF0Filter;
> +	bool enable_rx_ff0_filter;
>  	spinlock_t lockRxFF0Filter;
>  	const struct firmware *fw;
>  	struct usb_interface *pusb_intf;
> diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
> index 05a78ac24987..6a8d58d97873 100644
> --- a/drivers/staging/rtl8712/rtl871x_cmd.c
> +++ b/drivers/staging/rtl8712/rtl871x_cmd.c
> @@ -238,7 +238,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
>  	mod_timer(&pmlmepriv->scan_to_timer,
>  		  jiffies + msecs_to_jiffies(SCANNING_TIMEOUT));
>  	padapter->ledpriv.LedControlHandler(padapter, LED_CTL_SITE_SURVEY);
> -	padapter->blnEnableRxFF0Filter = 0;
> +	padapter->enable_rx_ff0_filter = false;
>  	return _SUCCESS;
>  }
>  
> diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
> index e65a51c7f372..9fa1abcf5e50 100644
> --- a/drivers/staging/rtl8712/xmit_linux.c
> +++ b/drivers/staging/rtl8712/xmit_linux.c
> @@ -103,11 +103,11 @@ void r8712_SetFilter(struct work_struct *work)
>  	r8712_write8(padapter, 0x117, newvalue);
>  
>  	spin_lock_irqsave(&padapter->lockRxFF0Filter, irqL);
> -	padapter->blnEnableRxFF0Filter = 1;
> +	padapter->enable_rx_ff0_filter = true;
>  	spin_unlock_irqrestore(&padapter->lockRxFF0Filter, irqL);
>  	do {
>  		msleep(100);
> -	} while (padapter->blnEnableRxFF0Filter == 1);
> +	} while (padapter->enable_rx_ff0_filter == true);

That is horrible, and I'm amazed it ever even works.  Please fix this
properly, spinning on a random variable is not how you do
synchronization in the kernel.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ