linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chase Southwood <chase.southwood@yahoo.com>
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	abbotti@mev.co.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c
Date: Sat, 1 Mar 2014 15:50:50 +0300	[thread overview]
Message-ID: <20140301125049.GG26722@mwanda> (raw)
In-Reply-To: <20140301124418.GT26776@mwanda>

On Sat, Mar 01, 2014 at 03:44:18PM +0300, Dan Carpenter wrote:
> On Sat, Mar 01, 2014 at 04:28:27AM -0600, Chase Southwood wrote:
> > This patch introduces a handful of outl and inl helper functions with the
> > ultimate goal of improving code readability and allowing several lines
> > which violate the character limit to be shortened in a sane way.
> > 
> > Cc: Dan Carpenter <dan.carpenter@oracle.com>
> > Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
> > ---
> > This patchset serves as a replacement to my previous cleanup patchset for
> > hwdrv_apci1564.c
> > 
> > Dan,
> > After spending a little bit more time with this and trying out different
> > ways of cleaning this up, I decided that making helper functions for all
> > of the most common register sets would look the best, but I haven't made
> > a helper for a few of the least common inl/outl calls because if I did,
> > the sheer number of helper functions would get quite ridiculous.
> > Let me know if you think my selections of what to make into helper
> > functions seems appropriate.
> > 
> 
> Yeah.  You're right...  It's kind of a lot of helper functions.
> 
> I wonder if we could just do something like:
> 
> static void outl_amcc(struct addi_private *devpriv, unsigned int cmd,
> 		      unsigned int reg)
> {
> 	outl(cmd, devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP + reg);
> }
> 

Gar...

static void outl_amcc(struct addi_private *devpriv, unsigned int cmd,
		      unsigned int reg)
{
	outl(cmd, devpriv->i_IobaseAmcc + reg);
}

regards,
dan carpenter


  reply	other threads:[~2014-03-01 12:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  7:31 [PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters Chase Southwood
2014-02-28  7:32 ` [PATCH 2/2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c Chase Southwood
2014-02-28  7:52 ` [PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters Dan Carpenter
2014-02-28  7:56   ` Dan Carpenter
2014-02-28  8:03     ` Chase Southwood
2014-02-28  9:15 ` [PATCH 1/2 v2] Staging: comedi: " Chase Southwood
2014-02-28  9:42   ` Dan Carpenter
2014-02-28  9:53     ` Chase Southwood
2014-02-28 22:32   ` Greg KH
2014-03-01  5:32     ` Chase Southwood
2014-02-28  9:16 ` [PATCH 2/2 v2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c Chase Southwood
2014-03-01 10:28 ` [PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions " Chase Southwood
2014-03-01 12:44   ` Dan Carpenter
2014-03-01 12:50     ` Dan Carpenter [this message]
2014-03-02  0:12     ` Chase Southwood
2014-03-02  0:26       ` Chase Southwood
2014-03-03  2:52   ` [PATCH v2 1/2] Staging: comedi: introduce {outl,inl}_amcc() and {outl,inl}_iobase() " Chase Southwood
2014-03-03  9:27     ` Dan Carpenter
2014-03-05  0:39       ` Greg KH
2014-03-05  5:35         ` Chase Southwood
2014-03-03  2:52   ` [PATCH v2 2/2] Staging: comedi: use inl() and outl() helper functions Chase Southwood
2014-03-03  9:40     ` Dan Carpenter
2014-03-03 19:17   ` [PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c Hartley Sweeten
2014-03-01 10:28 ` [PATCH 2/2] Staging: comedi: use " Chase Southwood

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=20140301125049.GG26722@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=abbotti@mev.co.uk \
    --cc=chase.southwood@yahoo.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).