lkml.org 
[lkml]   [2014]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] clocksource: Add BE/LE APIs support for clocksource counter reading.
On Wed, 10 Sep 2014, Xiubo Li wrote:

So you add BE/LE APIs according to the subject line, but you fail
again to tell WHY. If that would be the only issue ....

> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> ---
> drivers/clocksource/mmio.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c
> index 1593ade..ddc5214 100644
> --- a/drivers/clocksource/mmio.c
> +++ b/drivers/clocksource/mmio.c

So you think that adding this to mmio.c is the solution to the
problem?

Ever heard about function prototypes, header files and such?

> @@ -20,21 +20,65 @@ static inline struct clocksource_mmio *to_mmio_clksrc(struct clocksource *c)
> return container_of(c, struct clocksource_mmio, clksrc);
> }
>
> +cycle_t clocksource_mmio_readl_up_be(struct clocksource *c)
> +{
> + return (cycle_t)be32_to_cpu(readl_relaxed(to_mmio_clksrc(c)->reg));
> +}
> +
> +cycle_t clocksource_mmio_readl_up_le(struct clocksource *c)
> +{
> + return (cycle_t)le32_to_cpu(readl_relaxed(to_mmio_clksrc(c)->reg));
> +}
> +
> cycle_t clocksource_mmio_readl_up(struct clocksource *c)
> {
> return (cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg);
> }

So now we have three global functions which provide access to the mmio
clocksource. And one of them is always redundant for a given compile
time endianess. You can't be serious about this...

But ... wait, I've seen enough qualitee code from Fleascale in the
past 10 years, so you actually might be serious about it.

JFYI: You are trying to submit code to the public maintained codebase
of the Linux kernel, not to some random sh^H^Hgit repository inside of
Fleascale which accepts any random amount of crap. Can you see the
difference?

I can see it rather clearly.

Thanks,

tglx





\
 
 \ /
  Last update: 2014-09-10 22:41    [W:0.045 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site