From: Adrian Hunter <adrian.hunter@intel.com>
To: Alamy Liu <alamy.liu@gmail.com>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mmc: cqhci: replace NUM_SLOTS with cq_host->num_slots
Date: Thu, 31 Jan 2019 11:32:59 +0200 [thread overview]
Message-ID: <ee3dc963-53f0-e362-caa5-069ce0e6eae7@intel.com> (raw)
In-Reply-To: <20190114191724.29960-1-alamy.liu@gmail.com>
On 14/01/19 9:17 PM, Alamy Liu wrote:
> Prevent to use fixed value (NUM_SLOTS) after it had been determined
> and saved in a variable (cq_host->num_slots).
num_slots is always 32 (i.e. NUM_SLOTS) so why not go the other way and get
rid of num_slots and just use NUM_SLOTS?
>
> Signed-off-by: Alamy Liu <alamy.liu@gmail.com>
> ---
> 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;
>
next prev parent reply other threads:[~2019-01-31 9:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 19:17 [PATCH 1/2] mmc: cqhci: replace NUM_SLOTS with cq_host->num_slots Alamy Liu
2019-01-14 19:17 ` [PATCH 2/2] mmc: cqhci: replace DCMD_SLOT with cq_host->dcmd_slot Alamy Liu
2019-01-31 9:35 ` Adrian Hunter
2019-01-28 11:38 ` [PATCH 1/2] mmc: cqhci: replace NUM_SLOTS with cq_host->num_slots Ulf Hansson
2019-01-31 9:32 ` Adrian Hunter [this message]
[not found] ` <CAJ3kudsgJsZ1KFXdD9Vnfx0GypnEf+ba-D8t+Wy1e8GdLF=U0w@mail.gmail.com>
[not found] ` <362c073b-d795-4431-f1dd-c203cc606a6f@codeaurora.org>
2019-02-08 10:34 ` Asutosh Das (asd)
2019-02-08 18:41 ` Alamy Liu
2019-02-11 8:56 ` Adrian Hunter
2019-02-11 23:04 ` Alamy Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee3dc963-53f0-e362-caa5-069ce0e6eae7@intel.com \
--to=adrian.hunter@intel.com \
--cc=alamy.liu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox