From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: RAGHAVENDRA GANIGA
<ravi23ganiga-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] i2c: i2c-core: fix coding style issues in i2c-core.c
Date: Tue, 14 Jan 2014 19:37:02 +0100 [thread overview]
Message-ID: <20140114183702.GC10340@katana> (raw)
In-Reply-To: <525C0C5B.6040703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]
On Mon, Oct 14, 2013 at 08:53:07PM +0530, RAGHAVENDRA GANIGA wrote:
> From b21e6a52aa9c36e8c01173cff13bbfd2a380d0bd Mon Sep 17 00:00:00 2001
> From: Raghavendra Ganiga <ravi23ganiga-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Mon, 14 Oct 2013 00:29:08 +0530
> Subject: [PATCH 2/3] i2c: i2c-core: fix coding style issues in i2c-core.c
>
> This is a patch to the i2c-core.c file that fixes up warnings and
> the code indent error reported by the checkpatch.pl tool
Please describe which warnings.
> @@ -1737,9 +1735,10 @@ int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
> if (adap->algo->master_xfer) {
> #ifdef DEBUG
> for (ret = 0; ret < num; ret++) {
> - dev_dbg(&adap->dev, "master_xfer[%d] %c, addr=0x%02x, "
> - "len=%d%s\n", ret, (msgs[ret].flags & I2C_M_RD)
> - ? 'R' : 'W', msgs[ret].addr, msgs[ret].len,
> + dev_dbg(&adap->dev, "master_xfer[%d] %c, addr=0x%02x, len=%d%s\n",
> + ret,
> + ((msgs[ret].flags & I2C_M_RD) ? 'R' : 'W'),
> + msgs[ret].addr, msgs[ret].len,
> (msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : "");
You added some extra paranthesis here? No need to. Also ret doesn't need
to be in a seperate line.
> }
> #endif
> @@ -1905,8 +1904,9 @@ static int i2c_detect_address(struct i2c_client *temp_client,
>
> /* Consistency check */
> if (info.type[0] == '\0') {
> - dev_err(&adapter->dev, "%s detection function provided "
> - "no name for 0x%x\n", driver->driver.name,
> + dev_err(&adapter->dev,
> + "%s detection function provided no name for 0x%x\n",
> + driver->driver.name,
> addr);
'addr' is dangling.
And merge 1/3 into it.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2014-01-14 18:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 15:23 [PATCH 2/3] i2c: i2c-core: fix coding style issues in i2c-core.c RAGHAVENDRA GANIGA
[not found] ` <525C0C5B.6040703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-14 18:37 ` Wolfram Sang [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=20140114183702.GC10340@katana \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ravi23ganiga-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).