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:   Tue, 06 Jun 2017 08:52:27 -0700
From:   Joe Perches <joe@...ches.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     David Kershner <david.kershner@...sys.com>,
        Andy Whitcroft <apw@...onical.com>, corbet@....net,
        tglx@...utronix.de, mingo@...nel.org, akpm@...ux-foundation.org,
        jes.sorensen@...il.com, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, driverdev-devel@...uxdriverproject.org,
        sparmaintainer@...sys.com
Subject: Re: [PATCH 0/3] move visorbus out of staging to
 drivers/virt/visorbus

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ