lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/3] i2c: xilinx: Fix i2c checkpatch warnings
From
Date
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...




\
 
 \ /
  Last update: 2013-10-10 16:21    [W:0.217 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site