Re: [PATCH] Avoid overflows in kernel/time.c (version 4)

From: Sam Ravnborg
Date: Tue Dec 18 2007 - 00:36:00 EST


> diff --git a/kernel/Makefile b/kernel/Makefile
> index dfa9695..749825a 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -80,3 +80,11 @@ quiet_cmd_ikconfiggz = IKCFG $@
> targets += config_data.h
> $(obj)/config_data.h: $(obj)/config_data.gz FORCE
> $(call if_changed,ikconfiggz)
> +
> +$(obj)/time.o: $(obj)/timeconst.h
> +
> +quiet_cmd_timeconst = TIMEC $@
> + cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@
> +targets += timeconst.h
> +$(obj)/timeconst.h: $(src)/timeconst.pl $(wildcard include/config/hz.h) FORCE
> + $(call if_changed,timeconst)

The prerequisite $(wildcard include/config/hz.h) is not needed.
You will run the perl script if:
- timeconst.h is missing
- if commandline changes (new CONFIG_HZ value)

Otherwise it looks OK to me.

Sam
--
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/