mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Damian Varayud <davarayud@gmail.com>
Cc: gregkh@suse.de, harmonco@engr.orst.edu,
	sam.j.richardson@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.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@gmail.com>
Date: Wed, 03 Nov 2010 14:48:02 -0700	[thread overview]
Message-ID: <1288820882.10236.35.camel@Joe-Laptop> (raw)
In-Reply-To: <1288819162-6330-1-git-send-email-user@netbu>

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


      parent reply	other threads:[~2010-11-03 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 21:19 Damian Varayud
2010-11-03 21:19 ` [PATCH 2/3] Staging: comedi: fix brace coding style issue in pcl816.c Damian Varayud
2010-11-03 21:19 ` [PATCH 3/3] Staging: comedi: fix brace coding style issue in pcl818.c Damian Varayud
2010-11-03 22:32   ` Joe Perches
2010-11-03 21:48 ` Joe Perches [this message]

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=1288820882.10236.35.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=davarayud@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=harmonco@engr.orst.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam.j.richardson@gmail.com \
    /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

all inboxes | Powered by JetHome®