mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neil@brown.name>
To: Sankalp Negi <sankalpnegi2310@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Sankalp Negi <sankalpnegi2310@gmail.com>
Subject: Re: [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns.
Date: Wed, 30 May 2018 07:57:05 +1000	[thread overview]
Message-ID: <87vab6unv2.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20180529173757.nmw46a6xbrgh35wd@localhost>

[-- 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 --]

  reply	other threads:[~2018-05-29 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 17:37 Sankalp Negi
2018-05-29 21:57 ` NeilBrown [this message]
2018-05-30 19:04   ` [PATCH v2] " Sankalp Negi
2018-05-30 22:08     ` NeilBrown

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=87vab6unv2.fsf@notabene.neil.brown.name \
    --to=neil@brown.name \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sankalpnegi2310@gmail.com \
    /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

all inboxes | Powered by JetHome®