From: Joe Perches <joe@perches.com>
To: Alessandro Ghedini <al3xbio@gmail.com>
Cc: gregkh@suse.de, Andrew.Elwell@gmail.com, mithlesh@linsyssoft.com,
svenne@krap.dk, jkosina@suse.cz, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: wlan-ng: fix many style issues in hfa384x_usb.c
Date: Fri, 23 Apr 2010 09:00:40 -0700 [thread overview]
Message-ID: <1272038440.1730.817.camel@Joe-Laptop.home> (raw)
In-Reply-To: <1272035706-12212-1-git-send-email-al3xbio@gmail.com>
On Fri, 2010-04-23 at 17:15 +0200, Alessandro Ghedini wrote:
> This patch fixes all the errors and most of the checkpatch.pl warnings
> and other style issues in the hfa384x_usb.c file
Hi Alessandro.
Almost there... One more pass and it should be good to go.
> @@ -351,7 +351,8 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags)
> hw->rx_urb_skb = skb;
>
> result = -ENOLINK;
> - if (!hw->wlandev->hwremoved && !test_bit(WORK_RX_HALT, &hw->usb_flags)) {
> + if (!hw->wlandev->hwremoved &&
> + !test_bit(WORK_RX_HALT, &hw->usb_flags)) {
This is more difficult to read and less standard than
if (!hw->wlandev->hwremoved &&
!test_bit(WORK_RX_HALT, &hw->usb_flags)) {
Please change it.
> @@ -2451,7 +2452,11 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
> currpage = HFA384x_ADDR_CMD_MKPAGE(pdaloc[i].cardaddr);
> curroffset = HFA384x_ADDR_CMD_MKOFF(pdaloc[i].cardaddr);
>
> - result = hfa384x_dormem_wait(hw, currpage, curroffset, buf, len); /* units of bytes */
> + result = hfa384x_dormem_wait(hw,
> + currpage,
> + curroffset,
> + buf,
> + len); /* units of bytes */
Try not to make function calls use separate lines for each argument
unless you've got a specific reason like a comment for each arg or
something.
> @@ -2610,20 +2617,21 @@ int hfa384x_drvr_start(hfa384x_t *hw)
> result = result2 = hfa384x_cmd_initialize(hw);
> if (result1 != 0) {
> if (result2 != 0) {
> - printk(KERN_ERR
> - "cmd_initialize() failed on two attempts, results %d and %d\n",
> - result1, result2);
> + printk
> + (KERN_ERR "cmd_initialize() failed on two attempts,"
> + " results %d and %d\n",
> + result1, result2);
Please don't split the format strings.
As Richard Kennedy said, it makes grep less convenient.
Put the format on the same line as the printk and
use a newer checkpatch.pl.
I think all these should become single line
pr_<level>(fmt, args that fit before col 80);
or multiple lines like:
pr_<level>(fmt,
args until col 80,
more args if necessary);
That may be a personal nit though.
cheers, Joe
next prev parent reply other threads:[~2010-04-23 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 15:15 Alessandro Ghedini
2010-04-23 16:00 ` Joe Perches [this message]
2010-04-23 16:48 Alessandro Ghedini
2010-04-23 17:49 ` Joe Perches
2010-04-29 16:20 ` Greg KH
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=1272038440.1730.817.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=Andrew.Elwell@gmail.com \
--cc=al3xbio@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mithlesh@linsyssoft.com \
--cc=svenne@krap.dk \
/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
all inboxes | Powered by JetHome®