All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mmc: unconditionally define mmc_deinit()
@ 2021-12-18  9:53 ` Heinrich Schuchardt
  2021-12-18 10:00   ` Heinrich Schuchardt
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2021-12-18  9:53 UTC (permalink / raw)
  To: Tom Rini
  Cc: Jaehoon Chung, Pali Rohár, Stefan Bosch, Aswath Govindraju,
	Nicolas Saenz Julienne, u-boot, AKASHI Takahiro,
	Heinrich Schuchardt

We want to replace '#ifdef' by 'if (IS_ENABLED(CONFIG_...))' in our code.
Therefore functions should be defined unconditionally even if they are not
implemented.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 include/mmc.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/mmc.h b/include/mmc.h
index b92e255340..244d2dc592 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -786,12 +786,7 @@ int mmc_init_device(int num);
 int mmc_init(struct mmc *mmc);
 int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
 int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data);
-
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
-    CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
-    CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
 int mmc_deinit(struct mmc *mmc);
-#endif
 
 /**
  * mmc_of_parse() - Parse the device tree to get the capabilities of the host
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] mmc: unconditionally define mmc_deinit()
  2021-12-18  9:53 ` [PATCH 1/1] mmc: unconditionally define mmc_deinit() Heinrich Schuchardt
@ 2021-12-18 10:00   ` Heinrich Schuchardt
  2021-12-19  1:52   ` Peng Fan (OSS)
  2021-12-20 22:11   ` Jaehoon Chung
  2 siblings, 0 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2021-12-18 10:00 UTC (permalink / raw)
  To: Tom Rini
  Cc: Jaehoon Chung, Pali Rohár, Stefan Bosch, Aswath Govindraju,
	Nicolas Saenz Julienne, u-boot, AKASHI Takahiro, Peng Fan

+cc Peng Fan <peng.fan@nxp.com>

On 12/18/21 10:53, Heinrich Schuchardt wrote:
> We want to replace '#ifdef' by 'if (IS_ENABLED(CONFIG_...))' in our code.
> Therefore functions should be defined unconditionally even if they are not
> implemented.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>   include/mmc.h | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/include/mmc.h b/include/mmc.h
> index b92e255340..244d2dc592 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -786,12 +786,7 @@ int mmc_init_device(int num);
>   int mmc_init(struct mmc *mmc);
>   int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
>   int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data);
> -
> -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
> -    CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
> -    CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
>   int mmc_deinit(struct mmc *mmc);
> -#endif
>   
>   /**
>    * mmc_of_parse() - Parse the device tree to get the capabilities of the host

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] mmc: unconditionally define mmc_deinit()
  2021-12-18  9:53 ` [PATCH 1/1] mmc: unconditionally define mmc_deinit() Heinrich Schuchardt
  2021-12-18 10:00   ` Heinrich Schuchardt
@ 2021-12-19  1:52   ` Peng Fan (OSS)
  2021-12-20 22:11   ` Jaehoon Chung
  2 siblings, 0 replies; 4+ messages in thread
From: Peng Fan (OSS) @ 2021-12-19  1:52 UTC (permalink / raw)
  To: Heinrich Schuchardt, Tom Rini
  Cc: Jaehoon Chung, Pali Rohár, Stefan Bosch, Aswath Govindraju,
	Nicolas Saenz Julienne, u-boot, AKASHI Takahiro



On 2021/12/18 17:53, Heinrich Schuchardt wrote:
> We want to replace '#ifdef' by 'if (IS_ENABLED(CONFIG_...))' in our code.
> Therefore functions should be defined unconditionally even if they are not
> implemented.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Acked-by: Peng Fan <peng.fan@nxp.com>

> ---
>   include/mmc.h | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/include/mmc.h b/include/mmc.h
> index b92e255340..244d2dc592 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -786,12 +786,7 @@ int mmc_init_device(int num);
>   int mmc_init(struct mmc *mmc);
>   int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
>   int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data);
> -
> -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
> -    CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
> -    CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
>   int mmc_deinit(struct mmc *mmc);
> -#endif
>   
>   /**
>    * mmc_of_parse() - Parse the device tree to get the capabilities of the host
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] mmc: unconditionally define mmc_deinit()
  2021-12-18  9:53 ` [PATCH 1/1] mmc: unconditionally define mmc_deinit() Heinrich Schuchardt
  2021-12-18 10:00   ` Heinrich Schuchardt
  2021-12-19  1:52   ` Peng Fan (OSS)
@ 2021-12-20 22:11   ` Jaehoon Chung
  2 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2021-12-20 22:11 UTC (permalink / raw)
  To: Heinrich Schuchardt, Tom Rini
  Cc: Pali Rohár, Stefan Bosch, Aswath Govindraju,
	Nicolas Saenz Julienne, u-boot, AKASHI Takahiro

On 12/18/21 6:53 PM, Heinrich Schuchardt wrote:
> We want to replace '#ifdef' by 'if (IS_ENABLED(CONFIG_...))' in our code.
> Therefore functions should be defined unconditionally even if they are not
> implemented.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
>  include/mmc.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/include/mmc.h b/include/mmc.h
> index b92e255340..244d2dc592 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -786,12 +786,7 @@ int mmc_init_device(int num);
>  int mmc_init(struct mmc *mmc);
>  int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
>  int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data);
> -
> -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
> -    CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
> -    CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
>  int mmc_deinit(struct mmc *mmc);
> -#endif
>  
>  /**
>   * mmc_of_parse() - Parse the device tree to get the capabilities of the host
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-20 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20211218095555epcas1p1510a573126cf3a88e34c6d8b3addac18@epcas1p1.samsung.com>
2021-12-18  9:53 ` [PATCH 1/1] mmc: unconditionally define mmc_deinit() Heinrich Schuchardt
2021-12-18 10:00   ` Heinrich Schuchardt
2021-12-19  1:52   ` Peng Fan (OSS)
2021-12-20 22:11   ` Jaehoon Chung

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.