Skip to contentSkip to conversation

mci: mci-core: Compile fix

PATCH In review Alexander Shiyan 2 participants 2 messages Apr 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mci: mci-core: Compile fix

Fix compilation error:
drivers/mci/mci-core.c: In function 'mci_part_add':
drivers/mci/mci-core.c:693:32: error: invalid storage class for function 'mmc_extract_gpp_units'
693 | static __maybe_unused unsigned mmc_extract_gpp_units(const char *ecsd_info, unsigned idx)

      |                                ^~~~~~~~~~~~~~~~~~~~~

drivers/mci/mci-core.c:693:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
693 | static __maybe_unused unsigned mmc_extract_gpp_units(const char *ecsd_info, unsigned idx)
...

---
 drivers/mci/mci-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mci/mci-core.c +1 -1
index 76d679ed2e..2c82379b0d 100644
@@ -676,7 +676,7 @@ static void mci_part_add(struct mci *mci, uint64_t size,
 
 	if (area_type == MMC_BLK_DATA_AREA_RPMB)
 		mci->rpmb_part = part;
-	else if (area_type == MMC_BLK_DATA_AREA_MAIN) {
+	else if (area_type == MMC_BLK_DATA_AREA_MAIN)
 		cdev_set_of_node(&part->blk.cdev, mci->host->hw_dev->of_node);
 
 	mci->nr_parts++;
Signature · 1 line
2.39.1
#1 lore raw
Quoted 19 lines · Alexander Shiyan

Fix compilation error:
drivers/mci/mci-core.c: In function 'mci_part_add':
drivers/mci/mci-core.c:693:32: error: invalid storage class for function 'mmc_extract_gpp_units'
693 | static __maybe_unused unsigned mmc_extract_gpp_units(const char *ecsd_info, unsigned idx)

      |                                ^~~~~~~~~~~~~~~~~~~~~

drivers/mci/mci-core.c:693:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
693 | static __maybe_unused unsigned mmc_extract_gpp_units(const char *ecsd_info, unsigned idx)
...

---
 drivers/mci/mci-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mci/mci-core.c +0 -0
index 76d679ed2e..2c82379b0d 100644

drivers/mci/mci-core.c static void mci_part_add(struct mci *mci, uint64_t size, · line 679

Quoted 5 lines
drivers/mci/mci-core.c +1 -1
@@ -676,7 +676,7 @@ static void mci_part_add(struct mci *mci, uint64_t size,
 
 	if (area_type == MMC_BLK_DATA_AREA_RPMB)
 		mci->rpmb_part = part;
-	else if (area_type == MMC_BLK_DATA_AREA_MAIN) {
+	else if (area_type == MMC_BLK_DATA_AREA_MAIN)

That was a mismerge on the -next branch. I just fixed it up, thanks for noting.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |