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]
Message-ID: <1288820882.10236.35.camel@Joe-Laptop>
Date:	Wed, 03 Nov 2010 14:48:02 -0700
From:	Joe Perches <joe@...ches.com>
To:	Damian Varayud <davarayud@...il.com>
Cc:	gregkh@...e.de, harmonco@...r.orst.edu, sam.j.richardson@...il.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Staging: comedi: fix brace coding style issue in
 ni_tio.c This is a patch to the ni_tio.c file that fixes up a brace,
 indentation and overlines warning found by the checkpatch.pl tool
 Signed-off-by: Varayud Damian Alfredo <davarayud@...il.com>

On Wed, 2010-11-03 at 18:19 -0300, Damian Varayud wrote:
> ---
>  drivers/staging/comedi/drivers/ni_tio.c |  154 ++++++++++++++++++-------------
>  1 files changed, 89 insertions(+), 65 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
> index a9bb6b1..dd3db48 100644
> --- a/drivers/staging/comedi/drivers/ni_tio.c
> +++ b/drivers/staging/comedi/drivers/ni_tio.c
> @@ -59,8 +59,8 @@ MODULE_DESCRIPTION("Comedi support for NI general-purpose counters");
>  MODULE_LICENSE("GPL");
>  
>  static inline enum Gi_Counting_Mode_Reg_Bits Gi_Alternate_Sync_Bit(enum
> -								   ni_gpct_variant
> -								   variant)
> +								ni_gpct_variant
> +								variant)

Hi Damian.

This isn't an improvement.

It'd be better as:

static inline enum Gi_Counting_Mode_Reg_Bits
Gi_Alternate_Sync_Bit(enum ni_gpct_variant variant)

> @@ -122,8 +122,8 @@ static inline enum Gi_Counting_Mode_Reg_Bits Gi_Prescale_X8_Bit(enum
>  }
>  
>  static inline enum Gi_Counting_Mode_Reg_Bits Gi_HW_Arm_Select_Mask(enum
> -								   ni_gpct_variant
> -								   variant)
> +								ni_gpct_variant
> +								variant)

here too

[]

> @@ -291,21 +296,22 @@ static void __exit ni_tio_cleanup_module(void)
>  
>  module_exit(ni_tio_cleanup_module);
>  
> -struct ni_gpct_device *ni_gpct_device_construct(struct comedi_device *dev,
> -						void (*write_register) (struct
> -									ni_gpct
> -									*
> -									counter,
> -									unsigned
> -									bits,
> -									enum
> -									ni_gpct_register
> -									reg),
> -						unsigned (*read_register)
> -						(struct ni_gpct *counter,
> -						 enum ni_gpct_register reg),
> -						enum ni_gpct_variant variant,
> -						unsigned num_counters)
> +struct ni_gpct_device *ni_gpct_device_construct
> +				(struct comedi_device *dev,
> +				void (*write_register) (struct
> +							ni_gpct
> +							*
> +							counter,
> +							unsigned
> +							bits,
> +							enum
> +							ni_gpct_register
> +							reg),
> +				unsigned (*read_register)
> +				(struct ni_gpct *counter,
> +					enum ni_gpct_register reg),
> +				enum ni_gpct_variant variant,
> +				unsigned num_counters)

And this is just plain ugly.

How about:

struct ni_gpct_device *
ni_gpct_device_construct(struct comedi_device *dev,
			 void (*write_register)(struct ni_gpct *counter,
						unsigned bit,
						enum ni_gpct_register reg),
			 unsigned (*read__register)(struct ni_gpct *counter,
						    enum ni_gpct_variant variant,
						    unsigned num_counters))

Please try to use some taste in ignoring checkpatch output
when appropriate.  80 columns isn't dicta.

cheers, Joe

--
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