linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: arche: wrap over-length lines
@ 2017-07-09 21:28 Mitchell Tasman
  2017-07-10  0:25 ` [PATCH v2] " Mitchell Tasman
  0 siblings, 1 reply; 8+ messages in thread
From: Mitchell Tasman @ 2017-07-09 21:28 UTC (permalink / raw)
  To: Vaibhav Hiremath, Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: greybus-dev, devel, linux-kernel, Mitchell Tasman

Adjust formatting of various statements to keep line length within
the 80 column limit preferred by the Linux kernel coding style.

Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
---
 drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index eced2d2..c386c13 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 		if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
 			if (time_before(jiffies,
 					arche_pdata->wake_detect_start +
-					msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
-				arche_platform_set_wake_detect_state(arche_pdata,
-								     WD_STATE_IDLE);
+					msecs_to_jiffies(
+						WD_COLDBOOT_PULSE_WIDTH_MS))) {
+				arche_platform_set_wake_detect_state(
+								arche_pdata,
+								WD_STATE_IDLE);
 			} else {
-				/* Check we are not in middle of irq thread already */
+				/*
+				 * Check we are not in middle of irq thread
+				 * already
+				 */
 				if (arche_pdata->wake_detect_state !=
 						WD_STATE_COLDBOOT_START) {
-					arche_platform_set_wake_detect_state(arche_pdata,
-									     WD_STATE_COLDBOOT_TRIG);
+					arche_platform_set_wake_detect_state(
+							arche_pdata,
+							WD_STATE_COLDBOOT_TRIG);
 					spin_unlock_irqrestore(
 						&arche_pdata->wake_lock,
 						flags);
@@ -199,8 +205,9 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 			 * beyond 30msec, then it is coldboot else fallback
 			 * to standby boot.
 			 */
-			arche_platform_set_wake_detect_state(arche_pdata,
-							     WD_STATE_BOOT_INIT);
+			arche_platform_set_wake_detect_state(
+							arche_pdata,
+							WD_STATE_BOOT_INIT);
 		}
 	}
 
@@ -657,12 +664,14 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
 			arche_platform_resume);
 
 static const struct of_device_id arche_platform_of_match[] = {
-	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
+	/* Use PID/VID of SVC device*/
+	{ .compatible = "google,arche-platform", },
 	{ },
 };
 
 static const struct of_device_id arche_combined_id[] = {
-	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
+	/* Use PID/VID of SVC device */
+	{ .compatible = "google,arche-platform", },
 	{ .compatible = "usbffff,2", },
 	{ },
 };
-- 
2.9.3

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

* [PATCH v2] staging: greybus: arche: wrap over-length lines
  2017-07-09 21:28 [PATCH] staging: greybus: arche: wrap over-length lines Mitchell Tasman
@ 2017-07-10  0:25 ` Mitchell Tasman
  2017-07-10  4:46   ` [greybus-dev] " Viresh Kumar
  0 siblings, 1 reply; 8+ messages in thread
From: Mitchell Tasman @ 2017-07-10  0:25 UTC (permalink / raw)
  To: Vaibhav Hiremath, Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: greybus-dev, devel, linux-kernel, Mitchell Tasman

Adjust formatting of various statements to keep line length within
the 80 column limit preferred by the Linux kernel coding style.

Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
---
Changes in v2: Add back a missing space in a comment

 drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index eced2d2..eedd239 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 		if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
 			if (time_before(jiffies,
 					arche_pdata->wake_detect_start +
-					msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
-				arche_platform_set_wake_detect_state(arche_pdata,
-								     WD_STATE_IDLE);
+					msecs_to_jiffies(
+						WD_COLDBOOT_PULSE_WIDTH_MS))) {
+				arche_platform_set_wake_detect_state(
+								arche_pdata,
+								WD_STATE_IDLE);
 			} else {
-				/* Check we are not in middle of irq thread already */
+				/*
+				 * Check we are not in middle of irq thread
+				 * already
+				 */
 				if (arche_pdata->wake_detect_state !=
 						WD_STATE_COLDBOOT_START) {
-					arche_platform_set_wake_detect_state(arche_pdata,
-									     WD_STATE_COLDBOOT_TRIG);
+					arche_platform_set_wake_detect_state(
+							arche_pdata,
+							WD_STATE_COLDBOOT_TRIG);
 					spin_unlock_irqrestore(
 						&arche_pdata->wake_lock,
 						flags);
@@ -199,8 +205,9 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 			 * beyond 30msec, then it is coldboot else fallback
 			 * to standby boot.
 			 */
-			arche_platform_set_wake_detect_state(arche_pdata,
-							     WD_STATE_BOOT_INIT);
+			arche_platform_set_wake_detect_state(
+							arche_pdata,
+							WD_STATE_BOOT_INIT);
 		}
 	}
 
@@ -657,12 +664,14 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
 			arche_platform_resume);
 
 static const struct of_device_id arche_platform_of_match[] = {
-	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
+	/* Use PID/VID of SVC device */
+	{ .compatible = "google,arche-platform", },
 	{ },
 };
 
 static const struct of_device_id arche_combined_id[] = {
-	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
+	/* Use PID/VID of SVC device */
+	{ .compatible = "google,arche-platform", },
 	{ .compatible = "usbffff,2", },
 	{ },
 };
-- 
2.9.3

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

* Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines
  2017-07-10  0:25 ` [PATCH v2] " Mitchell Tasman
@ 2017-07-10  4:46   ` Viresh Kumar
  2017-07-10  9:30     ` Frans Klaver
  2017-07-11  3:14     ` [PATCH v3] " Mitchell Tasman
  0 siblings, 2 replies; 8+ messages in thread
From: Viresh Kumar @ 2017-07-10  4:46 UTC (permalink / raw)
  To: Mitchell Tasman
  Cc: Vaibhav Hiremath, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	devel, greybus-dev, linux-kernel

Hi Mitchell,

On 09-07-17, 20:25, Mitchell Tasman wrote:
> Adjust formatting of various statements to keep line length within
> the 80 column limit preferred by the Linux kernel coding style.

We try to follow that most of the time, but the end result should be easily
readable.  If it isn't, then we just ignore the rule.

> Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
> ---
> Changes in v2: Add back a missing space in a comment
> 
>  drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
>  1 file changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> index eced2d2..eedd239 100644
> --- a/drivers/staging/greybus/arche-platform.c
> +++ b/drivers/staging/greybus/arche-platform.c
> @@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>  		if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
>  			if (time_before(jiffies,
>  					arche_pdata->wake_detect_start +
> -					msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
> -				arche_platform_set_wake_detect_state(arche_pdata,
> -								     WD_STATE_IDLE);
> +					msecs_to_jiffies(
> +						WD_COLDBOOT_PULSE_WIDTH_MS))) {
> +				arche_platform_set_wake_detect_state(

We don't break the lines like this in kernel to satisfy the 80 column width
rule. Surely, some places would have similar code, but in general this isn't
recommended. And that's why we never bothered about 80 column rule in this and
below cases.

> +								arche_pdata,
> +								WD_STATE_IDLE);
>  			} else {
> -				/* Check we are not in middle of irq thread already */
> +				/*
> +				 * Check we are not in middle of irq thread
> +				 * already
> +				 */

Yes, such changes would be fine.

>  				if (arche_pdata->wake_detect_state !=
>  						WD_STATE_COLDBOOT_START) {
> -					arche_platform_set_wake_detect_state(arche_pdata,
> -									     WD_STATE_COLDBOOT_TRIG);
> +					arche_platform_set_wake_detect_state(

Not this.

> +							arche_pdata,
> +							WD_STATE_COLDBOOT_TRIG);
>  					spin_unlock_irqrestore(
>  						&arche_pdata->wake_lock,
>  						flags);
> @@ -199,8 +205,9 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>  			 * beyond 30msec, then it is coldboot else fallback
>  			 * to standby boot.
>  			 */
> -			arche_platform_set_wake_detect_state(arche_pdata,
> -							     WD_STATE_BOOT_INIT);
> +			arche_platform_set_wake_detect_state(

Not this.

> +							arche_pdata,
> +							WD_STATE_BOOT_INIT);
>  		}
>  	}
>  
> @@ -657,12 +664,14 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
>  			arche_platform_resume);
>  
>  static const struct of_device_id arche_platform_of_match[] = {
> -	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
> +	/* Use PID/VID of SVC device */
> +	{ .compatible = "google,arche-platform", },

This would be fine though.

>  	{ },
>  };
>  
>  static const struct of_device_id arche_combined_id[] = {
> -	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
> +	/* Use PID/VID of SVC device */
> +	{ .compatible = "google,arche-platform", },
>  	{ .compatible = "usbffff,2", },
>  	{ },
>  };

-- 
viresh

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

* Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines
  2017-07-10  4:46   ` [greybus-dev] " Viresh Kumar
@ 2017-07-10  9:30     ` Frans Klaver
  2017-07-10  9:31       ` Viresh Kumar
  2017-07-11  3:14     ` [PATCH v3] " Mitchell Tasman
  1 sibling, 1 reply; 8+ messages in thread
From: Frans Klaver @ 2017-07-10  9:30 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Mitchell Tasman, driverdevel, Greg Kroah-Hartman, Johan Hovold,
	linux-kernel, greybus-dev

On Mon, Jul 10, 2017 at 6:46 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Hi Mitchell,
>
> On 09-07-17, 20:25, Mitchell Tasman wrote:
>> Adjust formatting of various statements to keep line length within
>> the 80 column limit preferred by the Linux kernel coding style.
>
> We try to follow that most of the time, but the end result should be easily
> readable.  If it isn't, then we just ignore the rule.
>
>> Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
>> ---
>> Changes in v2: Add back a missing space in a comment
>>
>>  drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
>>  1 file changed, 19 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
>> index eced2d2..eedd239 100644
>> --- a/drivers/staging/greybus/arche-platform.c
>> +++ b/drivers/staging/greybus/arche-platform.c
>> @@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>>               if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
>>                       if (time_before(jiffies,
>>                                       arche_pdata->wake_detect_start +
>> -                                     msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
>> -                             arche_platform_set_wake_detect_state(arche_pdata,
>> -                                                                  WD_STATE_IDLE);
>> +                                     msecs_to_jiffies(
>> +                                             WD_COLDBOOT_PULSE_WIDTH_MS))) {
>> +                             arche_platform_set_wake_detect_state(
>
> We don't break the lines like this in kernel to satisfy the 80 column width
> rule. Surely, some places would have similar code, but in general this isn't
> recommended. And that's why we never bothered about 80 column rule in this and
> below cases.

In cases like this, one could argue that you should start looking at
the level of indentation, rather than the line length per se. After
all, the documentation states that "if you need more than 3 levels of
indentation, you're screwed anyway, and you should fix your program".

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

* Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines
  2017-07-10  9:30     ` Frans Klaver
@ 2017-07-10  9:31       ` Viresh Kumar
  2017-07-11  5:24         ` Joe Perches
  0 siblings, 1 reply; 8+ messages in thread
From: Viresh Kumar @ 2017-07-10  9:31 UTC (permalink / raw)
  To: Frans Klaver
  Cc: Mitchell Tasman, driverdevel, Greg Kroah-Hartman, Johan Hovold,
	linux-kernel, greybus-dev

On 10-07-17, 11:30, Frans Klaver wrote:
> On Mon, Jul 10, 2017 at 6:46 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Hi Mitchell,
> >
> > On 09-07-17, 20:25, Mitchell Tasman wrote:
> >> Adjust formatting of various statements to keep line length within
> >> the 80 column limit preferred by the Linux kernel coding style.
> >
> > We try to follow that most of the time, but the end result should be easily
> > readable.  If it isn't, then we just ignore the rule.
> >
> >> Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
> >> ---
> >> Changes in v2: Add back a missing space in a comment
> >>
> >>  drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
> >>  1 file changed, 19 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> >> index eced2d2..eedd239 100644
> >> --- a/drivers/staging/greybus/arche-platform.c
> >> +++ b/drivers/staging/greybus/arche-platform.c
> >> @@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> >>               if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
> >>                       if (time_before(jiffies,
> >>                                       arche_pdata->wake_detect_start +
> >> -                                     msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
> >> -                             arche_platform_set_wake_detect_state(arche_pdata,
> >> -                                                                  WD_STATE_IDLE);
> >> +                                     msecs_to_jiffies(
> >> +                                             WD_COLDBOOT_PULSE_WIDTH_MS))) {
> >> +                             arche_platform_set_wake_detect_state(
> >
> > We don't break the lines like this in kernel to satisfy the 80 column width
> > rule. Surely, some places would have similar code, but in general this isn't
> > recommended. And that's why we never bothered about 80 column rule in this and
> > below cases.
> 
> In cases like this, one could argue that you should start looking at
> the level of indentation, rather than the line length per se. After
> all, the documentation states that "if you need more than 3 levels of
> indentation, you're screwed anyway, and you should fix your program".

And I completely agree to that :)

-- 
viresh

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

* [PATCH v3] staging: greybus: arche: wrap over-length lines
  2017-07-10  4:46   ` [greybus-dev] " Viresh Kumar
  2017-07-10  9:30     ` Frans Klaver
@ 2017-07-11  3:14     ` Mitchell Tasman
  2017-07-11  3:22       ` [greybus-dev] " Viresh Kumar
  1 sibling, 1 reply; 8+ messages in thread
From: Mitchell Tasman @ 2017-07-11  3:14 UTC (permalink / raw)
  To: Vaibhav Hiremath, Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: greybus-dev, devel, linux-kernel, Mitchell Tasman

Adjust formatting of several comments to keep line length within
the 80 column limit preferred by the Linux kernel coding style.

Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
---
Changes in v3: Narrow scope of patch per Viresh Kumar's feedback
Changes in v2: Add back a missing space in a comment

 drivers/staging/greybus/arche-platform.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index eced2d2..6259904 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -176,7 +176,10 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 				arche_platform_set_wake_detect_state(arche_pdata,
 								     WD_STATE_IDLE);
 			} else {
-				/* Check we are not in middle of irq thread already */
+				/*
+				 * Check we are not in middle of irq thread
+				 * already
+				 */
 				if (arche_pdata->wake_detect_state !=
 						WD_STATE_COLDBOOT_START) {
 					arche_platform_set_wake_detect_state(arche_pdata,
@@ -657,12 +660,14 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
 			arche_platform_resume);
 
 static const struct of_device_id arche_platform_of_match[] = {
-	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
+	/* Use PID/VID of SVC device */
+	{ .compatible = "google,arche-platform", },
 	{ },
 };
 
 static const struct of_device_id arche_combined_id[] = {
-	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
+	/* Use PID/VID of SVC device */
+	{ .compatible = "google,arche-platform", },
 	{ .compatible = "usbffff,2", },
 	{ },
 };
-- 
2.9.3

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

* Re: [greybus-dev] [PATCH v3] staging: greybus: arche: wrap over-length lines
  2017-07-11  3:14     ` [PATCH v3] " Mitchell Tasman
@ 2017-07-11  3:22       ` Viresh Kumar
  0 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2017-07-11  3:22 UTC (permalink / raw)
  To: Mitchell Tasman
  Cc: Vaibhav Hiremath, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	greybus-dev, linux-kernel, devel

On 10-07-17, 23:14, Mitchell Tasman wrote:
> Adjust formatting of several comments to keep line length within
> the 80 column limit preferred by the Linux kernel coding style.
> 
> Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
> ---
> Changes in v3: Narrow scope of patch per Viresh Kumar's feedback
> Changes in v2: Add back a missing space in a comment
> 
>  drivers/staging/greybus/arche-platform.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> index eced2d2..6259904 100644
> --- a/drivers/staging/greybus/arche-platform.c
> +++ b/drivers/staging/greybus/arche-platform.c
> @@ -176,7 +176,10 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>  				arche_platform_set_wake_detect_state(arche_pdata,
>  								     WD_STATE_IDLE);
>  			} else {
> -				/* Check we are not in middle of irq thread already */
> +				/*
> +				 * Check we are not in middle of irq thread
> +				 * already
> +				 */
>  				if (arche_pdata->wake_detect_state !=
>  						WD_STATE_COLDBOOT_START) {
>  					arche_platform_set_wake_detect_state(arche_pdata,
> @@ -657,12 +660,14 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops,
>  			arche_platform_resume);
>  
>  static const struct of_device_id arche_platform_of_match[] = {
> -	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
> +	/* Use PID/VID of SVC device */
> +	{ .compatible = "google,arche-platform", },
>  	{ },
>  };
>  
>  static const struct of_device_id arche_combined_id[] = {
> -	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
> +	/* Use PID/VID of SVC device */
> +	{ .compatible = "google,arche-platform", },
>  	{ .compatible = "usbffff,2", },
>  	{ },
>  };

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines
  2017-07-10  9:31       ` Viresh Kumar
@ 2017-07-11  5:24         ` Joe Perches
  0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2017-07-11  5:24 UTC (permalink / raw)
  To: Viresh Kumar, Frans Klaver
  Cc: Mitchell Tasman, driverdevel, Greg Kroah-Hartman, Johan Hovold,
	linux-kernel, greybus-dev

On Mon, 2017-07-10 at 15:01 +0530, Viresh Kumar wrote:
> On 10-07-17, 11:30, Frans Klaver wrote:
> > On Mon, Jul 10, 2017 at 6:46 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > Hi Mitchell,
> > > 
> > > On 09-07-17, 20:25, Mitchell Tasman wrote:
> > > > Adjust formatting of various statements to keep line length within
> > > > the 80 column limit preferred by the Linux kernel coding style.
> > > 
> > > We try to follow that most of the time, but the end result should be easily
> > > readable.  If it isn't, then we just ignore the rule.
> > > 
> > > > Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
> > > > ---
> > > > Changes in v2: Add back a missing space in a comment
> > > > 
> > > >  drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
> > > >  1 file changed, 19 insertions(+), 10 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> > > > index eced2d2..eedd239 100644
> > > > --- a/drivers/staging/greybus/arche-platform.c
> > > > +++ b/drivers/staging/greybus/arche-platform.c
> > > > @@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> > > >               if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
> > > >                       if (time_before(jiffies,
> > > >                                       arche_pdata->wake_detect_start +
> > > > -                                     msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
> > > > -                             arche_platform_set_wake_detect_state(arche_pdata,
> > > > -                                                                  WD_STATE_IDLE);
> > > > +                                     msecs_to_jiffies(
> > > > +                                             WD_COLDBOOT_PULSE_WIDTH_MS))) {
> > > > +                             arche_platform_set_wake_detect_state(
> > > 
> > > We don't break the lines like this in kernel to satisfy the 80 column width
> > > rule. Surely, some places would have similar code, but in general this isn't
> > > recommended. And that's why we never bothered about 80 column rule in this and
> > > below cases.
> > 
> > In cases like this, one could argue that you should start looking at
> > the level of indentation, rather than the line length per se. After
> > all, the documentation states that "if you need more than 3 levels of
> > indentation, you're screwed anyway, and you should fix your program".
> 
> And I completely agree to that :)

Another thing to consider is to s/arche_platform_//
as the identifier lengths are just way too long.

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

end of thread, other threads:[~2017-07-11  5:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-09 21:28 [PATCH] staging: greybus: arche: wrap over-length lines Mitchell Tasman
2017-07-10  0:25 ` [PATCH v2] " Mitchell Tasman
2017-07-10  4:46   ` [greybus-dev] " Viresh Kumar
2017-07-10  9:30     ` Frans Klaver
2017-07-10  9:31       ` Viresh Kumar
2017-07-11  5:24         ` Joe Perches
2017-07-11  3:14     ` [PATCH v3] " Mitchell Tasman
2017-07-11  3:22       ` [greybus-dev] " Viresh Kumar

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).