linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: ccree: shorten lengthy lines with breaks
@ 2018-01-06 15:47 George Edward Bulmer
  2018-01-06 17:03 ` Joe Perches
  2018-01-07 12:12 ` Gilad Ben-Yossef
  0 siblings, 2 replies; 3+ messages in thread
From: George Edward Bulmer @ 2018-01-06 15:47 UTC (permalink / raw)
  To: gregkh
  Cc: gilad, linux-crypto, driverdev-devel, devel, linux-kernel,
	George Edward Bulmer

This fixes five instances of checkpatch warning:
WARNING: line over 80 characters

Signed-off-by: George Edward Bulmer <gebulmer@googlemail.com>
---
 drivers/staging/ccree/ssi_sysfs.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/ccree/ssi_sysfs.c b/drivers/staging/ccree/ssi_sysfs.c
index 5d39f15cdb59..d488f65e4b1e 100644
--- a/drivers/staging/ccree/ssi_sysfs.c
+++ b/drivers/staging/ccree/ssi_sysfs.c
@@ -32,15 +32,26 @@ static ssize_t ssi_sys_regdump_show(struct kobject *kobj,
 	int offset = 0;
 
 	register_value = cc_ioread(drvdata, CC_REG(HOST_SIGNATURE));
-	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "HOST_SIGNATURE       ", DX_HOST_SIGNATURE_REG_OFFSET, register_value);
+	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
+			    "%s \t(0x%lX)\t 0x%08X\n", "HOST_SIGNATURE       ",
+			    DX_HOST_SIGNATURE_REG_OFFSET, register_value);
 	register_value = cc_ioread(drvdata, CC_REG(HOST_IRR));
-	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "HOST_IRR             ", DX_HOST_IRR_REG_OFFSET, register_value);
+	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
+			    "%s \t(0x%lX)\t 0x%08X\n", "HOST_IRR             ",
+			    DX_HOST_IRR_REG_OFFSET, register_value);
 	register_value = cc_ioread(drvdata, CC_REG(HOST_POWER_DOWN_EN));
-	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "HOST_POWER_DOWN_EN   ", DX_HOST_POWER_DOWN_EN_REG_OFFSET, register_value);
+	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
+			    "%s \t(0x%lX)\t 0x%08X\n", "HOST_POWER_DOWN_EN   ",
+			    DX_HOST_POWER_DOWN_EN_REG_OFFSET, register_value);
 	register_value =  cc_ioread(drvdata, CC_REG(AXIM_MON_ERR));
-	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "AXIM_MON_ERR         ", DX_AXIM_MON_ERR_REG_OFFSET, register_value);
+	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
+			    "%s \t(0x%lX)\t 0x%08X\n", "AXIM_MON_ERR         ",
+			    DX_AXIM_MON_ERR_REG_OFFSET, register_value);
 	register_value = cc_ioread(drvdata, CC_REG(DSCRPTR_QUEUE_CONTENT));
-	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "DSCRPTR_QUEUE_CONTENT", DX_DSCRPTR_QUEUE_CONTENT_REG_OFFSET, register_value);
+	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
+			    "%s \t(0x%lX)\t 0x%08X\n", "DSCRPTR_QUEUE_CONTENT",
+			    DX_DSCRPTR_QUEUE_CONTENT_REG_OFFSET,
+			    register_value);
 	return offset;
 }
 
-- 
2.15.1

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

* Re: [PATCH] staging: ccree: shorten lengthy lines with breaks
  2018-01-06 15:47 [PATCH] staging: ccree: shorten lengthy lines with breaks George Edward Bulmer
@ 2018-01-06 17:03 ` Joe Perches
  2018-01-07 12:12 ` Gilad Ben-Yossef
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2018-01-06 17:03 UTC (permalink / raw)
  To: George Edward Bulmer, gregkh
  Cc: gilad, linux-crypto, driverdev-devel, devel, linux-kernel

On Sat, 2018-01-06 at 15:47 +0000, George Edward Bulmer wrote:
> This fixes five instances of checkpatch warning:
> WARNING: line over 80 characters
[]
> diff --git a/drivers/staging/ccree/ssi_sysfs.c b/drivers/staging/ccree/ssi_sysfs.c
[]
> @@ -32,15 +32,26 @@ static ssize_t ssi_sys_regdump_show(struct kobject *kobj,
>  	int offset = 0;
>  
>  	register_value = cc_ioread(drvdata, CC_REG(HOST_SIGNATURE));
> -	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "HOST_SIGNATURE       ", DX_HOST_SIGNATURE_REG_OFFSET, register_value);
> +	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
> +			    "%s \t(0x%lX)\t 0x%08X\n", "HOST_SIGNATURE       ",

trivia:

Using %-21s would do the same as padding the format
string argument and would create smaller object code.

	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
			    "%-21s \t(0x%lX)\t 0x%08X\n", "HOST_SIGNATURE",

Using an extra space before a tab is odd.

Using a space after a tab is odd too.

> +			    DX_HOST_SIGNATURE_REG_OFFSET, register_value);
>  	register_value = cc_ioread(drvdata, CC_REG(HOST_IRR));
> -	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "HOST_IRR             ", DX_HOST_IRR_REG_OFFSET, register_value);
> +	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
> +			    "%s \t(0x%lX)\t 0x%08X\n", "HOST_IRR             ",

etc...

> +			    DX_HOST_IRR_REG_OFFSET, register_value);
>  	register_value = cc_ioread(drvdata, CC_REG(HOST_POWER_DOWN_EN));
> -	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "HOST_POWER_DOWN_EN   ", DX_HOST_POWER_DOWN_EN_REG_OFFSET, register_value);
> +	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
> +			    "%s \t(0x%lX)\t 0x%08X\n", "HOST_POWER_DOWN_EN   ",
> +			    DX_HOST_POWER_DOWN_EN_REG_OFFSET, register_value);
>  	register_value =  cc_ioread(drvdata, CC_REG(AXIM_MON_ERR));
> -	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "AXIM_MON_ERR         ", DX_AXIM_MON_ERR_REG_OFFSET, register_value);
> +	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
> +			    "%s \t(0x%lX)\t 0x%08X\n", "AXIM_MON_ERR         ",
> +			    DX_AXIM_MON_ERR_REG_OFFSET, register_value);
>  	register_value = cc_ioread(drvdata, CC_REG(DSCRPTR_QUEUE_CONTENT));
> -	offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s \t(0x%lX)\t 0x%08X\n", "DSCRPTR_QUEUE_CONTENT", DX_DSCRPTR_QUEUE_CONTENT_REG_OFFSET, register_value);
> +	offset += scnprintf(buf + offset, PAGE_SIZE - offset,
> +			    "%s \t(0x%lX)\t 0x%08X\n", "DSCRPTR_QUEUE_CONTENT",
> +			    DX_DSCRPTR_QUEUE_CONTENT_REG_OFFSET,
> +			    register_value);
>  	return offset;
>  }
>  

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

* Re: [PATCH] staging: ccree: shorten lengthy lines with breaks
  2018-01-06 15:47 [PATCH] staging: ccree: shorten lengthy lines with breaks George Edward Bulmer
  2018-01-06 17:03 ` Joe Perches
@ 2018-01-07 12:12 ` Gilad Ben-Yossef
  1 sibling, 0 replies; 3+ messages in thread
From: Gilad Ben-Yossef @ 2018-01-07 12:12 UTC (permalink / raw)
  To: George Edward Bulmer
  Cc: Greg Kroah-Hartman, Linux Crypto Mailing List, driverdev-devel,
	devel, Linux kernel mailing list, Joe Perches

Hi George,

On Sat, Jan 6, 2018 at 5:47 PM, George Edward Bulmer
<gebulmer@googlemail.com> wrote:
> This fixes five instances of checkpatch warning:
> WARNING: line over 80 characters
>

Thank you for the patch.


> Signed-off-by: George Edward Bulmer <gebulmer@googlemail.com>
> ---
>  drivers/staging/ccree/ssi_sysfs.c | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)

Unfortunately, I believe you are not working with the latest
staging-next tree as
this issue and indeed the file it appears in are not longer there.

Many thanks,
Gilad

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

end of thread, other threads:[~2018-01-07 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-06 15:47 [PATCH] staging: ccree: shorten lengthy lines with breaks George Edward Bulmer
2018-01-06 17:03 ` Joe Perches
2018-01-07 12:12 ` Gilad Ben-Yossef

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