Skip to contentSkip to conversation

common: fixed linker-list example

PATCH Superseded Mateusz Zalega 3 participants 8 messages Apr 29, 2014 – May 23, 2014 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: fixed linker-list example

Last argument shouldn't be there.

Change-Id Ie227f4bee2c542b15c1a7089894532366ec89a1d
Cc Tom Rini <[email protected]>

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

There were no changes since the first version of this patch.

---
 include/linker_lists.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linker_lists.h +1 -1
index 997d149..557e627 100644
@@ -228,7 +228,7 @@
  * and it's name.
  *
  * Example:
- * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub) = {
+ * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {
  *         .x = 3,
  *         .y = 4,
  * };
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 mmc: postponed needless timer initialization

mmc_init() doesn't call get_timer() anymore if MMC is already initialized.

Change-Id Iec694abe3315d146d35dc130ad80b73dffd0983b
Cc Pantelis Antoniou <[email protected]>

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

There were no changes since the first version of this patch.

---
 drivers/mmc/mmc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +5 -2
index 16051e5..c93dc24 100644
@@ -1310,15 +1310,18 @@ static int mmc_complete_init(struct mmc *mmc)
 int mmc_init(struct mmc *mmc)
 {
 	int err = IN_PROGRESS;
-	unsigned start = get_timer(0);
+	unsigned start;
 
 	if (mmc->has_init)
 		return 0;
+
+	start = get_timer(0);
+
 	if (!mmc->init_in_progress)
 		err = mmc_start_init(mmc);
-
 	if (!err || err == IN_PROGRESS)
 		err = mmc_complete_init(mmc);
+
 	debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
 	return err;
 }
Signature · 1 line
1.9.0
#2 lore raw

PATCH 1/1 mmc: postponed needless timer initialization

Hi Mateusz,

Looks good. I'll apply it.

Quoted 43 lines · Mateusz Zalega

mmc_init() doesn't call get_timer() anymore if MMC is already initialized.

Change-Id Iec694abe3315d146d35dc130ad80b73dffd0983b
Cc Pantelis Antoniou <[email protected]>

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

There were no changes since the first version of this patch.
---
drivers/mmc/mmc.c | 7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +5 -2
index 16051e5..c93dc24 100644
@@ -1310,15 +1310,18 @@ static int mmc_complete_init(struct mmc *mmc)
 int mmc_init(struct mmc *mmc)
 {
 	int err = IN_PROGRESS;
-	unsigned start = get_timer(0);
+	unsigned start;
 
 	if (mmc->has_init)
 		return 0;
+
+	start = get_timer(0);
+
 	if (!mmc->init_in_progress)
 		err = mmc_start_init(mmc);
-
 	if (!err || err == IN_PROGRESS)
 		err = mmc_complete_init(mmc);
+
 	debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
 	return err;
 }
Signature · 1 line
1.9.0
#3 lore raw

PATCH v2 1/1 mmc: postponed needless timer initialization

In reply to Mateusz Zalega

mmc_init() doesn't call get_timer() anymore if MMC is already initialized.

Cc Pantelis Antoniou <[email protected]>

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

v2:
- deleted change-id line from commit message, sorry!

---
 drivers/mmc/mmc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +5 -2
index 16051e5..c93dc24 100644
@@ -1310,15 +1310,18 @@ static int mmc_complete_init(struct mmc *mmc)
 int mmc_init(struct mmc *mmc)
 {
 	int err = IN_PROGRESS;
-	unsigned start = get_timer(0);
+	unsigned start;
 
 	if (mmc->has_init)
 		return 0;
+
+	start = get_timer(0);
+
 	if (!mmc->init_in_progress)
 		err = mmc_start_init(mmc);
-
 	if (!err || err == IN_PROGRESS)
 		err = mmc_complete_init(mmc);
+
 	debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
 	return err;
 }
Signature · 1 line
1.9.0
#4 lore raw

PATCH v2 1/1 mmc: postponed needless timer initialization

Hi Pantelis,

Quoted 30 lines

mmc_init() doesn't call get_timer() anymore if MMC is already initialized.

Cc Pantelis Antoniou <[email protected]>

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

v2:
- deleted change-id line from commit message, sorry!

---
 drivers/mmc/mmc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +3 -1
index 16051e5..c93dc24 100644
@@ -1310,15 +1310,18 @@ static int mmc_complete_init(struct mmc *mmc)
 int mmc_init(struct mmc *mmc)
 {
 	int err = IN_PROGRESS;
-	unsigned start = get_timer(0);
+	unsigned start;
 
 	if (mmc->has_init)
 		return 0;
+
+	start = get_timer(0);

drivers/mmc/mmc.c static int mmc_complete_init(struct mmc *mmc) · line 1327

Quoted 10 lines
drivers/mmc/mmc.c +2 -1
+
 	if (!mmc->init_in_progress)
 		err = mmc_start_init(mmc);
-
 	if (!err || err == IN_PROGRESS)
 		err = mmc_complete_init(mmc);
+
 	debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
 	return err;
 }

Would you find some time to review this patch?

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#5 lore raw

PATCH v2 1/1 mmc: postponed needless timer initialization

In reply to Mateusz Zalega

Hi Mateusz,

Quoted 27 lines · Mateusz Zalega

mmc_init() doesn't call get_timer() anymore if MMC is already initialized.

Cc Pantelis Antoniou <[email protected]>

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

v2:
- deleted change-id line from commit message, sorry!
---
drivers/mmc/mmc.c | 7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +1 -1
index 16051e5..c93dc24 100644
@@ -1310,15 +1310,18 @@ static int mmc_complete_init(struct mmc *mmc)
 int mmc_init(struct mmc *mmc)
 {
 	int err = IN_PROGRESS;
-	unsigned start = get_timer(0);
+	unsigned start;
 
 	if (mmc->has_init)

drivers/mmc/mmc.c static int mmc_complete_init(struct mmc *mmc) · line 1324

Quoted 10 lines
drivers/mmc/mmc.c +4 -1
 		return 0;
+
+	start = get_timer(0);
+
 	if (!mmc->init_in_progress)
 		err = mmc_start_init(mmc);
-
 	if (!err || err == IN_PROGRESS)
 		err = mmc_complete_init(mmc);
+

^ some extra formatting here that's not needed; I'll fix it and apply.

I am curious what the problem was the problem with getting the timer?

Quoted 6 lines
drivers/mmc/mmc.c +0 -0
 	debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
 	return err;
 }
Signature · 1 line
1.9.0

Applied

Thanks

-- Pantelis

#6 lore raw

PATCH v2 1/1 common: fixed linker-list example

In reply to Mateusz Zalega

Last argument shouldn't be there.

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

v2:
- deleted change-id line from commit message, sorry!

---
 include/linker_lists.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linker_lists.h +1 -1
index 997d149..557e627 100644
@@ -228,7 +228,7 @@
  * and it's name.
  *
  * Example:
- * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub) = {
+ * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {
  *         .x = 3,
  *         .y = 4,
  * };
Signature · 1 line
1.9.0
#7 lore raw

PATCH v2 1/1 common: fixed linker-list example

Hi Mateusz,

Quoted 11 lines

Last argument shouldn't be there.

---
Detached from earlier "DFU, MMC, Gadget, Goni, misc." series because of lack of relevance to other patches.

v2:
- deleted change-id line from commit message, sorry!

Applied to u-boot-dfu. Thanks.

Quoted 18 lines
---
 include/linker_lists.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linker_lists.h +1 -1
index 997d149..557e627 100644
@@ -228,7 +228,7 @@
  * and it's name.
  *
  * Example:
- * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub)
 = {
+ * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {
  *         .x = 3,
  *         .y = 4,

* };

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group