From: Joe Perches <joe@perches.com>
To: George Edward Bulmer <gebulmer@googlemail.com>,
gregkh@linuxfoundation.org
Cc: gilad@benyossef.com, linux-crypto@vger.kernel.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ccree: shorten lengthy lines with breaks
Date: Sat, 06 Jan 2018 09:03:57 -0800 [thread overview]
Message-ID: <1515258237.21222.45.camel@perches.com> (raw)
In-Reply-To: <20180106154726.10465-1-gebulmer@googlemail.com>
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;
> }
>
next prev parent reply other threads:[~2018-01-06 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 15:47 [PATCH] staging: ccree: shorten lengthy lines with breaks George Edward Bulmer
2018-01-06 17:03 ` Joe Perches [this message]
2018-01-07 12:12 ` Gilad Ben-Yossef
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1515258237.21222.45.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gebulmer@googlemail.com \
--cc=gilad@benyossef.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox