From patchwork Tue Jul 17 18:13:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 10072 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B447B23F08 for ; Tue, 17 Jul 2012 18:16:22 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 67EF4A1868F for ; Tue, 17 Jul 2012 18:16:22 +0000 (UTC) Received: by yenq6 with SMTP id q6so772621yen.11 for ; Tue, 17 Jul 2012 11:16:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=hErnkjkwtBAMSqFXstpiIoeku3ouoISO0wmBziK1ozw=; b=EJ/jLiNKruk8ZsNbBWMT0GfAkpqYdMyhOGrfS+BCmLBoyOl4aTJsesfDM2jwi6KXKT mpnpb23XyjtRwFRsJDhon2R05VxS68ZkyG0iswZDRO7kqwx7oUjIPKEMk88Lh14p4fGj h3N1UKgTRPZDY0pq8hl1svbRg6SJiWb9BYq2ufICk7DHqrdhGRJHwH2jvcrp4Sj64t7a PliXaMeZ1rjYKs6Zyx5H3JI3IgnY8w9Xhb1T1lkhlAAx40PRWgwgHKZNPRjOUepuyamc 9rhFsKmYVPNA+WffVOmXwXOeK+dm5YAAN2KcgnvysOOZCQOqE4VD6ol0cvUs+g57w9Px pNdg== Received: by 10.50.46.232 with SMTP id y8mr2201131igm.57.1342548981587; Tue, 17 Jul 2012 11:16:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp23036ibb; Tue, 17 Jul 2012 11:16:20 -0700 (PDT) Received: by 10.66.74.69 with SMTP id r5mr7026085pav.56.1342548980633; Tue, 17 Jul 2012 11:16:20 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id kc9si34779361pbc.145.2012.07.17.11.16.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 11:16:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by pbbrr4 with SMTP id rr4so1401813pbb.37 for ; Tue, 17 Jul 2012 11:16:20 -0700 (PDT) Received: by 10.68.236.129 with SMTP id uu1mr671479pbc.77.1342548980286; Tue, 17 Jul 2012 11:16:20 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id se9sm14471573pbc.25.2012.07.17.11.16.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 11:16:19 -0700 (PDT) From: Anton Vorontsov To: Greg Kroah-Hartman , Kees Cook , Colin Cross , Tony Luck Cc: Dan Carpenter , Arnd Bergmann , John Stultz , Shuah Khan , arve@android.com, Rebecca Schultz Zavin , Jesper Juhl , Randy Dunlap , Stephen Boyd , Thomas Meyer , Andrew Morton , Marco Stornelli , WANG Cong , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com Subject: [PATCH] pstore: Headers should include all stuff they use Date: Tue, 17 Jul 2012 11:13:59 -0700 Message-Id: <1342548840-22404-1-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20120717180918.GA18671@lizard> References: <20120717180918.GA18671@lizard> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmy9RMsLvPNg7AQD4v2zETIJUMucyLj8V8id1FeHH+nF5fe0saaoPjij43NlVuK0cb321BS 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 --- 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;