lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87vab6unv2.fsf@notabene.neil.brown.name>
Date:   Wed, 30 May 2018 07:57:05 +1000
From:   NeilBrown <neil@...wn.name>
To:     Sankalp Negi <sankalpnegi2310@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc:     Sankalp Negi <sankalpnegi2310@...il.com>
Subject: Re: [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns.

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@...il.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

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ