Re: [RFC 1/2] printk: Enable platform to provide a early boot clock

From: Andy Shevchenko
Date: Thu May 31 2018 - 14:15:54 EST


On Thu, May 31, 2018 at 8:22 PM, Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
> On 05/31/2018 12:18 AM, Andy Shevchenko wrote:
>> On Wed, May 30, 2018 at 12:20 PM, Feng Tang <feng.tang@xxxxxxxxx> wrote:

>>> +static u64 printk_clock(void)
>>> +{
>>> + /* If platform provides early boot printk clock, then use it */
>>> + if (unlikely(system_state == SYSTEM_BOOTING && boot_printk_clock_fn))
>>> + return boot_printk_clock_fn();
>>> + else
>>> + return local_clock();
>>
>> 'else' is redundant.
>
> So it is. Is this a style comment?
> This shouldn't matter to a smart compiler, should it?

In this particular case it doesn't matter, in more complex cases this
will increase an indentation level which becomes a hardly readable
code.

>>> +}

--
With Best Regards,
Andy Shevchenko