All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org
Cc: shawn.lin@rock-chips.com, Jaehoon Chung <jh80.chung@samsung.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v3 05/15] mmc: core: First step in cleaning up public mmc header files
Date: Mon, 16 Jan 2017 10:54:49 +0800	[thread overview]
Message-ID: <4b267a82-ace4-ba77-a69d-f4a8ea454c67@rock-chips.com> (raw)
In-Reply-To: <1484313256-25993-6-git-send-email-ulf.hansson@linaro.org>

On 2017/1/13 21:14, Ulf Hansson wrote:
> This is the first step in cleaning up the public mmc header files. In this
> change we makes sure each header file builds standalone, as that helps to
> resolve dependencies.
>
> While changing this, it also seems reasonable to stop including other
> headers from inside a header itself which it don't depend upon.
> Additionally, in some cases such dependencies are better resolved by
> forward declaring the needed struct.
>

Look nice,

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>

> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  include/linux/mmc/card.h      | 2 --
>  include/linux/mmc/core.h      | 3 +--
>  include/linux/mmc/host.h      | 9 ++-------
>  include/linux/mmc/mmc.h       | 2 ++
>  include/linux/mmc/slot-gpio.h | 3 +++
>  5 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index 00449e5..ca64f5b 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -11,7 +11,6 @@
>  #define LINUX_MMC_CARD_H
>
>  #include <linux/device.h>
> -#include <linux/mmc/core.h>
>  #include <linux/mod_devicetable.h>
>
>  struct mmc_cid {
> @@ -206,7 +205,6 @@ struct sdio_cis {
>  };
>
>  struct mmc_host;
> -struct mmc_ios;
>  struct sdio_func;
>  struct sdio_func_tuple;
>
> diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
> index e33cc74..64e2ddf 100644
> --- a/include/linux/mmc/core.h
> +++ b/include/linux/mmc/core.h
> @@ -8,10 +8,9 @@
>  #ifndef LINUX_MMC_CORE_H
>  #define LINUX_MMC_CORE_H
>
> -#include <linux/interrupt.h>
>  #include <linux/completion.h>
> +#include <linux/types.h>
>
> -struct request;
>  struct mmc_data;
>  struct mmc_request;
>
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 8bc8841..8d38c76 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -10,16 +10,12 @@
>  #ifndef LINUX_MMC_HOST_H
>  #define LINUX_MMC_HOST_H
>
> -#include <linux/leds.h>
> -#include <linux/mutex.h>
> -#include <linux/timer.h>
>  #include <linux/sched.h>
>  #include <linux/device.h>
>  #include <linux/fault-inject.h>
>
>  #include <linux/mmc/core.h>
>  #include <linux/mmc/card.h>
> -#include <linux/mmc/mmc.h>
>  #include <linux/mmc/pm.h>
>
>  struct mmc_ios {
> @@ -82,6 +78,8 @@ struct mmc_ios {
>  	bool enhanced_strobe;			/* hs400es selection */
>  };
>
> +struct mmc_host;
> +
>  struct mmc_host_ops {
>  	/*
>  	 * It is optional for the host to implement pre_req and post_req in
> @@ -162,9 +160,6 @@ struct mmc_host_ops {
>  				  unsigned int direction, int blk_size);
>  };
>
> -struct mmc_card;
> -struct device;
> -
>  struct mmc_async_req {
>  	/* active mmc request */
>  	struct mmc_request	*mrq;
> diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
> index a074082..261772e 100644
> --- a/include/linux/mmc/mmc.h
> +++ b/include/linux/mmc/mmc.h
> @@ -24,6 +24,8 @@
>  #ifndef LINUX_MMC_MMC_H
>  #define LINUX_MMC_MMC_H
>
> +#include <linux/types.h>
> +
>  /* Standard MMC commands (4.1)           type  argument     response */
>     /* class 1 */
>  #define MMC_GO_IDLE_STATE         0   /* bc                          */
> diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h
> index a7972cd..82f0d28 100644
> --- a/include/linux/mmc/slot-gpio.h
> +++ b/include/linux/mmc/slot-gpio.h
> @@ -11,6 +11,9 @@
>  #ifndef MMC_SLOT_GPIO_H
>  #define MMC_SLOT_GPIO_H
>
> +#include <linux/types.h>
> +#include <linux/irqreturn.h>
> +
>  struct mmc_host;
>
>  int mmc_gpio_get_ro(struct mmc_host *host);
>


-- 
Best Regards
Shawn Lin


  reply	other threads:[~2017-01-16  2:55 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 13:14 [PATCH v3 00/15] mmc: core: A start to slim down public mmc headers Ulf Hansson
2017-01-13 13:14 ` [PATCH v3 01/15] ARM: pxa: Don't rely on public mmc header to include leds.h Ulf Hansson
2017-01-13 13:14   ` Ulf Hansson
2017-01-20  8:01   ` Robert Jarzmik
2017-01-20  8:01     ` Robert Jarzmik
2017-01-20  8:27     ` Ulf Hansson
2017-01-20  8:27       ` Ulf Hansson
2017-01-20 19:34       ` Robert Jarzmik
2017-01-20 19:34         ` Robert Jarzmik
2017-01-22 10:25         ` Robert Jarzmik
2017-01-22 10:25           ` Robert Jarzmik
2017-01-24  7:57           ` Ulf Hansson
2017-01-24  7:57             ` Ulf Hansson
2017-01-24 16:34             ` Robert Jarzmik
2017-01-24 16:34               ` Robert Jarzmik
2017-01-13 13:14 ` [PATCH v3 02/15] ARM: davinci: " Ulf Hansson
2017-01-13 13:14   ` Ulf Hansson
2017-01-13 13:26   ` Sekhar Nori
2017-01-13 13:26     ` Sekhar Nori
2017-01-13 13:14 ` [PATCH v3 03/15] ARM: davinci: Don't rely on public mmc header to include interrupt.h Ulf Hansson
2017-01-13 13:14   ` Ulf Hansson
2017-01-13 13:38   ` Sekhar Nori
2017-01-13 13:38     ` Sekhar Nori
2017-01-13 13:14 ` [PATCH v3 04/15] MIPS: Alchemy: " Ulf Hansson
2017-01-13 13:14   ` Ulf Hansson
2017-01-17 14:50   ` Ralf Baechle
2017-01-13 13:14 ` [PATCH v3 05/15] mmc: core: First step in cleaning up public mmc header files Ulf Hansson
2017-01-16  2:54   ` Shawn Lin [this message]
2017-01-13 13:14 ` [PATCH v3 06/15] mmc: core: First step in cleaning up private " Ulf Hansson
2017-01-16  2:56   ` Shawn Lin
2017-01-13 13:14 ` [PATCH v3 07/15] mmc: core: Move public functions from core.h to private headers Ulf Hansson
2017-01-16  3:01   ` Shawn Lin
2017-01-17 15:07     ` Ulf Hansson
2017-01-13 13:14 ` [PATCH v3 08/15] mmc: core: Move some host specific public functions to host.h Ulf Hansson
2017-01-16  3:02   ` Shawn Lin
2017-01-13 13:14 ` [PATCH v3 09/15] mmc: core: Move erase/trim/discard defines from public core.h to mmc.h Ulf Hansson
2017-01-16  3:05   ` Shawn Lin
2017-01-17 15:06     ` Ulf Hansson
2017-01-13 13:14 ` [PATCH v3 10/15] mmc: core: Remove unused struct _mmc_csd from public mmc.h header Ulf Hansson
2017-01-16  3:07   ` Shawn Lin
2017-01-17 15:07     ` Ulf Hansson
2017-01-13 13:14 ` [PATCH v3 11/15] mmc: omap: Don't use mmc_card_present() when validating for inserted card Ulf Hansson
2017-01-13 13:14 ` [PATCH v3 12/15] mmc: vub300: " Ulf Hansson
2017-01-13 13:14 ` [PATCH v3 13/15] mmc: core: Move public functions from card.h to private headers Ulf Hansson
2017-01-16  3:10   ` Shawn Lin
2017-01-13 13:14 ` [PATCH v3 14/15] mmc: core: Move public functions from host.h " Ulf Hansson
2017-01-16  3:14   ` Shawn Lin
2017-01-13 13:14 ` [PATCH v3 15/15] mmc: core: Don't use extern declarations of public mmc functions Ulf Hansson
2017-01-16  3:16   ` Shawn Lin
2017-01-17 15:08 ` [PATCH v3 00/15] mmc: core: A start to slim down public mmc headers Ulf Hansson

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=4b267a82-ace4-ba77-a69d-f4a8ea454c67@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=adrian.hunter@intel.com \
    --cc=jh80.chung@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.