Re: [PATCH v1 1/2] kernel: time: export sched_clock_register function

From: Thomas Gleixner
Date: Wed Jul 29 2020 - 08:47:47 EST


Freddy,

Freddy Hsin <freddy.hsin@xxxxxxxxxxxx> writes:

please do not come up with random prefixes. Just look at the topmost two
commits on that file:

2c8bd58812ee ("time/sched_clock: Expire timer in hardirq context")
2707745533d6 ("time/sched_clock: Disable interrupts in sched_clock_register()")

Also the sentence after the colon starts with an uppercase letter.

Please change 'sched_clock_register function' to
'sched_clock_register()' which makes it clear that this is a function

> export sched_clock_register function, because the Mediatek timer
> loadable module depends on this function

Again sentences start with an uppercase letter. Also the reason for
exporting this is wrong. There is no mediatek timer module now.

The point of exporting this (if at all) is that it's required for any
ARM SoC timer driver to be modularized.
> @@ -239,6 +239,7 @@ static enum hrtimer_restart sched_clock_poll(struct hrtimer *hrt)
>
> pr_debug("Registered %pS as sched_clock source\n", read);
> }
> +EXPORT_SYMBOL(sched_clock_register);

EXPORT_SYMBOL_GPL() please.

Thanks,

tglx