lkml.org 
[lkml]   [2007]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Avoid overflows in kernel/time.c (version 4)
> 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


\
 
 \ /
  Last update: 2007-12-18 06:39    [W:0.047 / U:2.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site