From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Joe Perches <joe@perches.com>
Cc: Ryan Mallon <rmallon@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>,
Grant Likely <grant.likely@secretlab.ca>,
Len Brown <lenb@kernel.org>,
linux-kernel@vger.kernel.org,
David Cohen <david.a.cohen@intel.com>,
Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH v1.1] gpiolib: append SFI helpers for GPIO API
Date: Mon, 03 Jun 2013 11:16:19 +0300 [thread overview]
Message-ID: <1370247379.29283.240.camel@smile> (raw)
In-Reply-To: <1370225170.2096.12.camel@joe-AO722>
On Sun, 2013-06-02 at 19:06 -0700, Joe Perches wrote:
> On Mon, 2013-06-03 at 11:59 +1000, Ryan Mallon wrote:
> > On 31/05/13 19:27, Andy Shevchenko wrote:
> > Some trivial coding style comment below.
Thank you, Joe, for commenting this.
> > > + for (i = 0; i < sfi_gpio_num_entry; i++, pentry++) {
> > > + if (!strncmp(name, pentry->pin_name, SFI_NAME_LEN))
> > > + return pentry->pin_no;
> > > + }
> >
> > Nitpick - Don't need the braces on the for loop.
>
> I'm not Andy but I think it's preferable to keep the braces
> when there's an if in the for loop.
This is my point too.
> > > + sfi_gpio_table = kmalloc(num * sizeof(*pentry), GFP_KERNEL);
> >
> > Use kcalloc when you have a size and a count.
>
> kmalloc_array unless you want zero'ed memory
One proposed to use kmemdup to clean up a bit. What do you think?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2013-06-03 8:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 2:45 [PATCH v1 00/13] mrst refactoring patches Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 01/13] mrst: Fixed printk/pr_* related issues Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 02/13] mrst: Fixed indentation issues Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 03/13] mrst: Fixed checkpatch warnings Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 04/13] intel_mid: Renamed *mrst* to *intel_mid* Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 05/13] " Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 06/13] intel_mid: Refactored sfi_parse_devs() function Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 07/13] intel_mid: Added custom device_handler support Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 08/13] intel_mid: Added custom handler for ipc devices Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 09/13] intel_mid: Moved board related code to a new file Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 10/13] intel_mid: Moved SFI related code to intel_mid_sfi.c Sathyanarayanan Kuppuswamy
2013-05-30 2:45 ` [PATCH v1 11/13] sfi: fix compiler warnings Sathyanarayanan Kuppuswamy
2013-05-31 8:24 ` Andy Shevchenko
2013-05-30 2:45 ` [PATCH v1 12/13] gpiolib: append SFI helpers for GPIO API Sathyanarayanan Kuppuswamy
2013-05-30 18:44 ` Linus Walleij
2013-05-31 9:27 ` [PATCH v1.1] " Andy Shevchenko
2013-06-03 1:59 ` Ryan Mallon
2013-06-03 2:06 ` Joe Perches
2013-06-03 8:16 ` Andy Shevchenko [this message]
2013-06-03 12:26 ` Joe Perches
2013-06-05 13:41 ` Andy Shevchenko
2013-06-03 7:03 ` Linus Walleij
2013-05-30 2:45 ` [PATCH v1 13/13] x86: mrst: move to generic SFI " Sathyanarayanan Kuppuswamy
2013-05-31 8:39 ` [PATCH v1 00/13] mrst refactoring patches Andy Shevchenko
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=1370247379.29283.240.camel@smile \
--to=andriy.shevchenko@linux.intel.com \
--cc=david.a.cohen@intel.com \
--cc=grant.likely@linaro.org \
--cc=grant.likely@secretlab.ca \
--cc=joe@perches.com \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmallon@gmail.com \
--cc=sathyanarayanan.kuppuswamy@intel.com \
/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