linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khilman@baylibre.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] mmc: meson-gx: improve meson_mmc_clk_set
Date: Fri, 27 Jan 2017 10:03:45 -0800	[thread overview]
Message-ID: <m2ziicv0qm.fsf@baylibre.com> (raw)
In-Reply-To: <49d47535-6008-e1df-3baa-4f0590344a89@gmail.com> (Heiner Kallweit's message of "Thu, 26 Jan 2017 23:03:13 +0100")

Heiner Kallweit <hkallweit1@gmail.com> writes:

> The following changes are quite small, therefore I combined them in
> one patch. If you'd prefer to separate the changes just let me know.
>
> - ret doesn't need to be initialized with 0
> - use standard !clk_rate notation to check for a zero value
> - If clk_rate is zero we return here. Therefore all further checks
>   in this function for clk_rate != 0 are not needed.
> - switch from dev_warn to dev_err if the clock can't be set
> - If due to clock source and available divider values the requested
>   frequency isn't matched exactly (always the case if requested
>   frequency is 52 MHz), then just print the differing values as
>   debug message and not as warning.
> - Also remove ret from the message as it is always 0.
> - In the case of actual frequency not exactly matching the requested
>   one set mmc->actual_clock to the requested frequency.
>   So far mmc->actual_clock wasn't set at all in this case.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

All nice cleanup, thanks!

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>

Kevin

      reply	other threads:[~2017-01-27 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 22:03 [PATCH 3/3] mmc: meson-gx: improve meson_mmc_clk_set Heiner Kallweit
2017-01-27 18:03 ` Kevin Hilman [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=m2ziicv0qm.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.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).