[PATCH 2/2] staging: greybus: log: Fix line over 80 characters.

Johan Hovold johan at kernel.org
Wed Jan 4 14:42:41 UTC 2017


On Wed, Jan 04, 2017 at 03:07:32PM +0100, Emmanuil Chatzipetru wrote:
> Fix coding style issue caught by checkpatch.pl related to the following
> warning:
> 	- CHECK: WARNING: line over 80 characters
> 
> Signed-off-by: Emmanuil Chatzipetru <chatzi.emanuel at gmail.com>
> ---
>  drivers/staging/greybus/log.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/log.c b/drivers/staging/greybus/log.c
> index 1a18ab1ff8aa..87910fd4a332 100644
> --- a/drivers/staging/greybus/log.c
> +++ b/drivers/staging/greybus/log.c
> @@ -39,7 +39,7 @@ static int gb_log_request_handler(struct gb_operation *op)
>  	len = le16_to_cpu(receive->len);
>  	if (len != (int)(op->request->payload_size - sizeof(*receive))) {
>  		dev_err(dev, "log request wrong size %d vs %d\n", len,
> -				(int)(op->request->payload_size - sizeof(*receive)));
> +			(int)(op->request->payload_size - sizeof(*receive)));

This file is consistently using two-tab indentation for continuation
lines. If you really want to stay within 80 cols here you should drop
the cast and use %zu as format specifier instead.

You can drop the redundant cast in the comparison as well while at it.

>  		return -EINVAL;
>  	}
>  	if (len == 0) {

Thanks,
Johan


More information about the devel mailing list