Re: [PATCH] Include hrtimer.h for ANSI compliance

From: Andrew Morton
Date: Tue Oct 13 2009 - 19:35:52 EST


On Tue, 6 Oct 2009 15:20:16 -0700
Thomas DuBuisson <thomas.dubuisson@xxxxxxxxx> wrote:

> Include <linux/hrtimer.h> to make pci.h ansi compliant (it references
> an hrtimer enum).

extern enum hrtimer_restart it_real_fn(struct hrtimer *);


Perhaps the declaration of it_real_fn() should be moved to hrtimer.h
instead. Or perhaps not.


Or we could "forward declare" the enum with simply

enum hrtimer_restart;

but given that the compiler works out the storage size of the type at
compile-time, that looks risky.


Or we could not do anything. Because increasing our inclusion
complexity for no known gain isn't a bargain.


Or is it no known gain? What prompted you to write this patch? Some
error message or warning from some tool? If so, please describe it
fully.

>
> diff --git a/include/linux/timer.h b/include/linux/timer.h
> index a2d1eb6..ad2b3cb 100644
> --- a/include/linux/timer.h
> +++ b/include/linux/timer.h
> @@ -6,6 +6,7 @@
> #include <linux/stddef.h>
> #include <linux/debugobjects.h>
> #include <linux/stringify.h>
> +#include <linux/hrtimer.h>
>
> struct tvec_base;

Your email client mangles whitespace, thus destroying the patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/