Skip to contentSkip to conversation

spl: mmc: Fix indentation in spl_mmc.c file

PATCH New Lukasz Majewski 2 participants 3 messages Sep 3, 2019 – Oct 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: mmc: Fix indentation in spl_mmc.c file

From: Mans Rullgard <[email protected]>

This fixes a wrongly indented block of code.

[lukma: Make the commit message more verbose]

---

 common/spl/spl_mmc.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)
common/spl/spl_mmc.c +20 -20
index b3619889f7..2caceb5186 100644
@@ -334,28 +334,28 @@ int spl_mmc_load(struct spl_image_info *spl_image,
 	err = -EINVAL;
 	switch (boot_mode) {
 	case MMCSD_MODE_EMMCBOOT:
-			/*
-			 * We need to check what the partition is configured to.
-			 * 1 and 2 match up to boot0 / boot1 and 7 is user data
-			 * which is the first physical partition (0).
-			 */
-			part = (mmc->part_config >> 3) & PART_ACCESS_MASK;
-
-			if (part == 7)
-				part = 0;
-
-			if (CONFIG_IS_ENABLED(MMC_TINY))
-				err = mmc_switch_part(mmc, part);
-			else
-				err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
-
-			if (err) {
+		/*
+		 * We need to check what the partition is configured to.
+		 * 1 and 2 match up to boot0 / boot1 and 7 is user data
+		 * which is the first physical partition (0).
+		 */
+		part = (mmc->part_config >> 3) & PART_ACCESS_MASK;
+
+		if (part == 7)
+			part = 0;
+
+		if (CONFIG_IS_ENABLED(MMC_TINY))
+			err = mmc_switch_part(mmc, part);
+		else
+			err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
+
+		if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-				puts("spl: mmc partition switch failed\n");
+			puts("spl: mmc partition switch failed\n");
 #endif
-				return err;
-			}
-			/* Fall through */
+			return err;
+		}
+		/* Fall through */
 	case MMCSD_MODE_RAW:
 		debug("spl: mmc boot mode: raw\n");
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 spl: mmc: Fix indentation in spl_mmc.c file

Dear Tom,

Quoted 8 lines

From: Mans Rullgard <[email protected]>

This fixes a wrongly indented block of code.

[lukma: Make the commit message more verbose]

Tom, are there any issues preventing this patch from being applied to -master?

Quoted 53 lines

---

 common/spl/spl_mmc.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)
common/spl/spl_mmc.c +0 -2
index b3619889f7..2caceb5186 100644
@@ -334,28 +334,28 @@ int spl_mmc_load(struct spl_image_info
 *spl_image, err = -EINVAL;
 	switch (boot_mode) {
 	case MMCSD_MODE_EMMCBOOT:
-			/*
-			 * We need to check what the partition is

configured to.

common/spl/spl_mmc.c +0 -1
-			 * 1 and 2 match up to boot0 / boot1 and 7

is user data

common/spl/spl_mmc.c +0 -3
-			 * which is the first physical partition (0).
-			 */
-			part = (mmc->part_config >> 3) &

PART_ACCESS_MASK; -

common/spl/spl_mmc.c +0 -7
-			if (part == 7)
-				part = 0;
-
-			if (CONFIG_IS_ENABLED(MMC_TINY))
-				err = mmc_switch_part(mmc, part);
-			else
-				err =

blk_dselect_hwpart(mmc_get_blk_desc(mmc), part); -

common/spl/spl_mmc.c +2 -1
-			if (err) {
+		/*
+		 * We need to check what the partition is configured

to.

common/spl/spl_mmc.c +1 -0
+		 * 1 and 2 match up to boot0 / boot1 and 7 is user

data

common/spl/spl_mmc.c +11 -0
+		 * which is the first physical partition (0).
+		 */
+		part = (mmc->part_config >> 3) & PART_ACCESS_MASK;
+
+		if (part == 7)
+			part = 0;
+
+		if (CONFIG_IS_ENABLED(MMC_TINY))
+			err = mmc_switch_part(mmc, part);
+		else
+			err =

blk_dselect_hwpart(mmc_get_blk_desc(mmc), part); +

common/spl/spl_mmc.c +1 -1
+		if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-				puts("spl: mmc partition switch

failed\n");

common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info *spl_image, · line 360

Quoted 10 lines
common/spl/spl_mmc.c +4 -3
+			puts("spl: mmc partition switch failed\n");
 #endif
-				return err;
-			}
-			/* Fall through */
+			return err;
+		}
+		/* Fall through */
 	case MMCSD_MODE_RAW:
 		debug("spl: mmc boot mode: raw\n");

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191009/aa147915/attachment.sig>

#2 lore raw

PATCH 1/1 spl: mmc: Fix indentation in spl_mmc.c file

In reply to Lukasz Majewski
Quoted 7 lines · Lukasz Majewski

From: Mans Rullgard <[email protected]>

This fixes a wrongly indented block of code.

[lukma: Make the commit message more verbose]

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191012/6cf6b897/attachment.sig>