diff mbox series

[1/2] mmc: cqhci: replace NUM_SLOTS with cq_host->num_slots

Message ID 20190128223654.18209-1-alamy.liu@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] mmc: cqhci: replace NUM_SLOTS with cq_host->num_slots | expand

Commit Message

Alamy Liu Jan. 28, 2019, 10:36 p.m. UTC
Prevent to use fixed value (NUM_SLOTS) after it had been determined
and saved in a variable (cq_host->num_slots).

Signed-off-by: Alamy Liu <alamy.liu@gmail.com>
---
 drivers/mmc/host/cqhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson Jan. 31, 2019, 7:34 a.m. UTC | #1
On Mon, 28 Jan 2019 at 23:36, Alamy Liu <alamy.liu@gmail.com> wrote:
>
> Prevent to use fixed value (NUM_SLOTS) after it had been determined
> and saved in a variable (cq_host->num_slots).
>
> Signed-off-by: Alamy Liu <alamy.liu@gmail.com>

Alamy, I realized that we didn't really have maintainers for cqhci
listed in MAINTAINERS.

However, Ritesh, Asutosh Das and Adrian has now volunteered to help
out. Would you mind re-posting all your 4 patches that I have in my
stack for cqhci, to let these guys provide their opinions. The updated
MAINTAINERS are available in my next branch.

Apologize for the inconvenience!

Kind regards
Uffe

> ---
>  drivers/mmc/host/cqhci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c
> index 159270e947..26d63594b7 100644
> --- a/drivers/mmc/host/cqhci.c
> +++ b/drivers/mmc/host/cqhci.c
> @@ -699,7 +699,7 @@ static void cqhci_error_irq(struct mmc_host *mmc, u32 status, int cmd_error,
>                  * The only way to guarantee forward progress is to mark at
>                  * least one task in error, so if none is indicated, pick one.
>                  */
> -               for (tag = 0; tag < NUM_SLOTS; tag++) {
> +               for (tag = 0; tag < cq_host->num_slots; tag++) {
>                         slot = &cq_host->slot[tag];
>                         if (!slot->mrq)
>                                 continue;
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c
index 159270e947..26d63594b7 100644
--- a/drivers/mmc/host/cqhci.c
+++ b/drivers/mmc/host/cqhci.c
@@ -699,7 +699,7 @@  static void cqhci_error_irq(struct mmc_host *mmc, u32 status, int cmd_error,
 		 * The only way to guarantee forward progress is to mark at
 		 * least one task in error, so if none is indicated, pick one.
 		 */
-		for (tag = 0; tag < NUM_SLOTS; tag++) {
+		for (tag = 0; tag < cq_host->num_slots; tag++) {
 			slot = &cq_host->slot[tag];
 			if (!slot->mrq)
 				continue;