Re: [PATCH] sh: fix kernel build error

From: Sergei Shtylyov
Date: Thu Nov 14 2013 - 07:31:51 EST


Hello.

On 14-11-2013 4:26, Wanlong Gao wrote:

arch/sh/kernel/kgdb.c: In function 'sleeping_thread_to_gdb_regs':
arch/sh/kernel/kgdb.c:225:32: error: implicit declaration of function 'task_stack_page' [-Werror=implicit-function-declaration]
arch/sh/kernel/kgdb.c:242:23: error: dereferencing pointer to incomplete type
arch/sh/kernel/kgdb.c:243:22: error: dereferencing pointer to incomplete type
arch/sh/kernel/kgdb.c: In function 'singlestep_trap_handler':
arch/sh/kernel/kgdb.c:310:27: error: 'SIGTRAP' undeclared (first use in this function)
arch/sh/kernel/kgdb.c:310:27: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors

Strange quoting...

Strange? It's the build error log.

I've never seen the leading > characters in gcc's error output.

This is introduced by commit 16559ae.

Please also specify that commit's summary line in parens.

commit 16559ae48c76f1ceb970b9719dea62b77eb5d06b
Author: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Mon Feb 4 15:35:26 2013 -0800

kgdb: remove #include <linux/serial_8250.h> from kgdb.h

There's no reason kgdb.h itself needs to include the 8250 serial port
header file. So push it down to the _very_ limited number of individual
drivers that need the values in that file, and fix up the places where
people really wanted serial_core.h and platform_device.h.

Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>


And the line caused this build error is:

diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 4dff0c6..c6e091b 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -13,7 +13,6 @@
#ifndef _KGDB_H_
#define _KGDB_H_

-#include <linux/serial_8250.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/atomic.h>

That's all interesting but what I asked you to do is add the summary line ("kgdb: remove #include <linux/serial_8250.h> from kgdb.h" in this case) enclosed into parentheses to your commit log. There was no need to tell me all the gory details of your fix. :-)

Thanks,
Wanlong Gao

WBR, Sergei

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