All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pwm: vt8500: Fix coding style issue
@ 2012-08-10  4:42 Sachin Kamat
  2012-08-10  4:42 ` [PATCH 2/2] pwm: core: Fix coding style issues Sachin Kamat
  2012-08-10 11:37 ` [PATCH 1/2] pwm: vt8500: Fix coding style issue Thierry Reding
  0 siblings, 2 replies; 10+ messages in thread
From: Sachin Kamat @ 2012-08-10  4:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: thierry.reding, sachin.kamat, patches

Fixes the following:
WARNING: Prefer pr_warn(... to pr_warning(...
	pr_warning("Waiting for status bits 0x%x to clear timed out\n",

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pwm/pwm-vt8500.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c
index 5480214..ad14389 100644
--- a/drivers/pwm/pwm-vt8500.c
+++ b/drivers/pwm/pwm-vt8500.c
@@ -41,7 +41,7 @@ static inline void pwm_busy_wait(void __iomem *reg, u8 bitmask)
 		cpu_relax();
 
 	if (unlikely(!loops))
-		pr_warning("Waiting for status bits 0x%x to clear timed out\n",
+		pr_warn("Waiting for status bits 0x%x to clear timed out\n",
 			   bitmask);
 }
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10  4:42 [PATCH 1/2] pwm: vt8500: Fix coding style issue Sachin Kamat
@ 2012-08-10  4:42 ` Sachin Kamat
  2012-08-10  9:55   ` Thierry Reding
  2012-08-10 11:37 ` [PATCH 1/2] pwm: vt8500: Fix coding style issue Thierry Reding
  1 sibling, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2012-08-10  4:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: thierry.reding, sachin.kamat, patches

Fixes the following:
WARNING: line over 80 characters
ERROR: spaces required around that ':' (ctx:VxW)
WARNING: Prefer pr_warn(... to pr_warning(...

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pwm/core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index efc20f8..929be13 100644
--- 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)
 {
 	struct pwm_device *pwm;
 
@@ -549,7 +549,7 @@ void __init pwm_add_table(struct pwm_lookup *table, size_t num)
 struct pwm_device *pwm_get(struct device *dev, const char *con_id)
 {
 	struct pwm_device *pwm = ERR_PTR(-EPROBE_DEFER);
-	const char *dev_id = dev ? dev_name(dev): NULL;
+	const char *dev_id = dev ? dev_name(dev) : NULL;
 	struct pwm_chip *chip = NULL;
 	unsigned int index = 0;
 	unsigned int best = 0;
@@ -631,7 +631,7 @@ void pwm_put(struct pwm_device *pwm)
 	mutex_lock(&pwm_lock);
 
 	if (!test_and_clear_bit(PWMF_REQUESTED, &pwm->flags)) {
-		pr_warning("PWM device already freed\n");
+		pr_warn("PWM device already freed\n");
 		goto out;
 	}
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10  4:42 ` [PATCH 2/2] pwm: core: Fix coding style issues Sachin Kamat
@ 2012-08-10  9:55   ` Thierry Reding
  2012-08-10  9:59     ` Sachin Kamat
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2012-08-10  9:55 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, patches

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

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(...
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/pwm/core.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> index efc20f8..929be13 100644
> --- 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)
>  {
>  	struct pwm_device *pwm;
>  

Can this hunk be removed, please? I think aligning the arguments is more
useful than respecting the 80-columns limit.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10  9:55   ` Thierry Reding
@ 2012-08-10  9:59     ` Sachin Kamat
  2012-08-10 10:02       ` Thierry Reding
  0 siblings, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2012-08-10  9:59 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-kernel, patches

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(...
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  drivers/pwm/core.c |    6 +++---
>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
>> index efc20f8..929be13 100644
>> --- 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)
>>  {
>>       struct pwm_device *pwm;
>>
>
> Can this hunk be removed, please? I think aligning the arguments is more
> useful than respecting the 80-columns limit.

Sure, if you think so. Anyway it was just one space deleted. Do you
want me to re-send the patch?

>
> Thierry



-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10  9:59     ` Sachin Kamat
@ 2012-08-10 10:02       ` Thierry Reding
  2012-08-10 10:04         ` Sachin Kamat
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2012-08-10 10:02 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, patches

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

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(...
> >>
> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> >> ---
> >>  drivers/pwm/core.c |    6 +++---
> >>  1 files changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> >> index efc20f8..929be13 100644
> >> --- 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)
> >>  {
> >>       struct pwm_device *pwm;
> >>
> >
> > Can this hunk be removed, please? I think aligning the arguments is more
> > useful than respecting the 80-columns limit.
> 
> Sure, if you think so. Anyway it was just one space deleted. Do you
> want me to re-send the patch?

No, with your permission, I'll just leave that hunk out and remove the
"WARNING: line over 80 characters" line from the commit message.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10 10:02       ` Thierry Reding
@ 2012-08-10 10:04         ` Sachin Kamat
  2012-08-10 10:51           ` Joe Perches
  0 siblings, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2012-08-10 10:04 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-kernel, patches

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(...
>> >>
>> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> >> ---
>> >>  drivers/pwm/core.c |    6 +++---
>> >>  1 files changed, 3 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
>> >> index efc20f8..929be13 100644
>> >> --- 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)
>> >>  {
>> >>       struct pwm_device *pwm;
>> >>
>> >
>> > Can this hunk be removed, please? I think aligning the arguments is more
>> > useful than respecting the 80-columns limit.
>>
>> Sure, if you think so. Anyway it was just one space deleted. Do you
>> want me to re-send the patch?
>
> No, with your permission, I'll just leave that hunk out and remove the
> "WARNING: line over 80 characters" line from the commit message.

OK. That is fine with me.
Thanks.

>
> Thierry



-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10 10:04         ` Sachin Kamat
@ 2012-08-10 10:51           ` Joe Perches
  2012-08-10 10:58             ` Thierry Reding
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2012-08-10 10:51 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: Thierry Reding, linux-kernel, patches

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)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10 10:51           ` Joe Perches
@ 2012-08-10 10:58             ` Thierry Reding
  2012-08-10 11:02               ` Sachin Kamat
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2012-08-10 10:58 UTC (permalink / raw)
  To: Joe Perches; +Cc: Sachin Kamat, linux-kernel, patches

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] pwm: core: Fix coding style issues
  2012-08-10 10:58             ` Thierry Reding
@ 2012-08-10 11:02               ` Sachin Kamat
  0 siblings, 0 replies; 10+ messages in thread
From: Sachin Kamat @ 2012-08-10 11:02 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Joe Perches, linux-kernel, patches

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] pwm: vt8500: Fix coding style issue
  2012-08-10  4:42 [PATCH 1/2] pwm: vt8500: Fix coding style issue Sachin Kamat
  2012-08-10  4:42 ` [PATCH 2/2] pwm: core: Fix coding style issues Sachin Kamat
@ 2012-08-10 11:37 ` Thierry Reding
  1 sibling, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2012-08-10 11:37 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, patches

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

On Fri, Aug 10, 2012 at 10:12:09AM +0530, Sachin Kamat wrote:
> Fixes the following:
> WARNING: Prefer pr_warn(... to pr_warning(...
> 	pr_warning("Waiting for status bits 0x%x to clear timed out\n",
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/pwm/pwm-vt8500.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-08-10 11:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10  4:42 [PATCH 1/2] pwm: vt8500: Fix coding style issue Sachin Kamat
2012-08-10  4:42 ` [PATCH 2/2] pwm: core: Fix coding style issues Sachin Kamat
2012-08-10  9:55   ` Thierry Reding
2012-08-10  9:59     ` Sachin Kamat
2012-08-10 10:02       ` Thierry Reding
2012-08-10 10:04         ` Sachin Kamat
2012-08-10 10:51           ` Joe Perches
2012-08-10 10:58             ` Thierry Reding
2012-08-10 11:02               ` Sachin Kamat
2012-08-10 11:37 ` [PATCH 1/2] pwm: vt8500: Fix coding style issue Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.