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]
Date:   Fri, 18 Dec 2020 09:49:25 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Joe Perches' <joe@...ches.com>,
        Daniel West <daniel.west.dev@...il.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
        "mchehab+huawei@...nel.org" <mchehab+huawei@...nel.org>,
        "christian.gromm@...rochip.com" <christian.gromm@...rochip.com>,
        "masahiroy@...nel.org" <masahiroy@...nel.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] staging: most: video: fixed a parentheses coding style
 issue.

From: Joe Perches
> Sent: 17 December 2020 23:58
> 
> On Thu, 2020-12-17 at 15:45 -0800, Daniel West wrote:
> > Fixed a coding style issue.
> 
> It may pass checkpatch without warning, but it's uncommon kernel coding style.

checkpatch probably shouldn't complain about lines that end in (
if they are function definitions.
Even for function calls you would need to reduce the indentation
rather than move the (.
You need the xxx( to be together to help grep patterns.

> 
> > diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
> []
> > @@ -365,8 +365,8 @@ static const struct video_device comp_videodev_template = {
> >
> >
> >  /**************************************************************************/
> >
> >
> > -static struct most_video_dev *get_comp_dev(
> > -	struct most_interface *iface, int channel_idx)
> > +static struct most_video_dev *get_comp_dev
> > +	(struct most_interface *iface, int channel_idx)
> 
> This would be better using any of:
> 
> (most common)
> 
> static struct most_video_dev *get_comp_dev(struct most_interface *iface,
> 					   int channel_idx)
> 
> or (less common)
> 
> static struct most_video_dev *
> get_comp_dev(struct most_interface *iface, int channel_idx)
> 
> or (> 80 columns)
> 
> static struct most_video_dev *get_comp_dev(struct most_interface *iface, int channel_idx)

Or shorten the variable/type names a bit so it all fits.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ