* [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns.
@ 2018-05-29 17:37 Sankalp Negi
2018-05-29 21:57 ` NeilBrown
0 siblings, 1 reply; 4+ messages in thread
From: Sankalp Negi @ 2018-05-29 17:37 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, linux-kernel; +Cc: NeilBrown, Sankalp Negi
This patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters
Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com>
---
drivers/staging/mt7621-mmc/dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
index d897b1216348..0b007e060ddc 100644
--- a/drivers/staging/mt7621-mmc/dbg.c
+++ b/drivers/staging/mt7621-mmc/dbg.c
@@ -229,7 +229,7 @@ static int msdc_debug_proc_read(struct seq_file *s, void *p)
}
static ssize_t msdc_debug_proc_write(struct file *file,
- const char __user *buf, size_t count, loff_t *data)
+ const char __user *buf, size_t count, loff_t *data)
{
int ret;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns.
2018-05-29 17:37 [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns Sankalp Negi
@ 2018-05-29 21:57 ` NeilBrown
2018-05-30 19:04 ` [PATCH v2] " Sankalp Negi
0 siblings, 1 reply; 4+ messages in thread
From: NeilBrown @ 2018-05-29 21:57 UTC (permalink / raw)
To: Sankalp Negi, Greg Kroah-Hartman, devel, linux-kernel; +Cc: Sankalp Negi
[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]
On Tue, May 29 2018, Sankalp Negi wrote:
> This patch fixes the checkpatch.pl warning:
>
> WARNING: line over 80 characters
>
> Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com>
> ---
> drivers/staging/mt7621-mmc/dbg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
> index d897b1216348..0b007e060ddc 100644
> --- a/drivers/staging/mt7621-mmc/dbg.c
> +++ b/drivers/staging/mt7621-mmc/dbg.c
> @@ -229,7 +229,7 @@ static int msdc_debug_proc_read(struct seq_file *s, void *p)
> }
>
> static ssize_t msdc_debug_proc_write(struct file *file,
> - const char __user *buf, size_t count, loff_t *data)
> + const char __user *buf, size_t count, loff_t *data)
Thanks, but .... not like this please.
The code inside () should never be indented before the '(' unless the
'(' is at the end of a line.
So you could make it
static ssize_t msdc_debug_proc_write(struct file *file, const char __user *buf,
size_t count, loff_t *data)
or
static ssize_t
msdc_debug_proc_write(struct file *file, const char __user *buf, size_t count,
loff_t *data)
or even
static ssize_t msdc_debug_proc_write(
struct file *file, const char __user *buf, size_t count, loff_t *data)
(though I don't think checkpatch will like that).
But neither the original or your new version are indented properly.
Try to do more than just remove the warnings - try to make the code
beautiful!
Thanks,
NeilBrown
> {
> int ret;
>
> --
> 2.11.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: mt7621-mmc: Fix line size exceeding 80 columns
2018-05-29 21:57 ` NeilBrown
@ 2018-05-30 19:04 ` Sankalp Negi
2018-05-30 22:08 ` NeilBrown
0 siblings, 1 reply; 4+ messages in thread
From: Sankalp Negi @ 2018-05-30 19:04 UTC (permalink / raw)
To: gregkh; +Cc: neil, devel, linux-kernel, sankalpnegi2310
This patch fixes checkpatch.pl warning and check:
WARNING: line over 80 characters
CHECK: Alignment should match open parenthesis
Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com>
---
Changes in v2:
- Made alignments to match open parenthesis.
---
drivers/staging/mt7621-mmc/dbg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
index d897b1216348..6e4e223cddfb 100644
--- a/drivers/staging/mt7621-mmc/dbg.c
+++ b/drivers/staging/mt7621-mmc/dbg.c
@@ -229,7 +229,8 @@ static int msdc_debug_proc_read(struct seq_file *s, void *p)
}
static ssize_t msdc_debug_proc_write(struct file *file,
- const char __user *buf, size_t count, loff_t *data)
+ const char __user *buf,
+ size_t count, loff_t *data)
{
int ret;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: mt7621-mmc: Fix line size exceeding 80 columns
2018-05-30 19:04 ` [PATCH v2] " Sankalp Negi
@ 2018-05-30 22:08 ` NeilBrown
0 siblings, 0 replies; 4+ messages in thread
From: NeilBrown @ 2018-05-30 22:08 UTC (permalink / raw)
To: Sankalp Negi, gregkh; +Cc: devel, linux-kernel, sankalpnegi2310
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
On Thu, May 31 2018, Sankalp Negi wrote:
> This patch fixes checkpatch.pl warning and check:
> WARNING: line over 80 characters
> CHECK: Alignment should match open parenthesis
>
> Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Thanks,
NeilBrown
> ---
> Changes in v2:
> - Made alignments to match open parenthesis.
> ---
> drivers/staging/mt7621-mmc/dbg.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
> index d897b1216348..6e4e223cddfb 100644
> --- a/drivers/staging/mt7621-mmc/dbg.c
> +++ b/drivers/staging/mt7621-mmc/dbg.c
> @@ -229,7 +229,8 @@ static int msdc_debug_proc_read(struct seq_file *s, void *p)
> }
>
> static ssize_t msdc_debug_proc_write(struct file *file,
> - const char __user *buf, size_t count, loff_t *data)
> + const char __user *buf,
> + size_t count, loff_t *data)
> {
> int ret;
>
> --
> 2.11.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-30 22:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 17:37 [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns Sankalp Negi
2018-05-29 21:57 ` NeilBrown
2018-05-30 19:04 ` [PATCH v2] " Sankalp Negi
2018-05-30 22:08 ` NeilBrown
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).