[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 10 Oct 2013 07:01:23 -0700
From: Joe Perches <joe@...ches.com>
To: Michal Simek <michal.simek@...inx.com>
Cc: linux-kernel@...r.kernel.org, monstr@...str.eu, wsa@...-dreams.de,
Kedareswara rao Appana <appana.durga.rao@...inx.com>,
Jean Delvare <khali@...ux-fr.org>,
Peter Korsgaard <jacmet@...site.dk>,
Kedareswara rao Appana <appanad@...inx.com>,
linux-i2c@...r.kernel.org
Subject: Re: [PATCH v3 1/3] i2c: xilinx: Fix i2c checkpatch warnings
On Thu, 2013-10-10 at 12:39 +0200, Michal Simek wrote:
> Code changes to fix checkpatch warnings listed below.
> - WARNING: quoted string split across lines
[]
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
[]
> @@ -271,11 +271,8 @@ static void xiic_read_rx(struct xiic_i2c *i2c)
>
> bytes_in_fifo = xiic_getreg8(i2c, XIIC_RFO_REG_OFFSET) + 1;
>
> - dev_dbg(i2c->adap.dev.parent, "%s entry, bytes in fifo: %d, msg: %d"
> - ", SR: 0x%x, CR: 0x%x\n",
> - __func__, bytes_in_fifo, xiic_rx_space(i2c),
> - xiic_getreg8(i2c, XIIC_SR_REG_OFFSET),
> - xiic_getreg8(i2c, XIIC_CR_REG_OFFSET));
> + dev_dbg(i2c->adap.dev.parent, "%s entry, bytes in fifo: %d, msg: %d",
> + __func__, bytes_in_fifo, xiic_rx_space(i2c));
This is a pretty odd way of silencing checkpatch
by eliminating content. Aren't the register values
useful information?
You've also removed the terminating newline.
It's necessary to avoid possible dmesg output log
message interleaving. Please put it back.
A more normal style fix would be to coalesce the
format. checkpatch will ignore lines exceeding
80 columns for these formats.
dev_dbg(i2c->adap.dev.parent, "%s entry, bytes in fifo: %d, msg: %d, SR: 0x%x, CR: 0x%x\n",
__func__, bytes_in_fifo, xiic_rx_space(i2c),
xiic_getreg8(i2c, XIIC_SR_REG_OFFSET),
xiic_getreg8(i2c, XIIC_CR_REG_OFFSET));
This passes checkpatch cleanly.
etc...
--
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