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] [day] [month] [year] [list]
Date:   Sun, 12 Feb 2017 13:39:39 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Derek Robson <robsonde@...il.com>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/25] Staging: rtl8192u: r819xU_cmdpkt.c - style fix

On Sat, Feb 11, 2017 at 10:53:33PM +1300, Derek Robson wrote:
> Fixed style of block comments
> Found using checkpatch
> 
> Signed-off-by: Derek Robson <robsonde@...il.com>
> ---
>  drivers/staging/rtl8192u/r819xU_cmdpkt.c | 99 +++++++++++++++++++-------------
>  1 file changed, 60 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
> index 1168d133522e..671391a9cbf3 100644
> --- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
> +++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
> @@ -34,7 +34,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
>  	unsigned char	    *ptr_buf;
>  
>  	/* Get TCB and local buffer from common pool.
> -	   (It is shared by CmdQ, MgntQ, and USB coalesce DataQ) */
> +	 *  (It is shared by CmdQ, MgntQ, and USB coalesce DataQ)
> +	 */
>  	skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4);
>  	if (!skb)
>  		return RT_STATUS_FAILURE;
> @@ -76,7 +77,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
>   *  When		Who	Remark
>   *  05/12/2008		amy	Create Version 0 porting from windows code.
>   *
> - *---------------------------------------------------------------------------*/
> + *---------------------------------------------------------------------------
> + */
>  static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
>  {
>  	struct r8192_priv *priv = ieee80211_priv(dev);
> @@ -87,8 +89,9 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
>  					  (pu1Byte)(&rtState));
>  
>  	/* When RF is off, we should not count the packet for hw/sw synchronize
> -	   reason, ie. there may be a duration while sw switch is changed and
> -	   hw switch is being changed. */
> +	 *  reason, ie. there may be a duration while sw switch is changed and
> +	 *  hw switch is being changed.
> +	 */
>  	if (rtState == eRfOff)
>  		return;
>  #endif
> @@ -98,8 +101,9 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
>  		return;
>  #endif
>  	/* We can not know the packet length and transmit type:
> -	   broadcast or uni or multicast. So the relative statistics
> -	   must be collected in tx feedback info. */
> +	 * broadcast or uni or multicast. So the relative statistics
> +	 * must be collected in tx feedback info.
> +	 */
>  	if (pstx_fb->tok) {
>  		priv->stats.txfeedbackok++;
>  		priv->stats.txoktotal++;
> @@ -155,7 +159,8 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
>   *  When		Who	Remark
>   *  05/08/2008		amy	Create Version 0 porting from windows code.
>   *
> - *---------------------------------------------------------------------------*/
> + *---------------------------------------------------------------------------
> + */
>  static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
>  {
>  	struct r8192_priv *priv = ieee80211_priv(dev);
> @@ -163,18 +168,19 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
>  
>  	priv->stats.txfeedback++;
>  
> -	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
> -	/* It seems that FW use big endian(MIPS) and DRV use little endian in
> -	   windows OS. So we have to read the content byte by byte or transfer
> -	   endian type before copy the message copy. */
> -	/* Use pointer to transfer structure memory. */
> -	memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
> -	/* 2. Use tx feedback info to count TX statistics. */
> -	cmpk_count_txstatistic(dev, &rx_tx_fb);
> -	/* Comment previous method for TX statistic function. */
> -	/* Collect info TX feedback packet to fill TCB. */
> -	/* We can not know the packet length and transmit type: broadcast or uni
> -	   or multicast. */
> +	/* 1. Extract TX feedback info from RFD to temp structure buffer.
> +	 *    It seems that FW use big endian(MIPS) and DRV use little endian in
> +	 *    windows OS. So we have to read the content byte by byte or transfer
> +	 *    endian type before copy the message copy.
> +	 *    Use pointer to transfer structure memory.
> +	 *    memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
> +	 * 2. Use tx feedback info to count TX statistics.
> +	 *    cmpk_count_txstatistic(dev, &rx_tx_fb);
> +	 *    Comment previous method for TX statistic function.
> +	 *    Collect info TX feedback packet to fill TCB.
> +	 *    We can not know the packet length and transmit type: broadcast or uni
> +	 *    or multicast.
> +	 */
>  }
>  
>  static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)

Ouch!  This is not correct at all, luckily the compiler caught this
problem.

Please ALWAYS test your changes.  I've stopped applying the series here,
please fix up and resend.  And fix up the "just delete the unused
structures" issue as well.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ