mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 6/6] mmc: tmio: refactor CLK_CTL bit calculation
Date: Thu, 30 Aug 2018 14:03:38 +0200	[thread overview]
Message-ID: <20180830120338.b3i5evddpto64hnl@ninjato> (raw)
In-Reply-To: <CAPDyKFq6wX9jP0c5688fWVAmnZja9OZXbECwoKbKBXuM2r5cbg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

On Thu, Aug 30, 2018 at 01:51:49PM +0200, Ulf Hansson wrote:
> On 29 August 2018 at 10:49, Wolfram Sang <wsa@the-dreams.de> wrote:
> >
> >> +     if (divisor <= 1) {
> >> +             clk_sel = 1;
> >> +             clk = 0;
> >> +     } else {
> >> +             clk_sel = 0;
> >> +             /* bit7 set: 1/512, ... bit0 set:1/4, all bits clear: 1/2 */
> >> +             clk = roundup_pow_of_two(divisor) >> 2;
> >> +     }
> >
> > What about
> >
> >         clk_sel = (divisor <= 1);
> >         clk = clk_sel ? 0 : (roundup_pow_of_two(divisor) >> 2)
> >
> > More concise, but I think still readable. I don't mind super much,
> > though.
> 
> Right. So, may I apply Yamada-san's original patch (adding your
> tested/reviewed-by tag) and the above as a code-cleanup for you to
> address on top?

I can resend this as a proper patch if you prefer it to be handled
incrementally.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-08-30 12:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23  4:44 [PATCH v3 0/6] mmc: tmio: refactor TMIO core a bit and add UniPhier SD/eMMC controller support Masahiro Yamada
2018-08-23  4:44 ` [PATCH v3 1/6] mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock() Masahiro Yamada
2018-08-23  4:44 ` [PATCH v3 2/6] mmc: tmio: move tmio_mmc_set_clock() to platform hook Masahiro Yamada
2018-08-23  4:44 ` [PATCH v3 3/6] dt-bindings: mmc: add DT binding for UniPhier SD/eMMC controller Masahiro Yamada
2018-08-23  4:44 ` [PATCH v3 4/6] mmc: uniphier-sd: add UniPhier SD/eMMC controller driver Masahiro Yamada
2018-08-23 10:43   ` Ulf Hansson
2018-08-24  1:50     ` Masahiro Yamada
2018-08-24  6:32       ` Ulf Hansson
2018-08-23  4:44 ` [PATCH v3 5/6] mmc: renesas_sdhi: merge clk_{start,stop} functions to set_clock Masahiro Yamada
2018-08-29  8:40   ` Wolfram Sang
2018-08-30 12:30   ` Ulf Hansson
2018-08-23  4:44 ` [PATCH v3 6/6] mmc: tmio: refactor CLK_CTL bit calculation Masahiro Yamada
2018-08-29  8:49   ` Wolfram Sang
2018-08-30 11:51     ` Ulf Hansson
2018-08-30 12:03       ` Wolfram Sang [this message]
2018-08-30 12:30   ` Ulf Hansson
2018-08-23 10:43 ` [PATCH v3 0/6] mmc: tmio: refactor TMIO core a bit and add UniPhier SD/eMMC controller support Ulf Hansson
2018-08-29  8:27   ` Wolfram Sang

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=20180830120338.b3i5evddpto64hnl@ninjato \
    --to=wsa@the-dreams.de \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yamada.masahiro@socionext.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®