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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1425925663.5428.43.camel@perches.com>
Date:	Mon, 09 Mar 2015 11:27:43 -0700
From:	Joe Perches <joe@...ches.com>
To:	Ioana Antoche <ioana.antoche@...il.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] driver core: fix several coding style warnings

On Mon, 2015-03-09 at 20:08 +0200, Ioana Antoche wrote:
> Fix checkpatch.pl warnings such as:
> * missing blank line after declarations
> * line over 80 characters
> 
> Signed-off-by: Ioana Antoche <ioana.antoche@...il.com>
> ---
> * undo changes related to "ERROR: that open brace { should be on the previous line".

Not quite.

> diff --git a/drivers/base/bus.c b/drivers/base/bus.c

> @@ -298,8 +299,7 @@ static struct device *next_device(struct klist_iter *i)
>   * count in the supplied callback.
>   */
>  int bus_for_each_dev(struct bus_type *bus, struct device *start,
> -		     void *data, int (*fn)(struct device *, void *))
> -{
> +		     void *data, int (*fn)(struct device *, void *)) {

Don't want this change here.

> @@ -395,7 +395,8 @@ struct device *subsys_find_device_by_id(struct bus_type *subsys, unsigned int id
>  		return NULL;
>  
>  	if (hint) {
> -		klist_iter_init_node(&subsys->p->klist_devices, &i, &hint->p->knode_bus);
> +		klist_iter_init_node(&subsys->p->klist_devices, &i,
> +			&hint->p->knode_bus);

Please run your patches though checkpatch --strict.

This second line should be aligned to the open parenthesis like:

		klist_iter_init_node(&subsys->p->klist_devices, &i,
				     &hint->p->knode_bus);


> @@ -448,8 +449,7 @@ static struct device_driver *next_driver(struct klist_iter *i)
>   * so it doesn't disappear before returning to the caller.
>   */
>  int bus_for_each_drv(struct bus_type *bus, struct device_driver *start,
> -		     void *data, int (*fn)(struct device_driver *, void *))
> -{
> +		     void *data, int (*fn)(struct device_driver *, void *)) {

Maybe you re-sent your original patch?

> @@ -1092,7 +1095,8 @@ struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
>  		knode = klist_next(&iter->ki);
>  		if (!knode)
>  			return NULL;
> -		dev = container_of(knode, struct device_private, knode_bus)->device;
> +		dev = container_of(knode, struct device_private, knode_bus)
> +				  ->device;

That's not nice to read.
If it exceeds 80 columns, just leave it alone
or if it really bothers you, use a temporary
for container_of then dereference that.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ