public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Mark Brown <broonie@kernel.org>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Stephen Warren <swarren@nvidia.com>,
	Xiubo Li <Li.Xiubo@freescale.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] regmap: Split regmap_get_endian() in two functions
Date: Wed, 27 Aug 2014 10:40:02 -0600	[thread overview]
Message-ID: <53FE09E2.5080708@wwwdotorg.org> (raw)
In-Reply-To: <1409150163-25729-1-git-send-email-geert+renesas@glider.be>

On 08/27/2014 08:36 AM, Geert Uytterhoeven wrote:
> Split regmap_get_endian() in two functions, regmap_get_reg_endian() and
> regmap_get_val_endian().
>
> This allows to:
>    - Get rid of the three switch()es on "type", incl. error handling in
>      three "default" cases,
>    - Get rid of the regmap_endian_type enum,
>    - Get rid of the non-NULL check of "config" (regmap_init() already
>      checks for that),
>    - Get rid of the "endian" output parameters, and just return the
>      regmap_endian enum value, as the functions can no longer fail.
>
> This saves 21 lines of code (despite the still-present
> one-comment-per-line over-documentation), and 30 bytes of code on ARM
> V7.

For the mailing list record only (since it's been applied),
Reviewed-by: Stephen Warren <swarren@nvidia.com>

      parent reply	other threads:[~2014-08-27 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 14:36 [PATCH RFC] regmap: Split regmap_get_endian() in two functions Geert Uytterhoeven
2014-08-27 15:28 ` Mark Brown
2014-08-27 16:40 ` Stephen Warren [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=53FE09E2.5080708@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=Li.Xiubo@freescale.com \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=javier.martinez@collabora.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swarren@nvidia.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