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:	Tue, 13 Mar 2012 15:42:36 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Andrew Miller <amiller@...lx.com>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: rtl8187se: r8180_core.c: Fix coding style issue

On Sat, Mar 10, 2012 at 11:32:33PM -0500, Andrew Miller wrote:
> Fix long line coding style issue
> 
> Signed-off-by: Andrew Miller <amiller@...lx.com>
> ---
>  drivers/staging/rtl8187se/r8180_core.c |  556 ++++++++++++++++++++++----------
>  1 files changed, 386 insertions(+), 170 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
> index 04c2391..05f25eb 100644
> --- a/drivers/staging/rtl8187se/r8180_core.c
> +++ b/drivers/staging/rtl8187se/r8180_core.c
> @@ -79,8 +79,11 @@ module_param(hwwep, int, S_IRUGO|S_IWUSR);
>  module_param(channels, int, S_IRUGO|S_IWUSR);
>  
>  MODULE_PARM_DESC(devname, " Net interface name, wlan%d=default");
> -MODULE_PARM_DESC(hwseqnum, " Try to use hardware 802.11 header sequence numbers. Zero=default");
> -MODULE_PARM_DESC(hwwep, " Try to use hardware WEP support. Still broken and not available on all cards");
> +MODULE_PARM_DESC(hwseqnum, " Try to use hardware 802.11 header sequence "
> +				"numbers. Zero=default");
> +MODULE_PARM_DESC(hwwep, " Try to use hardware WEP support. "
> +			"Still broken and not"
> +			" available on all cards");

Never break up strings, you can ignore those warnings, they are foolish.

> -void buffer_free(struct net_device *dev, struct buffer **buffer, int len, short consistent)
> +void buffer_free(struct net_device *dev,
> +		struct buffer **buffer,
> +		int len,
> +		short consistent)

Nicer, but how about:
void buffer_free(struct net_device *dev, struct buffer **buffer, int len,
		 short consistent)

Instead?  No need to put every variable on a new line, and this lines
things up better.

>  {
>  
>  	struct buffer *tmp, *next;
> @@ -516,7 +523,8 @@ short check_nic_enought_desc(struct net_device *dev, int priority)
>  	struct ieee80211_device *ieee = netdev_priv(dev);
>  	int requiredbyte, required;
>  
> -	requiredbyte = priv->ieee80211->fts + sizeof(struct ieee80211_header_data);
> +	requiredbyte = priv->ieee80211->fts +
> +		sizeof(struct ieee80211_header_data);
>  
>  	if (ieee->current_network.QoS_Enable)
>  		requiredbyte += 2;
> @@ -982,49 +990,70 @@ short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
>  
>  		switch (addr) {
>  		case TX_MANAGEPRIORITY_RING_ADDR:
> -			if (-1 == buffer_add(&(priv->txmapbufs), buf, dma_tmp, NULL)) {
> +			if (-1 == buffer_add(&(priv->txmapbufs),
> +					buf,
> +					dma_tmp,
> +					NULL)) {

That's just harder to read, no need to do this, right?

Be wise in your cleanup, you don't have to fix up every warning, do the
ones that make sense.

Care to retry?

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