diff mbox

[v3,1/10] mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd

Message ID 583f6496-68a9-b8e1-6b25-1f073f819a3c@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Heiner Kallweit Feb. 18, 2017, 11:50 a.m. UTC
Core ensures that there are no commands with cmd->data being set and
nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM
because cmd_cfg was zero-initialized and this bit isn't set.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
---
v2:
- adjusted commit message because branch xfer_bytes == 0 is never reached
- added acked-by
v3:
- no changes
---
 drivers/mmc/host/meson-gx-mmc.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Kevin Hilman March 1, 2017, 6:09 p.m. UTC | #1
Hi Heinar,

Heiner Kallweit <hkallweit1@gmail.com> writes:

> Core ensures that there are no commands with cmd->data being set and
> nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM
> because cmd_cfg was zero-initialized and this bit isn't set.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> Acked-by: Kevin Hilman <khilman@baylibre.com>

Could you send this series one more time, collecting the remaining tags
and including the patches from Michał Zegan?

I think the MMC maintainers would appreciate one final batch with
everything collected together, and including a cover letter.

Thanks for all your great work on improving this driver,

Kevin
Heiner Kallweit March 1, 2017, 8:20 p.m. UTC | #2
Am 01.03.2017 um 19:09 schrieb Kevin Hilman:
> Hi Heinar,
> 
> Heiner Kallweit <hkallweit1@gmail.com> writes:
> 
>> Core ensures that there are no commands with cmd->data being set and
>> nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM
>> because cmd_cfg was zero-initialized and this bit isn't set.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> Acked-by: Kevin Hilman <khilman@baylibre.com>
> 
> Could you send this series one more time, collecting the remaining tags
> and including the patches from Michał Zegan?
> 
Patchwork tracks all the tags coming in for a patch, there it's visible
that you acked my 10 patches + the two from Michal.
So I would leave it up to Ulf whether he prefers to have the series
re-sent (with just the few remaining acks as changes).

Heiner

> I think the MMC maintainers would appreciate one final batch with
> everything collected together, and including a cover letter.
> 
> Thanks for all your great work on improving this driver,
> 
> Kevin
>
Kevin Hilman March 3, 2017, 6:17 p.m. UTC | #3
Heiner Kallweit <hkallweit1@gmail.com> writes:

> Am 01.03.2017 um 19:09 schrieb Kevin Hilman:
>> Hi Heinar,
>> 
>> Heiner Kallweit <hkallweit1@gmail.com> writes:
>> 
>>> Core ensures that there are no commands with cmd->data being set and
>>> nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM
>>> because cmd_cfg was zero-initialized and this bit isn't set.
>>>
>>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>>> Acked-by: Kevin Hilman <khilman@baylibre.com>
>> 
>> Could you send this series one more time, collecting the remaining tags
>> and including the patches from Michał Zegan?
>> 
> Patchwork tracks all the tags coming in for a patch, there it's visible
> that you acked my 10 patches + the two from Michal.

Yes, I'm well aware of how patchwork works, yet my request still stands.

> So I would leave it up to Ulf whether he prefers to have the series
> re-sent (with just the few remaining acks as changes).

That's your choice, but some friendly advice from a kernel maintainer:
making things as easy as possible for maintainers/reviewers greatly
improves speed your code will get merged.

Kevin
diff mbox

Patch

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 5a959783..07a7399c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -516,14 +516,7 @@  static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd)
 			desc->cmd_cfg &= ~CMD_CFG_DATA_WR;
 		}
 
-		if (xfer_bytes > 0) {
-			desc->cmd_cfg &= ~CMD_CFG_DATA_NUM;
-			desc->cmd_data = host->bounce_dma_addr & CMD_DATA_MASK;
-		} else {
-			/* write data to data_addr */
-			desc->cmd_cfg |= CMD_CFG_DATA_NUM;
-			desc->cmd_data = 0;
-		}
+		desc->cmd_data = host->bounce_dma_addr & CMD_DATA_MASK;
 
 		cmd_cfg_timeout = 12;
 	} else {