linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: i2ctools/i2cset: Remove obsolete means to specify value mask
Date: Sun, 13 Feb 2011 09:25:34 -0800	[thread overview]
Message-ID: <20110213172534.GC13323@ericsson.com> (raw)
In-Reply-To: <20110213180555.1f364a41-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>

Hi Jean,

On Sun, Feb 13, 2011 at 12:05:55PM -0500, Jean Delvare wrote:
[ ... ]
> >
> > No good idea how to split it, though.
> 
> Well, if nothing else, you have two changes mentioned in file CHANGES.
> This would seem to be a natural split point.
> 
> You may think it's not worth it because one of the patches will be
> pretty small. However, please remember that the time it takes to review
> a patch is more or less proportional to the square of its length [1].
> So even moving 10% of a patch to another may result in significant
> review time savings.
> 
> [1] This totally arbitrary and unproven statement is known as Jean
> Delvare's rule ;)
> 
I like that ;). I'll see what I can do.

[ ... ]

> > > >  
> > > > -	/* check for block data */
> > > >  	len = 0;
> > > 
> > > It's confusing why you initialize len here. I think it would make more
> > > sense to initialize it later, where you set it for block transactions.
> >
> > The compiler doesn't understand that len is only used for block transactions
> > in confirm(), and complains about an uninitialized variable otherwise.
> > So it needs to be initialized for all commands.
> 
> Sorry, I should have empathized my point. Once again:
> 
> It's confusing why you initialize len _here_.
> 
> > Let me know if you have a better idea how to handle this - I don't like it
> > too much either. For now I just added a comment explaining the reason for
> > the initialization.
> 
> I get that it has to be initialized. I just don't think this is the
> most logical place.
> 
Ah, now I understand. I moved it to just before 
	switch (size)

The current location is actually a leftover from the old code. 

Thanks,
Guenter

      parent reply	other threads:[~2011-02-13 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 16:19 i2ctools/i2cset: Remove obsolete means to specify value mask Guenter Roeck
     [not found] ` <20110131161945.GA4197-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-02-13 10:23   ` Jean Delvare
     [not found]     ` <20110213112305.615c291b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-02-13 16:41       ` Guenter Roeck
     [not found]         ` <20110213164141.GA13323-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-02-13 17:05           ` Jean Delvare
     [not found]             ` <20110213180555.1f364a41-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-02-13 17:25               ` Guenter Roeck [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=20110213172534.GC13323@ericsson.com \
    --to=guenter.roeck-izefyvvap7pwk0htik3j/w@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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).