lkml.org 
[lkml]   [2012]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] pwm: core: Fix coding style issues
From
On 10 August 2012 16:28, Thierry Reding
<thierry.reding@avionic-design.de> wrote:
> On Fri, Aug 10, 2012 at 03:51:33AM -0700, Joe Perches wrote:
>> On Fri, 2012-08-10 at 15:34 +0530, Sachin Kamat wrote:
>> > On 10 August 2012 15:32, Thierry Reding
>> > <thierry.reding@avionic-design.de> wrote:
>> > > On Fri, Aug 10, 2012 at 03:29:08PM +0530, Sachin Kamat wrote:
>> > >> On 10 August 2012 15:25, Thierry Reding
>> > >> <thierry.reding@avionic-design.de> wrote:
>> > >> > On Fri, Aug 10, 2012 at 10:12:10AM +0530, Sachin Kamat wrote:
>> > >> >> Fixes the following:
>> > >> >> WARNING: line over 80 characters
>> > >> >> ERROR: spaces required around that ':' (ctx:VxW)
>> > >> >> WARNING: Prefer pr_warn(... to pr_warning(...
>> []
>> > >> >> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
>> []
>> > >> >> @@ -130,7 +130,7 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
>> > >> >> }
>> > >> >>
>> > >> >> static struct pwm_device *of_pwm_simple_xlate(struct pwm_chip *pc,
>> > >> >> - const struct of_phandle_args *args)
>> > >> >> + const struct of_phandle_args *args)
>> > >> >> {
>>
>> Another way to write this is to put the return type on a
>> separate line like:
>>
>> type
>> func(args to 80,
>> more args aligned to open paren...)
>>
>> for this case:
>>
>> static struct pwm_device *
>> of_pwm_simple_xlate(struct pwm_chip *pc, const struct of_phandle_args *args)
>
> I was under the impression that the CodingStyle explicitly said not to
> do this, but I've just checked and I couldn't find any mention of the
> return type placement.
>
> Sachin: Can you fix the warning as Joe suggested and resend the patch?
>
> Thierry

Sure. Thanks for the tip Joe.

--
With warm regards,
Sachin


\
 
 \ /
  Last update: 2012-08-10 13:42    [W:0.076 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site