From: Jean Delvare <jdelvare@suse.de>
To: Richard Leitner <me@g0hl1n.net>
Cc: r.marek@assembler.cz, wsa@the-dreams.de,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: busses: ali1563: fix checkpatch.pl issues
Date: Fri, 11 Apr 2014 11:21:56 +0200 [thread overview]
Message-ID: <20140411112156.5e7e32c2@endymion.delvare> (raw)
In-Reply-To: <1397150924-7260-1-git-send-email-me@g0hl1n.net>
Hi Richard,
On Thu, 10 Apr 2014 19:28:44 +0200, Richard Leitner wrote:
> Fixed most checkpatch.pl issues
Thanks for doing this. Overall it looks good, there are just two
warnings I would like fixed slightly differently:
> @@ -268,13 +272,14 @@ static s32 ali1563_access(struct i2c_adapter * a, u16 addr,
> }
>
> outb_p(((addr & 0x7f) << 1) | (rw & 0x01), SMB_HST_ADD);
> - outb_p((inb_p(SMB_HST_CNTL2) & ~HST_CNTL2_SIZEMASK) | (size << 3), SMB_HST_CNTL2);
> + outb_p((inb_p(SMB_HST_CNTL2) & ~HST_CNTL2_SIZEMASK) |
> + (size << 3), SMB_HST_CNTL2);
Please align on the opening parenthesis.
> @@ -392,14 +398,15 @@ static struct i2c_adapter ali1563_adapter = {
> static int ali1563_probe(struct pci_dev *dev,
> const struct pci_device_id *id_table)
> {
> - int error;
> + int error = ali1563_setup(dev);
>
> - if ((error = ali1563_setup(dev)))
> + if (error)
> goto exit;
Please leave the variable declaration alone, so that the error check
can immediately follow the assignment, as was the case before. Anyway
it is not recommended to run "real code" during variable declaration.
With these changes applied, feel free to add:
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Thanks,
--
Jean Delvare
SUSE L3 Support
prev parent reply other threads:[~2014-04-11 9:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 17:28 [PATCH] i2c: busses: ali1563: fix checkpatch.pl issues Richard Leitner
2014-04-11 9:21 ` Jean Delvare [this message]
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=20140411112156.5e7e32c2@endymion.delvare \
--to=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@g0hl1n.net \
--cc=r.marek@assembler.cz \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).