public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>,
	trivial@kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trivial: adjust code alignment
Date: Mon, 5 Aug 2013 19:30:54 +0300	[thread overview]
Message-ID: <20130805163054.GN5102@mwanda> (raw)
In-Reply-To: <1375719427.3133.31.camel@joe-AO722>

On Mon, Aug 05, 2013 at 09:17:07AM -0700, Joe Perches wrote:
> On Mon, 2013-08-05 at 19:06 +0300, Dan Carpenter wrote:
> > On Mon, Aug 05, 2013 at 04:47:39PM +0200, Julia Lawall wrote:
> > > diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
> []
> > > @@ -1369,8 +1369,8 @@ static int ov7670_s_exp(struct v4l2_subdev *sd, int value)
> > >  	unsigned char com1, com8, aech, aechh;
> > >  
> > >  	ret = ov7670_read(sd, REG_COM1, &com1) +
> > > -		ov7670_read(sd, REG_COM8, &com8);
> > > -		ov7670_read(sd, REG_AECHH, &aechh);
> > > +	ov7670_read(sd, REG_COM8, &com8);
> > > +	ov7670_read(sd, REG_AECHH, &aechh);
> > >  	if (ret)
> > >  		return ret;
> > >  
> > 
> > The new indenting isn't correct here and anyway the intent was to
> > combine all the error codes together and return them as an error
> > code jumble.  I'm not a fan of error code jumbles, probably the
> > right thing is to check each function call or, barring that, to
> > return -EIO.
> 
> ov7670_read via i2c_transfer can return a positive # too.
> Perhaps all of these should be individually tested for "< 0".

You're misreading something.  ov7670_read_i2c() only returns zero
and negative error codes.

regards,
dan carpenter


  reply	other threads:[~2013-08-05 16:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 14:47 [PATCH] adjust code alignment Julia Lawall
2013-08-05 14:47 ` [PATCH] fs/nfs/inode.c: " Julia Lawall
2013-08-05 14:59   ` Myklebust, Trond
2013-08-06 18:04     ` Steve Dickson
2013-08-07  1:58       ` Dave Quigley
2013-08-05 14:47 ` [PATCH] drivers/scsi/lpfc/lpfc_init.c: " Julia Lawall
2013-08-05 14:47 ` [PATCH] net/vmw_vsock/af_vsock.c: drop unneeded semicolon Julia Lawall
2013-08-05 18:08   ` David Miller
2013-08-05 14:47 ` [PATCH] trivial: adjust code alignment Julia Lawall
2013-08-05 16:06   ` Dan Carpenter
2013-08-05 16:17     ` Joe Perches
2013-08-05 16:30       ` Dan Carpenter [this message]
2013-08-06  0:51         ` Joe Perches
2013-08-05 16:19     ` Julia Lawall
2013-08-05 16:24       ` walter harms
2013-08-05 16:28         ` Julia Lawall
2013-08-05 17:05         ` Dan Carpenter
2013-08-05 16:52       ` Jonathan Corbet

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=20130805163054.GN5102@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.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