From: Greg KH <gregkh@linuxfoundation.org>
To: Andrew Miller <amiller@amilx.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8187se: r8180_core.c: Fix coding style issue
Date: Tue, 13 Mar 2012 15:42:36 -0700 [thread overview]
Message-ID: <20120313224236.GA12677@kroah.com> (raw)
In-Reply-To: <1331440353-2829-1-git-send-email-amiller@amilx.com>
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@amilx.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
next prev parent reply other threads:[~2012-03-13 22:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 4:32 [PATCH] Staging: rtl8187se: r8180_core.c: Fix coding style issue Andrew Miller
2012-03-13 22:42 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-14 0:58 Andrew Miller
2012-03-14 1:33 ` Joe Perches
2012-03-14 1:49 ` Andrew Miller
2012-03-14 2:12 ` Joe Perches
2012-03-14 2:33 ` Andrew Miller
2012-03-14 2:46 ` Joe Perches
2012-03-14 3:09 ` Larry Finger
2012-03-14 2:54 ` Greg KH
2012-03-14 4:18 ` Ryan Mallon
2012-03-14 4:49 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120313224236.GA12677@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amiller@amilx.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox