public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: David Kershner <david.kershner@unisys.com>,
	Andy Whitcroft <apw@canonical.com>,
	corbet@lwn.net, tglx@linutronix.de, mingo@kernel.org,
	akpm@linux-foundation.org, jes.sorensen@gmail.com,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org,
	sparmaintainer@unisys.com
Subject: Re: [PATCH 0/3] move visorbus out of staging to drivers/virt/visorbus
Date: Tue, 06 Jun 2017 08:52:27 -0700	[thread overview]
Message-ID: <1496764347.1968.22.camel@perches.com> (raw)
In-Reply-To: <20170606153907.GA3243@kroah.com>

On Tue, 2017-06-06 at 17:39 +0200, Greg KH wrote:
> On Tue, Jun 06, 2017 at 08:33:49AM -0700, Joe Perches wrote:
> > On Tue, 2017-06-06 at 16:53 +0200, Greg KH wrote:
> > > On Tue, Jun 06, 2017 at 04:49:09PM +0200, Greg KH wrote:
> > > > I noticed that in drivers/staging/unisys/visorbus/visorbus_main.c, you
> > > > have 2 tabs for your 'struct attribute' variables, which is really odd.
> > 
> > []
> > > Also, many of the attribute callbacks in that file seem to all have
> > > their leading '{' in the wrong place.  Odd that checkpatch.pl doesn't
> > > catch that...
[]
> the following code in that file should be caught, right:
> 
> static ssize_t partition_handle_show(struct device *dev,
>                                      struct device_attribute *attr,
>                                      char *buf) {
>         struct visor_device *vdev = to_visor_device(dev);
>         u64 handle = visorchannel_get_clientpartition(vdev->visorchannel);
> 
>         return sprintf(buf, "0x%llx\n", handle);
> }
> static DEVICE_ATTR_RO(partition_handle);

Not really.

> The initial { is in the wrong place...

True.

Please understand that checkpatch looks at patches one line
at a time.  It's not very smart about function definitions
or context.

checkpatch's function definition code is pretty limited.
It can miss a lot of style misuses.

Single line function definitions brace tests work well.
Multiple line function definitions do not.

  reply	other threads:[~2017-06-06 15:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 20:07 [PATCH 0/3] move visorbus out of staging to drivers/virt/visorbus David Kershner
2017-06-05 20:07 ` [PATCH 1/3] include: linux: visorbus: Add visorbus to include/linux directory David Kershner
2017-06-07 13:58   ` Christoph Hellwig
2017-06-05 20:07 ` [PATCH 2/3] Documentation: Move visorbus documentation from staging to Documentation/ David Kershner
2017-06-06  8:02   ` Jani Nikula
2017-06-05 20:07 ` [PATCH 3/3] drivers: virt: Add visorbus to the drivers/virt directory David Kershner
2017-06-06 21:47   ` kbuild test robot
2017-06-06 14:49 ` [PATCH 0/3] move visorbus out of staging to drivers/virt/visorbus Greg KH
2017-06-06 14:53   ` Greg KH
2017-06-06 14:54     ` Greg KH
2017-06-06 15:06       ` Greg KH
2017-06-06 18:20         ` Kershner, David A
2017-06-06 18:58           ` Greg KH
2017-06-06 15:33     ` Joe Perches
2017-06-06 15:39       ` Greg KH
2017-06-06 15:52         ` Joe Perches [this message]
2017-06-06 16:01           ` Greg KH
2017-06-07 13:59   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2016-06-11  3:23 David Kershner
2016-06-14 13:30 ` Neil Horman

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=1496764347.1968.22.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=corbet@lwn.net \
    --cc=david.kershner@unisys.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jes.sorensen@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sparmaintainer@unisys.com \
    --cc=tglx@linutronix.de \
    /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