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]
Date:	Wed, 16 Sep 2015 21:57:02 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Raphaël Beamonte <raphael.beamonte@...il.com>
Cc:	Cristina Opriceana <cristina.opriceana@...il.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary
 variables to keep lines under 80 characters

On Fri, Sep 11, 2015 at 03:29:11AM -0400, Raphaël Beamonte wrote:
> Add some temporary variables to reduce line length under the maximum
> of 80 characters, as per the kernel code style.
> 
> Signed-off-by: Raphaël Beamonte <raphael.beamonte@...il.com>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c | 139 ++++++++++++++++++++++-----------
>  1 file changed, 94 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 37c17eb..c8724cd 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -177,6 +177,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
>  {
>  	int i, max_chan = -1, min_chan = -1;
>  	struct ieee80211_device *ieee = priv->ieee80211;
> +	struct CHANNEL_LIST cl;
>  
>  	switch (channel_plan) {
>  	case COUNTRY_CODE_FCC:
> @@ -200,15 +201,18 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
>  				 "unknown rf chip, can't set channel map in function:%s()\n",
>  				 __func__);
>  		}
> -		if (ChannelPlan[channel_plan].Len != 0) {
> +		cl = ChannelPlan[channel_plan];
> +		if (cl.Len != 0) {
>  			/* Clear old channel map */
>  			memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
>  			       sizeof(GET_DOT11D_INFO(ieee)->channel_map));
>  			/* Set new channel map */
> -			for (i = 0; i < ChannelPlan[channel_plan].Len; i++) {
> -				if (ChannelPlan[channel_plan].Channel[i] < min_chan || ChannelPlan[channel_plan].Channel[i] > max_chan)
> +			for (i = 0; i < cl.Len; i++) {
> +				u8 chan = cl.Channel[i];
> +
> +				if (chan < min_chan || chan > max_chan)
>  					break;
> -				GET_DOT11D_INFO(ieee)->channel_map[ChannelPlan[channel_plan].Channel[i]] = 1;
> +				GET_DOT11D_INFO(ieee)->channel_map[chan] = 1;
>  			}
>  		}
>  		break;
> @@ -1699,9 +1703,12 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
>  					  &zero, 0, tx_zero_isr, dev);
>  			status = usb_submit_urb(tx_urb_zero, GFP_ATOMIC);
>  			if (status) {
> +				atomic_t tx =
> +					priv->tx_pending[tcb_desc->queue_index];
> +
>  				RT_TRACE(COMP_ERR,
>  					 "Error TX URB for zero byte %d, error %d",
> -					 atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
> +					 atomic_read(&tx),
>  					 status);
>  				return -1;
>  			}
> @@ -1748,8 +1755,9 @@ static short rtl8192_usb_initendpoints(struct net_device *dev)
>  		oldaddr = priv->oldaddr;
>  		align = ((long)oldaddr) & 3;
>  		if (align) {
> -			newaddr = oldaddr + 4 - align;
> -			priv->rx_urb[16]->transfer_buffer_length = 16 - 4 + align;
> +			align = 4 - align;
> +			newaddr = oldaddr + align;
> +			priv->rx_urb[16]->transfer_buffer_length = 16 - align;

At a quick glance, this conversion looks wrong...

And it's not what your changelog text said you were doing :(

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ