linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: felipe.balbi@nokia.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 14/14] omap: mailbox: reorganize headers
Date: Mon, 24 May 2010 20:16:34 +0300	[thread overview]
Message-ID: <20100524171634.GA23202@nokia.com> (raw)
In-Reply-To: <1274548465-20208-15-git-send-email-felipe.contreras@gmail.com>

Hi,

On Sat, May 22, 2010 at 07:14:25PM +0200, ext Felipe Contreras wrote:
>Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>---
> arch/arm/mach-omap1/mailbox.c             |    3 ---
> arch/arm/mach-omap2/mailbox.c             |    1 -
> arch/arm/plat-omap/include/plat/mailbox.h |    3 ++-
> arch/arm/plat-omap/mailbox.c              |    5 ++---
> 4 files changed, 4 insertions(+), 8 deletions(-)
>
>diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
>index e50b3c2..fdd6cc9 100644
>--- a/arch/arm/mach-omap1/mailbox.c
>+++ b/arch/arm/mach-omap1/mailbox.c
>@@ -9,13 +9,10 @@
>  * for more details.
>  */
>
>-#include <linux/kernel.h>
>-#include <linux/resource.h>
> #include <linux/interrupt.h>
> #include <linux/platform_device.h>
> #include <linux/io.h>
> #include <plat/mailbox.h>
>-#include <mach/irqs.h>
>
> #define MAILBOX_ARM2DSP1		0x00
> #define MAILBOX_ARM2DSP1b		0x04
>diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
>index 66d366d..d46e439 100644
>--- a/arch/arm/mach-omap2/mailbox.c
>+++ b/arch/arm/mach-omap2/mailbox.c
>@@ -10,7 +10,6 @@
>  * for more details.
>  */
>
>-#include <linux/kernel.h>
> #include <linux/clk.h>
> #include <linux/err.h>
> #include <linux/platform_device.h>
>diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
>index c44fde3..9976565 100644
>--- a/arch/arm/plat-omap/include/plat/mailbox.h
>+++ b/arch/arm/plat-omap/include/plat/mailbox.h
>@@ -3,9 +3,10 @@
> #ifndef MAILBOX_H
> #define MAILBOX_H
>
>-#include <linux/wait.h>
>+#include <linux/spinlock.h>
> #include <linux/workqueue.h>
> #include <linux/interrupt.h>
>+#include <linux/device.h>
> #include <linux/kfifo.h>
>
> typedef u32 mbox_msg_t;
>diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
>index a8e22e1..8d4c7be 100644
>--- a/arch/arm/plat-omap/mailbox.c
>+++ b/arch/arm/plat-omap/mailbox.c
>@@ -21,10 +21,9 @@
>  *
>  */
>
>-#include <linux/kernel.h>
>-#include <linux/module.h>
> #include <linux/interrupt.h>
>-#include <linux/device.h>
>+#include <linux/spinlock.h>
>+#include <linux/mutex.h>
> #include <linux/delay.h>
> #include <linux/slab.h>
> #include <linux/kfifo.h>

personally I don't like this patch since it makes the C-sources rely on 
indirect header inclusion by another header. That's really error prone 
and will cause build failures if someone decides to remove the include 
<linux/device.h> from plat/mailbox.h.

Those headers are safe against multiple inclusions and I think they 
should be included directly in all source files (header or not) that 
need any symbols from it.

-- 
balbi

DefectiveByDesign.org

  reply	other threads:[~2010-05-24 17:16 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22 17:14 [PATCH v3 00/14] omap: mailbox: bunch of cleanups Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 01/14] omap: mailbox: trivial whitespace cleanups Felipe Contreras
2010-05-24 10:56   ` Hiroshi DOYU
2010-05-22 17:14 ` [PATCH v3 02/14] omap: mailbox: trivial cleanups Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 03/14] omap: mailbox: reorganize structures Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 04/14] omap: mailbox: 2420 should be detected at run-time Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 05/14] omap: mailbox: use correct config for omap1 Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 06/14] omap: mailbox: update omap1 probing Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 07/14] omap: mailbox: don't export unecessary symbols Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 08/14] omap: mailbox: remove unecessary fields Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 09/14] omap: mailbox: add IRQ names Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 10/14] omap: mailbox: reorganize registering Felipe Contreras
2010-05-24 15:24   ` Hiroshi DOYU
2010-05-24 18:32     ` Russell King - ARM Linux
2010-05-24 19:17       ` Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 11/14] omap: mailbox: only compile for configured archs Felipe Contreras
2010-05-24 14:42   ` Hiroshi DOYU
2010-05-24 19:29     ` Felipe Contreras
2010-05-24 21:00       ` Russell King - ARM Linux
2010-05-22 17:14 ` [PATCH v3 12/14] omap: mailbox: standarize on 'omap-mailbox' Felipe Contreras
2010-05-22 17:14 ` [PATCH v3 13/14] omap: mailbox: simplify omap_mbox_register() Felipe Contreras
2010-05-24 14:42   ` Hiroshi DOYU
2010-06-11 15:17     ` Felipe Contreras
2010-06-11 15:19       ` Felipe Contreras
2010-05-24 15:14   ` Hiroshi DOYU
2010-05-22 17:14 ` [PATCH v3 14/14] omap: mailbox: reorganize headers Felipe Contreras
2010-05-24 17:16   ` Felipe Balbi [this message]
2010-05-24 19:14     ` Felipe Contreras
2010-05-25  5:49       ` Felipe Balbi
2010-05-25 18:04         ` Felipe Contreras
2010-06-03  6:40 ` [PATCH v3 00/14] omap: mailbox: bunch of cleanups Hiroshi DOYU
2010-06-03 10:23   ` Felipe Contreras
2010-06-03 10:59     ` Hiroshi DOYU
2010-06-03 11:47   ` Russell King - ARM Linux
2010-06-03 11:56     ` Felipe Balbi
2010-06-03 12:05     ` Baruch Siach
2010-06-03 14:59     ` Felipe Contreras
2010-06-03 16:15       ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100524171634.GA23202@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).