diff mbox

[U-Boot,2/3] spl: mmc: Rename 'mmc' variable to 'mmcp'

Message ID 1448903949-2092-3-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Nov. 30, 2015, 5:19 p.m. UTC
The 'p' suffix makes it more obvious that we are dealing with a pointer
to a (pointer) value that will be returned to its caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/spl/spl_mmc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Nikita Kiryanov Dec. 1, 2015, 12:10 p.m. UTC | #1
On Mon, Nov 30, 2015 at 10:19:07AM -0700, Simon Glass wrote:
> The 'p' suffix makes it more obvious that we are dealing with a pointer
> to a (pointer) value that will be returned to its caller.

Acked-by: Nikita Kiryanov <nikita@compulab.co.il>

> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  common/spl/spl_mmc.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
diff mbox

Patch

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 9df4786..8d47059 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -79,12 +79,12 @@  int spl_mmc_get_device_index(u32 boot_device)
 }
 
 #ifdef CONFIG_DM_MMC
-static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
+static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
 {
 	struct udevice *dev;
 	int err, mmc_dev;
 
-	*mmc = NULL;
+	*mmcp = NULL;
 	mmc_dev = spl_mmc_get_device_index(boot_device);
 	if (mmc_dev < 0)
 		return mmc_dev;
@@ -105,11 +105,11 @@  static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
 		return err;
 	}
 
-	*mmc = mmc_get_mmc_dev(dev);
-	return *mmc != NULL ? 0 : -ENODEV;
+	*mmcp = mmc_get_mmc_dev(dev);
+	return *mmcp != NULL ? 0 : -ENODEV;
 }
 #else
-static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
+static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
 {
 	int err, mmc_dev;
 
@@ -126,8 +126,8 @@  static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
 	}
 
 	/* We register only one device. So, the dev id is always 0 */
-	*mmc = find_mmc_device(mmc_dev);
-	if (!*mmc) {
+	*mmcp = find_mmc_device(mmc_dev);
+	if (!*mmcp) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
 		puts("spl: mmc device not found\n");
 #endif