lkml.org 
[lkml]   [2006]   [Jul]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 4 Jul 2006 00:19:26 -0700
FromAndrew Morton <>
SubjectRe: [Patch] statistics infrastructure - update 9
On Tue, 4 Jul 2006 08:17:54 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> > +
> > +static inline void statistic_add_as(int type, struct statistic *stat, int i,
> > +				    s64 value, u64 incr)
> > +{
> > +}
> > +
> > +#endif /* CONFIG_STATISTICS */
> 
> Why not have something like:
> 
> #define statistic_create(interface, name) 	({ 0; })
> #define statistic_remove(interface)		({ 0; })
> #define statistic_set(stat, i, value, total)	do { } while (0)
> ...
> 
> That would be much shorter and easier to read. But maybe it's just me :)

typechecking.

	struct scsi_device s;
	int foo;

	statistic_create(s, foo_with_a_typo);	/* whee */
-
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: 2006-07-04 07:22    [from the cache]
©2003-2008