lkml.org 
[lkml]   [2007]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CRISv10 fasttimer: Scrap INLINE and name timeval_cmp better
On Wed, Nov 14, 2007 at 06:29:17PM -0800, Denys Vlasenko wrote:
> On Wednesday 14 November 2007 09:08, Jesper Nilsson wrote:
> > /* Not true gettimeofday, only checks the jiffies (uptime) + useconds */
> > -void __INLINE__ do_gettimeofday_fast(struct fasttime_t *tv)
> > +inline void do_gettimeofday_fast(struct fasttime_t *tv)
>
> Why these functions are not "static inline"?
> Wthout "static", gcc will actually create non-inlined version of them!
>
> $ cat t.c
> inline int f() { return 1; }
> int g() { return f(); }
> $ gcc -O2 -c t.c
> $ nm --size-sort t.o
> 0000000a T f <=================== !!!
> 0000000a T g

Quite true, I'll put that on the "to check" pile.

> P.S. whitespace style in fasttimer.c doesn't match rest of the kernel
> (kernel uses tab, not 2-spaces indentation). Curly braces don't match too:
> if (t0->tv_sec < t1->tv_sec)
> {
> return -1;
> }
> should be
> if (t0->tv_sec < t1->tv_sec) {
> return -1;
> }

Yup, that item is already on my "to fix" list.

> --
> vda

Thanks for your comments!

/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-15 09:13    [W:0.092 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site