lkml.org 
[lkml]   [2018]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 6/6] mmc: tmio: refactor CLK_CTL bit calculation
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.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-08-30 14:04    [W:0.096 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site