diff mbox series

[v2,04/10] mmc: sdhci: Expose sdhci_init() as non-static

Message ID 20200124115252.15712-5-faiz_abbas@ti.com
State New
Headers show
Series None | expand

Commit Message

Faiz Abbas Jan. 24, 2020, 11:52 a.m. UTC
Expose sdhci_init() as non-static.

Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
 drivers/mmc/sdhci.c | 2 +-
 include/sdhci.h     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Jaehoon Chung Jan. 28, 2020, 10:59 p.m. UTC | #1
On 1/24/20 8:52 PM, Faiz Abbas wrote:
> Expose sdhci_init() as non-static.

Does it need to change to non-static?

Best Regards,
Jaehoon Chung

> 
> Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
> ---
>  drivers/mmc/sdhci.c | 2 +-
>  include/sdhci.h     | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 01fa5a9d4d..4fce85a0ea 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -618,7 +618,7 @@ static int sdhci_set_ios(struct mmc *mmc)
>  	return 0;
>  }
>  
> -static int sdhci_init(struct mmc *mmc)
> +int sdhci_init(struct mmc *mmc)
>  {
>  	struct sdhci_host *host = mmc->priv;
>  #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
> diff --git a/include/sdhci.h b/include/sdhci.h
> index 01addb7a60..0830e05d53 100644
> --- a/include/sdhci.h
> +++ b/include/sdhci.h
> @@ -487,6 +487,7 @@ void sdhci_set_uhs_timing(struct sdhci_host *host);
>  #ifdef CONFIG_DM_MMC
>  /* Export the operations to drivers */
>  int sdhci_probe(struct udevice *dev);
> +int sdhci_init(struct mmc *mmc);
>  int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
>  extern const struct dm_mmc_ops sdhci_ops;
>  #else
>
Simon Goldschmidt Jan. 29, 2020, 2:16 p.m. UTC | #2
On Wed, Jan 29, 2020 at 12:00 AM Jaehoon Chung <jh80.chung at samsung.com> wrote:
>
> On 1/24/20 8:52 PM, Faiz Abbas wrote:
> > Expose sdhci_init() as non-static.
>
> Does it need to change to non-static?

And even if it needs to, can we have a reason *why* in the commit message?

Thanks,
Simon

>
> Best Regards,
> Jaehoon Chung
>
> >
> > Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
> > Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
> > ---
> >  drivers/mmc/sdhci.c | 2 +-
> >  include/sdhci.h     | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> > index 01fa5a9d4d..4fce85a0ea 100644
> > --- a/drivers/mmc/sdhci.c
> > +++ b/drivers/mmc/sdhci.c
> > @@ -618,7 +618,7 @@ static int sdhci_set_ios(struct mmc *mmc)
> >       return 0;
> >  }
> >
> > -static int sdhci_init(struct mmc *mmc)
> > +int sdhci_init(struct mmc *mmc)
> >  {
> >       struct sdhci_host *host = mmc->priv;
> >  #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
> > diff --git a/include/sdhci.h b/include/sdhci.h
> > index 01addb7a60..0830e05d53 100644
> > --- a/include/sdhci.h
> > +++ b/include/sdhci.h
> > @@ -487,6 +487,7 @@ void sdhci_set_uhs_timing(struct sdhci_host *host);
> >  #ifdef CONFIG_DM_MMC
> >  /* Export the operations to drivers */
> >  int sdhci_probe(struct udevice *dev);
> > +int sdhci_init(struct mmc *mmc);
> >  int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
> >  extern const struct dm_mmc_ops sdhci_ops;
> >  #else
> >
>
Jaehoon Chung Jan. 30, 2020, 10:21 p.m. UTC | #3
Hi Simon,

On 1/29/20 11:16 PM, Simon Goldschmidt wrote:
> On Wed, Jan 29, 2020 at 12:00 AM Jaehoon Chung <jh80.chung at samsung.com> wrote:
>>
>> On 1/24/20 8:52 PM, Faiz Abbas wrote:
>>> Expose sdhci_init() as non-static.
>>
>> Does it need to change to non-static?
> 
> And even if it needs to, can we have a reason *why* in the commit message?

When i read entire your series, it seems that doesn't need to change to non-static.
All of change that touched MMC code are only for your board.
I don't know Peng's opinion, but it's not my prefer.

Best Regards,
Jaehoon Chung

> 
> Thanks,
> Simon
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>> Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
>>> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
>>> ---
>>>  drivers/mmc/sdhci.c | 2 +-
>>>  include/sdhci.h     | 1 +
>>>  2 files changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
>>> index 01fa5a9d4d..4fce85a0ea 100644
>>> --- a/drivers/mmc/sdhci.c
>>> +++ b/drivers/mmc/sdhci.c
>>> @@ -618,7 +618,7 @@ static int sdhci_set_ios(struct mmc *mmc)
>>>       return 0;
>>>  }
>>>
>>> -static int sdhci_init(struct mmc *mmc)
>>> +int sdhci_init(struct mmc *mmc)
>>>  {
>>>       struct sdhci_host *host = mmc->priv;
>>>  #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
>>> diff --git a/include/sdhci.h b/include/sdhci.h
>>> index 01addb7a60..0830e05d53 100644
>>> --- a/include/sdhci.h
>>> +++ b/include/sdhci.h
>>> @@ -487,6 +487,7 @@ void sdhci_set_uhs_timing(struct sdhci_host *host);
>>>  #ifdef CONFIG_DM_MMC
>>>  /* Export the operations to drivers */
>>>  int sdhci_probe(struct udevice *dev);
>>> +int sdhci_init(struct mmc *mmc);
>>>  int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
>>>  extern const struct dm_mmc_ops sdhci_ops;
>>>  #else
>>>
>>
> 
>
Simon Goldschmidt Jan. 30, 2020, 10:25 p.m. UTC | #4
Am 30.01.2020 um 23:21 schrieb Jaehoon Chung:
> Hi Simon,
> 
> On 1/29/20 11:16 PM, Simon Goldschmidt wrote:
>> On Wed, Jan 29, 2020 at 12:00 AM Jaehoon Chung <jh80.chung at samsung.com> wrote:
>>>
>>> On 1/24/20 8:52 PM, Faiz Abbas wrote:
>>>> Expose sdhci_init() as non-static.
>>>
>>> Does it need to change to non-static?
>>
>> And even if it needs to, can we have a reason *why* in the commit message?
> 
> When i read entire your series, it seems that doesn't need to change to non-static.
> All of change that touched MMC code are only for your board.
> I don't know Peng's opinion, but it's not my prefer.

+1!

We need to keep the core code clean of such hacks in order to keep the 
size small for constrained targets!

Regards,
Simon

> 
> Best Regards,
> Jaehoon Chung
> 
>>
>> Thanks,
>> Simon
>>
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>>>
>>>> Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
>>>> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
>>>> ---
>>>>   drivers/mmc/sdhci.c | 2 +-
>>>>   include/sdhci.h     | 1 +
>>>>   2 files changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
>>>> index 01fa5a9d4d..4fce85a0ea 100644
>>>> --- a/drivers/mmc/sdhci.c
>>>> +++ b/drivers/mmc/sdhci.c
>>>> @@ -618,7 +618,7 @@ static int sdhci_set_ios(struct mmc *mmc)
>>>>        return 0;
>>>>   }
>>>>
>>>> -static int sdhci_init(struct mmc *mmc)
>>>> +int sdhci_init(struct mmc *mmc)
>>>>   {
>>>>        struct sdhci_host *host = mmc->priv;
>>>>   #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
>>>> diff --git a/include/sdhci.h b/include/sdhci.h
>>>> index 01addb7a60..0830e05d53 100644
>>>> --- a/include/sdhci.h
>>>> +++ b/include/sdhci.h
>>>> @@ -487,6 +487,7 @@ void sdhci_set_uhs_timing(struct sdhci_host *host);
>>>>   #ifdef CONFIG_DM_MMC
>>>>   /* Export the operations to drivers */
>>>>   int sdhci_probe(struct udevice *dev);
>>>> +int sdhci_init(struct mmc *mmc);
>>>>   int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
>>>>   extern const struct dm_mmc_ops sdhci_ops;
>>>>   #else
>>>>
>>>
>>
>>
>
diff mbox series

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 01fa5a9d4d..4fce85a0ea 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -618,7 +618,7 @@  static int sdhci_set_ios(struct mmc *mmc)
 	return 0;
 }
 
-static int sdhci_init(struct mmc *mmc)
+int sdhci_init(struct mmc *mmc)
 {
 	struct sdhci_host *host = mmc->priv;
 #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
diff --git a/include/sdhci.h b/include/sdhci.h
index 01addb7a60..0830e05d53 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -487,6 +487,7 @@  void sdhci_set_uhs_timing(struct sdhci_host *host);
 #ifdef CONFIG_DM_MMC
 /* Export the operations to drivers */
 int sdhci_probe(struct udevice *dev);
+int sdhci_init(struct mmc *mmc);
 int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
 extern const struct dm_mmc_ops sdhci_ops;
 #else