[U-Boot,v3,18/20] arm: socfpga: Enable function visible to other file

Message ID 1507882137-27841-19-git-send-email-tien.fong.chee@intel.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series
  • Add FPGA, SDRAM, SPL loadfs U-boot & booting to console
Related show

Commit Message

Chee, Tien Fong Oct. 13, 2017, 8:08 a.m.
From: Tien Fong Chee <tien.fong.chee@intel.com>

Enable function visible to other file, so it can be used by other
functions from other file.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
---
 common/spl/spl_mmc.c | 2 +-
 include/spl.h        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Dinh Nguyen Oct. 20, 2017, 2:39 p.m. | #1
On 10/13/2017 03:08 AM, tien.fong.chee@intel.com wrote:
> From: Tien Fong Chee <tien.fong.chee@intel.com>
> 
> Enable function visible to other file, so it can be used by other
> functions from other file.

Huh? What function? What other file? Why?

Please bear in mind for future patches, when reading the commit message,
you should have a good idea of what the patch is doing without even
looking at the patch.

Need to include more people listed in get_maintainer.pl

Maybe Marek has already commented, but this patch can be separated out
from the A10 series.

Also, the commit header "arm:socfpga: Enable function visible to other
file" is horrible and this patch has nothing to do with socfpga.

Dinh
Chee, Tien Fong Oct. 23, 2017, 8:19 a.m. | #2
On Jum, 2017-10-20 at 09:39 -0500, Dinh Nguyen wrote:
> 

> On 10/13/2017 03:08 AM, tien.fong.chee@intel.com wrote:

> > 

> > From: Tien Fong Chee <tien.fong.chee@intel.com>

> > 

> > Enable function visible to other file, so it can be used by other

> > functions from other file.

> Huh? What function? What other file? Why?

> 

> Please bear in mind for future patches, when reading the commit

> message,

> you should have a good idea of what the patch is doing without even

> looking at the patch.

> 

> Need to include more people listed in get_maintainer.pl

> 

> Maybe Marek has already commented, but this patch can be separated

> out

> from the A10 series.

> 

> Also, the commit header "arm:socfpga: Enable function visible to

> other

> file" is horrible and this patch has nothing to do with socfpga.

> 

This patch is required by later patches, so this patch can't be
separated out. This function is static declaration, but this function
is required by the caller from other file(later patches). So, this
patch is to remove ths static declaration so it is accessible by the
caller from other file.

> Dinh
Dinh Nguyen Oct. 23, 2017, 2:24 p.m. | #3
On 10/23/2017 03:19 AM, Chee, Tien Fong wrote:
> On Jum, 2017-10-20 at 09:39 -0500, Dinh Nguyen wrote:
>>
>> On 10/13/2017 03:08 AM, tien.fong.chee@intel.com wrote:
>>>
>>> From: Tien Fong Chee <tien.fong.chee@intel.com>
>>>
>>> Enable function visible to other file, so it can be used by other
>>> functions from other file.
>> Huh? What function? What other file? Why?
>>
>> Please bear in mind for future patches, when reading the commit
>> message,
>> you should have a good idea of what the patch is doing without even
>> looking at the patch.
>>
>> Need to include more people listed in get_maintainer.pl
>>
>> Maybe Marek has already commented, but this patch can be separated
>> out
>> from the A10 series.
>>
>> Also, the commit header "arm:socfpga: Enable function visible to
>> other
>> file" is horrible and this patch has nothing to do with socfpga.
>>
> This patch is required by later patches, so this patch can't be
> separated out. This function is static declaration, but this function
> is required by the caller from other file(later patches). So, this
> patch is to remove ths static declaration so it is accessible by the
> caller from other file.

yes, I know what it means to remove the static declaration. Ok, I
understand the need for this patch in this series. Please fix up the
commit header and message.

Dinh
Chee, Tien Fong Oct. 24, 2017, 5:11 a.m. | #4
On Isn, 2017-10-23 at 09:24 -0500, Dinh Nguyen wrote:
> 

> On 10/23/2017 03:19 AM, Chee, Tien Fong wrote:

> > 

> > On Jum, 2017-10-20 at 09:39 -0500, Dinh Nguyen wrote:

> > > 

> > > 

> > > On 10/13/2017 03:08 AM, tien.fong.chee@intel.com wrote:

> > > > 

> > > > 

> > > > From: Tien Fong Chee <tien.fong.chee@intel.com>

> > > > 

> > > > Enable function visible to other file, so it can be used by

> > > > other

> > > > functions from other file.

> > > Huh? What function? What other file? Why?

> > > 

> > > Please bear in mind for future patches, when reading the commit

> > > message,

> > > you should have a good idea of what the patch is doing without

> > > even

> > > looking at the patch.

> > > 

> > > Need to include more people listed in get_maintainer.pl

> > > 

> > > Maybe Marek has already commented, but this patch can be

> > > separated

> > > out

> > > from the A10 series.

> > > 

> > > Also, the commit header "arm:socfpga: Enable function visible to

> > > other

> > > file" is horrible and this patch has nothing to do with socfpga.

> > > 

> > This patch is required by later patches, so this patch can't be

> > separated out. This function is static declaration, but this

> > function

> > is required by the caller from other file(later patches). So, this

> > patch is to remove ths static declaration so it is accessible by

> > the

> > caller from other file.

> yes, I know what it means to remove the static declaration. Ok, I

> understand the need for this patch in this series. Please fix up the

> commit header and message.

> 

Okay.
> Dinh

Patch

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index b2cccc6..159443f 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -113,7 +113,7 @@  static int spl_mmc_get_device_index(u32 boot_device)
 	return -ENODEV;
 }
 
-static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
+int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
 {
 #if CONFIG_IS_ENABLED(DM_MMC)
 	struct udevice *dev;
diff --git a/include/spl.h b/include/spl.h
index ce4cf0a..e24433d 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -10,6 +10,7 @@ 
 /* Platform-specific defines */
 #include <linux/compiler.h>
 #include <asm/spl.h>
+#include <mmc.h>
 
 /* Value in r0 indicates we booted from U-Boot */
 #define UBOOT_NOT_LOADED_FROM_SPL	0x13578642
@@ -68,6 +69,7 @@  int spl_load_simple_fit(struct spl_image_info *spl_image,
 void preloader_console_init(void);
 u32 spl_boot_device(void);
 u32 spl_boot_mode(const u32 boot_device);
+int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device);
 
 /**
  * spl_set_header_raw_uboot() - Set up a standard SPL image structure