Skip to contentSkip to conversation

staging: ccree: Fix lines longer than 80 characters

PATCH In review Stephen Brennan 3 participants 3 messages Oct 23, 2017 – Oct 24, 2017

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

PATCH 1/1 staging: ccree: Fix lines longer than 80 characters

Simply break down some long lines and tab-indent them.

---
I'm learning the patch submission process, and this is my first patch. I know it's trivial but I'm just trying to get my feet wet. Thanks in advance for taking the time to review this!

 drivers/staging/ccree/ssi_pm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/ccree/ssi_pm.c +6 -2
index 11bbdbeec22e..98ba9e918d2a 100644
@@ -41,7 +41,9 @@ int ssi_power_mgr_runtime_suspend(struct device *dev)
 	int rc;
 
 	dev_dbg(dev, "set HOST_POWER_DOWN_EN\n");
-	WRITE_REGISTER(drvdata->cc_base + CC_REG_OFFSET(HOST_RGF, HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE);
+	WRITE_REGISTER(
+		drvdata->cc_base + CC_REG_OFFSET(HOST_RGF, HOST_POWER_DOWN_EN),
+		POWER_DOWN_ENABLE);
 	rc = ssi_request_mgr_runtime_suspend_queue(drvdata);
 	if (rc != 0) {
 		dev_err(dev, "ssi_request_mgr_runtime_suspend_queue (%x)\n",
@@ -60,7 +62,9 @@ int ssi_power_mgr_runtime_resume(struct device *dev)
 		(struct ssi_drvdata *)dev_get_drvdata(dev);
 
 	dev_dbg(dev, "unset HOST_POWER_DOWN_EN\n");
-	WRITE_REGISTER(drvdata->cc_base + CC_REG_OFFSET(HOST_RGF, HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE);
+	WRITE_REGISTER(
+		drvdata->cc_base + CC_REG_OFFSET(HOST_RGF, HOST_POWER_DOWN_EN),
+		POWER_DOWN_DISABLE);
 
 	rc = cc_clk_on(drvdata);
 	if (rc) {
Signature · 1 line
2.14.2
#1 lore raw
Quoted 1 line · Stephen Brennan

Simply break down some long lines and tab-indent them.

Hi Stephen,

Welcome to the Linux kernel. Great that you have put in a patch, you are, however, unlikely to see success fixing 'line over 80' warnings. There are a bunch of arguments for and against the line over 80 limit, a web search will surely show them to you. The TL;DR is that it these changes do not _really_ improve the readability of the code, they are just changes to quiet the static analysis tool.

There are a bunch of other white space fixes that are more beneficial, perhaps you could wet your feet with these (incorrect placement of parenthesis for example).

Good luck,
Tobin.

#2 lore raw

Hi Tobin,

Quoted 10 lines · Tobin C. Harding
Quoted 1 line · Stephen Brennan

Simply break down some long lines and tab-indent them.

Hi Stephen,

Welcome to the Linux kernel. Great that you have put in a patch, you are, however, unlikely to see success fixing 'line over 80' warnings. There are a bunch of arguments for and against the line over 80 limit, a web search will surely show them to you. The TL;DR is that it these changes do not _really_ improve the readability of the code, they are just changes to quiet the static analysis tool.

I completely agree with you that the end target is more readable code and that lines over 80 char is
only a symptom but I do think in this case there is something useful to do.

Perhaps, if Stephen is willing, re-write the code to be more readable by, for example, using a temp
variable for the register address, and in doing so both making the code more readable as well as
treating the symptom?

Thanks,
Gilad

Signature · 6 lines
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru