Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Linus Torvalds <torvalds@...>, Paul Jackson <pj@...>, <hpa@...>, <yhlu.kernel@...>, <akpm@...>, <tglx@...>, <steiner@...>, <travis@...>, <linux-kernel@...>, <ying.huang@...>, <andi@...>, Vegard Nossum <vegard.nossum@...>
Date: Thursday, June 26, 2008 - 3:14 pm

Hi Ingo


This is waht make C=1 is for. If this is broken then we should
fix it.
Just trying it out:
$ make C=1 kernel/sched.o
  CHECK   kernel/sched.c
kernel/sched_fair.c:37:14: warning: symbol 'sysctl_sched_latency' was not declar                                                                   ed. Should it be static?
kernel/sched_fair.c:43:14: warning: symbol 'sysctl_sched_min_granularity' was no                                                                   t declared. Should it be static?
kernel/sched_fair.c:72:14: warning: symbol 'sysctl_sched_wakeup_granularity' was                                                                    not declared. Should it be static?
...
  CC      kernel/sched.o


So make C=1 works as intended and let you run sparse on the files
that are built - and only those.

 
Already present.

That would then be on a directory basis.
You can do:
diff --git a/kernel/Makefile b/kernel/Makefile
index 1c9938a..1ba00aa 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -2,6 +2,7 @@
 # Makefile for the linux kernel.
 #

+KBUILD_CHECKSRC=1
 obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
            exit.o itimer.o time.o softirq.o resource.o \
            sysctl.o capability.o ptrace.o timer.o user.o \

already today.
It applies recursively so we will then run sparse on kernel/time/*.o too.

There is no easy way to cover all of arch/x86/*.o as the files are distributed
in several Makefiles and there is no common one.

This could be a simple:
ifdef CONFIG_CHECK_IS_ERROR
CHECKFLAGS += -Werror
endif

And teach sparse about -Werror


For each Makefile (does not apply recursively):
ccflags-$(CONFIG_PROMOTE_WARNINGS_TO_ERROR) += -Werror

When I get around to it:
ccflags-sched.o-$(CONFIG_PROMOTE_WARNINGS_TO_ERROR) += -Werror

	Sam
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not d..., Alexander van Heukelum, (Mon Jun 30, 3:58 am)
Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not d..., Sam Ravnborg, (Thu Jun 26, 3:14 pm)
[PATCH 2/5 v2] x86 boot: x86_64 efi compiler warning fix, Paul Jackson, (Sun Jun 22, 10:22 am)
[PATCH 1/5 v2] x86 boot: e820 code indentation fix, Paul Jackson, (Sun Jun 22, 10:21 am)