public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Matti J. Aaltonen" <matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
To: "Onkalo Samu.P (Nokia-MS/Tampere)"
	<samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Cc: "rpurdie-VuQAYsv1563Yd54FQh9/CA@public.gmane.org"
	<rpurdie-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/4] leds: Driver for National Semiconductors LP5523 chip
Date: Mon, 27 Sep 2010 14:03:37 +0300	[thread overview]
Message-ID: <1285585417.8182.201.camel@masi.mnp.nokia.com> (raw)
In-Reply-To: <1285584868.8182.194.camel-U1ola594hmgZeDAa2SinrdBPR1lH4CV8@public.gmane.org>

Hello.

My original intention was to send my comment directly to Samu. So an
apology to all of you who don't understand Finnish. Basically I was
commenting the use braces in the code fragments below...

Regards,
Matti 


On Mon, 2010-09-27 at 13:54 +0300, Matti J. Aaltonen wrote:
> Moi.
> 
> On Thu, 2010-09-16 at 12:12 +0200, Onkalo Samu.P (Nokia-MS/Tampere)
> wrote:
> > +
> > +       for (i = 0; i < LP5523_ENGINES; i++) {
> > +               if (chip->engines[i].mode == LP5523_CMD_LOAD)
> > +                       sysfs_remove_group(&dev->kobj, &lp5523_engine_group[i]);
> > +       }
> > +
> > +       for (i = 0; i < chip->num_leds; i++)
> > +               sysfs_remove_group(&chip->leds[i].cdev.dev->kobj,
> > +                               &lp5523_led_attribute_group);
> > +}
> 
> Tossa ylla on se asia, josta puhuttiin, style guide sanoo:
> 
> Do not unnecessarily use braces where a single statement will do.
> 
> if (condition)
> 	action();
> 
> Tossa ylla on kummankin for:in jalkeen single statement joista kumpikaan
> ei mahdu yhdelle riville... Mun nakemyksen mukaan ne molemmat olis yhta
> selkeita ilman sulkuja...
> 
> 
> > +       if (mode == LP5523_CMD_RUN)
> > +               ret = lp5523_run_program(engine);
> > +
> > +       else if (mode == LP5523_CMD_LOAD) {
> > +
> > +               lp5523_set_engine_mode(engine, LP5523_CMD_DISABLED);
> > +               lp5523_set_engine_mode(engine, LP5523_CMD_LOAD);
> > +
> > +               ret = sysfs_create_group(&dev->kobj, engine->attributes);
> > +               if (ret)
> > +                       return ret;
> > +       }
> > +
> 
> Aaltosulut myos if:n jalkeiseen statementtiin....
> 
> t.m.a.
> 
> 

  parent reply	other threads:[~2010-09-27 11:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 10:12 [PATCH 0/4] Led driver support for LP5521 and LP5523 chips Samu Onkalo
     [not found] ` <1284631946-5350-1-git-send-email-samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-09-16 10:12   ` [PATCH 1/4] leds: driver for National Semiconductor LP5521 chip Samu Onkalo
     [not found]     ` <1284631946-5350-2-git-send-email-samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-09-22  0:14       ` Ben Dooks
2010-09-16 10:12   ` [PATCH 3/4] leds: Update LP552x support Kconfig and Makefile Samu Onkalo
2010-09-27  9:21   ` [PATCH 0/4] Led driver support for LP5521 and LP5523 chips samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w
     [not found]     ` <62697B07E9803846BC582181BD6FB6B835EF64A9AA-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-09-28  9:00       ` Linus Walleij
     [not found]         ` <AANLkTi=N-p_ojTt6ia6bLxoA5AKC6rdZky9kvz_BqFqa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-28 14:14           ` Alan Cox
2010-09-28 19:59           ` Andrew Morton
2010-09-16 10:12 ` [PATCH 2/4] leds: Driver for National Semiconductors LP5523 chip Samu Onkalo
2010-09-27 10:54   ` Matti J. Aaltonen
     [not found]     ` <1285584868.8182.194.camel-U1ola594hmgZeDAa2SinrdBPR1lH4CV8@public.gmane.org>
2010-09-27 11:03       ` Matti J. Aaltonen [this message]
2010-09-16 10:12 ` [PATCH 4/4] Documentation: led drivers lp5521 and lp5523 Samu Onkalo
     [not found]   ` <1284631946-5350-5-git-send-email-samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-09-22 18:14     ` matt mooney

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=1285585417.8182.201.camel@masi.mnp.nokia.com \
    --to=matti.j.aaltonen-xnzwkgviw5gavxtiumwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rpurdie-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@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