linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Joe Perches' <joe@perches.com>,
	Daniel West <daniel.west.dev@gmail.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
	"mchehab+huawei@kernel.org" <mchehab+huawei@kernel.org>,
	"christian.gromm@microchip.com" <christian.gromm@microchip.com>,
	"masahiroy@kernel.org" <masahiroy@kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] staging: most: video: fixed a parentheses coding style issue.
Date: Fri, 18 Dec 2020 09:49:25 +0000	[thread overview]
Message-ID: <d5993e314b134e038a1e4eeba32833ce@AcuMS.aculab.com> (raw)
In-Reply-To: <04c331f6bfce57c253cb86208ebd28f6363e04c0.camel@perches.com>

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)


  reply	other threads:[~2020-12-18  9:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 23:45 [PATCH] staging: most: video: fixed a parentheses coding style issue Daniel West
2020-12-17 23:58 ` Joe Perches
2020-12-18  9:49   ` David Laight [this message]
2020-12-18 10:08     ` Joe Perches
2020-12-18 10:38       ` David Laight

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=d5993e314b134e038a1e4eeba32833ce@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=christian.gromm@microchip.com \
    --cc=daniel.west.dev@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mchehab+huawei@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).