From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754911Ab2GQSjL (ORCPT ); Tue, 17 Jul 2012 14:39:11 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:50723 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754700Ab2GQSjJ (ORCPT ); Tue, 17 Jul 2012 14:39:09 -0400 Date: Tue, 17 Jul 2012 11:37:07 -0700 From: Anton Vorontsov To: Greg Kroah-Hartman Cc: Kees Cook , Colin Cross , Tony Luck , devel@driverdev.osuosl.org, linaro-kernel@lists.linaro.org, Arnd Bergmann , patches@linaro.org, Marco Stornelli , Stephen Boyd , Thomas Meyer , linux-kernel@vger.kernel.org, arve@android.com, Jesper Juhl , John Stultz , Shuah Khan , Rebecca Schultz Zavin , WANG Cong , Andrew Morton , kernel-team@android.com, Dan Carpenter Subject: [PATCH] pstore: Headers should include all stuff they use Message-ID: <20120717183707.GA24056@lizard> References: <20120717180918.GA18671@lizard> <1342548840-22404-1-git-send-email-anton.vorontsov@linaro.org> <20120717181944.GA21957@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20120717181944.GA21957@kroah.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Headers should really include all the needed prototypes, types, defines etc. to be self-contained. This is a long-standing issue, but apparently the new tracing code unearthed it (SMP=n is also a prerequisite): In file included from fs/pstore/internal.h:4:0, from fs/pstore/ftrace.c:21: include/linux/pstore.h:43:15: error: field ‘read_mutex’ has incomplete type While at it, I also added the following: linux/types.h -> size_t, phys_addr_t, uXX and friends linux/spinlock.h -> spinlock_t linux/errno.h -> Exxxx linux/time.h -> struct timespec (struct passed by value) struct module and rs_control forward declaration (passed via pointers). Signed-off-by: Anton Vorontsov --- On Tue, Jul 17, 2012 at 11:19:44AM -0700, Greg Kroah-Hartman wrote: > On Tue, Jul 17, 2012 at 11:13:59AM -0700, Anton Vorontsov wrote: > > Headers should really include all the needed prototypes, types, defines > > > > Content-Transfer-Encoding: base64 > > That's not a nice way to send patches out, care to fix this and resend? I used 'git send-email' as normal, and it said: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OK, I checked what vger.kernel.org received, and it still says: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And I see the email readable in the text editor. OK, with linux_banner I got what the problem is, but where base64 came from?.. :-/ Anyways, resending w/ mutt. fs/pstore/internal.h | 2 ++ include/linux/pstore.h | 6 ++++++ include/linux/pstore_ram.h | 1 + 3 files changed, 9 insertions(+) diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h index 958c48d..0d0d3b7 100644 --- a/fs/pstore/internal.h +++ b/fs/pstore/internal.h @@ -1,6 +1,8 @@ #ifndef __PSTORE_INTERNAL_H__ #define __PSTORE_INTERNAL_H__ +#include +#include #include #if NR_CPUS <= 2 && defined(CONFIG_ARM_THUMB) diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 120443b..c892587 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h @@ -24,6 +24,10 @@ #include #include +#include +#include +#include +#include /* types */ enum pstore_type_id { @@ -34,6 +38,8 @@ enum pstore_type_id { PSTORE_TYPE_UNKNOWN = 255 }; +struct module; + struct pstore_info { struct module *owner; char *name; diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index af848e1..ba2b211 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h @@ -24,6 +24,7 @@ #include struct persistent_ram_buffer; +struct rs_control; struct persistent_ram_zone { phys_addr_t paddr; -- 1.7.10.4