Skip to contentSkip to conversation

Subject: [PATCH] staging: greybus: line over 80 characters

PATCH Briana Oursler 2 participants 4 messages Mar 29, 2019 – Mar 30, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Replace function call within if-statement with variable to shorten line length. Issue found by checkpatch.

---
 drivers/staging/greybus/arche-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/greybus/arche-platform.c +3 -1
index 6eb842040c22..b839a9eecc55 100644
@@ -155,7 +155,9 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 {
 	struct arche_platform_drvdata *arche_pdata = devid;
 	unsigned long flags;
+	unsigned long cold_jiffies;
 
+	cold_jiffies = msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS);
 	spin_lock_irqsave(&arche_pdata->wake_lock, flags);
 
 	if (gpiod_get_value(arche_pdata->wake_detect)) {
@@ -169,7 +171,7 @@ 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))) {
+					cold_jiffies)) {
 				arche_platform_set_wake_detect_state(arche_pdata,
 								     WD_STATE_IDLE);
 			} else {
Signature · 1 line
2.21.0
maintainer
#1 lore raw
Quoted 7 lines · Briana Oursler

Replace function call within if-statement with variable to shorten line length. Issue found by checkpatch.

---
 drivers/staging/greybus/arche-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Why is "Subject:" in the middle of your email subject line?

Please fix up and resend properly.

thanks,

greg k-h

maintainer
#2 lore raw
In reply to Briana Oursler
Quoted 23 lines · Briana Oursler

Replace function call within if-statement with variable to shorten line length. Issue found by checkpatch.

---
 drivers/staging/greybus/arche-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/greybus/arche-platform.c +2 -0
index 6eb842040c22..b839a9eecc55 100644
@@ -155,7 +155,9 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 {
 	struct arche_platform_drvdata *arche_pdata = devid;
 	unsigned long flags;
+	unsigned long cold_jiffies;
 
+	cold_jiffies = msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS);
 	spin_lock_irqsave(&arche_pdata->wake_lock, flags);
 
 	if (gpiod_get_value(arche_pdata->wake_detect)) {

drivers/staging/greybus/arche-platform.c static irqreturn_t arche_platform_wd_irq(int irq, void *devid) · line 174

Quoted 5 lines
drivers/staging/greybus/arche-platform.c +1 -1
@@ -169,7 +171,7 @@ 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))) {
+					cold_jiffies)) {

In looking at this again, the original code is fine, no need for this change at all.

thanks,

greg k-h

#3 lore raw
Quoted 33 lines · Greg KH
Quoted 23 lines · Briana Oursler

Replace function call within if-statement with variable to shorten line length. Issue found by checkpatch.

---
 drivers/staging/greybus/arche-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/greybus/arche-platform.c +2 -0
index 6eb842040c22..b839a9eecc55 100644
@@ -155,7 +155,9 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 {
 	struct arche_platform_drvdata *arche_pdata = devid;
 	unsigned long flags;
+	unsigned long cold_jiffies;
 
+	cold_jiffies = msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS);
 	spin_lock_irqsave(&arche_pdata->wake_lock, flags);
 
 	if (gpiod_get_value(arche_pdata->wake_detect)) {

drivers/staging/greybus/arche-platform.c static irqreturn_t arche_platform_wd_irq(int irq, void *devid) · line 174

Quoted 5 lines
drivers/staging/greybus/arche-platform.c +1 -1
@@ -169,7 +171,7 @@ 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))) {
+					cold_jiffies)) {

In looking at this again, the original code is fine, no need for this change at all.

Quoted 3 lines

thanks,

greg k-h

Hi Greg,

Thank you for reviewing my submission so quickly. I will fix the strange email formatting in future. I see what you mean about the fix, I'll be more aware of style and context.

Thanks,

Briana