Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1474889 > unrolled thread
| Started by | Anson Jacob <ansonjacob.aj@gmail.com> |
|---|---|
| First post | 2016-09-02 07:20 +0200 |
| Last post | 2016-09-02 07:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: i4l: act2000: Add blank line after declaration Anson Jacob <ansonjacob.aj@gmail.com> - 2016-09-02 07:20 +0200
Re: [PATCH] staging: i4l: act2000: Add blank line after declaration Joe Perches <joe@perches.com> - 2016-09-02 07:30 +0200
| From | Anson Jacob <ansonjacob.aj@gmail.com> |
|---|---|
| Date | 2016-09-02 07:20 +0200 |
| Subject | [PATCH] staging: i4l: act2000: Add blank line after declaration |
| Message-ID | <scP3r-3CW-3@gated-at.bofh.it> |
Fix checkpatch.pl warning:
Missing a blank line after declarations
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
---
drivers/staging/i4l/act2000/act2000_isa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
index 1d93151..fbb15f5 100644
--- a/drivers/staging/i4l/act2000/act2000_isa.c
+++ b/drivers/staging/i4l/act2000/act2000_isa.c
@@ -259,6 +259,7 @@ act2000_isa_receive(act2000_card *card)
"act2000_isa_receive: Invalid CAPI msg\n");
{
int i; __u8 *p; __u8 *t; __u8 tmp[30];
+
for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, t = tmp; i < 8; i++)
t += sprintf(t, "%02x ", *(p++));
printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp);
--
2.7.4
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-09-02 07:30 +0200 |
| Message-ID | <scPd8-3He-19@gated-at.bofh.it> |
| In reply to | #1474889 |
On Fri, 2016-09-02 at 01:09 -0400, Anson Jacob wrote:
> Fix checkpatch.pl warning:
> Missing a blank line after declarations
[]
> diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
[]
> @@ -259,6 +259,7 @@ act2000_isa_receive(act2000_card *card)
> "act2000_isa_receive: Invalid CAPI msg\n");
> {
> int i; __u8 *p; __u8 *t; __u8 tmp[30];
> +
> for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, t = tmp; i < 8; i++)
> t += sprintf(t, "%02x ", *(p++));
> printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp);
It'd be better to use the %*ph vsprintf extension
(see Documentation/printk-formats.txt) without
any of the loop code and variable declarations:
pr_warn("%s: %8ph\n",
__func__, card->idat.isa.rcvhdr);
or maybe
pr_warn("%s: %*ph\n",
__func__,
(int)ARRAY_SIZE(card->idat.isa.rcvhdr),
card->idat.isa.rcvhdr);
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web