[PATCH 0/2] Improve request handling code flow and clarify function naming for dw_mmc

Shawn Lin posted 2 patches 1 day, 3 hours ago
drivers/mmc/host/dw_mmc.c | 58 +++++++++++++++++------------------------------
1 file changed, 21 insertions(+), 37 deletions(-)
[PATCH 0/2] Improve request handling code flow and clarify function naming for dw_mmc
Posted by Shawn Lin 1 day, 3 hours ago
This patch series aims to simplify the request handling logic and enhance
code readability in the dw_mmc driver by addressing suboptimal function
naming and unnecessary abstraction layers.

The dw_mmc's request handling routines currently include multiple functions
with confusing names and redundant responsibilities:
- dw_mci_request() serves as the mmc_host_ops entry point.
- dw_mci_queue_request() was used for queuing requests, but with the removal of
  multi-slot support, it no longer performs any meaningful queuing operations.
- dw_mci_start_request() acts as a thin wrapper around __dw_mci_start_request(),
  adding unnecessary indirection.
- __dw_mci_start_request() contains the actual core implementation.

This naming hierarchy not only obscures the true function roles but also creates
a misleading impression of queuing behavior, which no longer exists. Simplifying
this flow and aligning names with actual functionality significantly improves
code clarity and maintainability.



Shawn Lin (2):
  mmc: dw_mmc: Inline dw_mci_queue_request() into dw_mci_request()
  mmc: dw_mmc: Remove dw_mci_start_request wrapper and rename core
    function

 drivers/mmc/host/dw_mmc.c | 58 +++++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 37 deletions(-)

-- 
2.7.4
Re: [PATCH 0/2] Improve request handling code flow and clarify function naming for dw_mmc
Posted by Ulf Hansson 23 hours ago
On Tue, 31 Mar 2026 at 09:54, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>
>
> This patch series aims to simplify the request handling logic and enhance
> code readability in the dw_mmc driver by addressing suboptimal function
> naming and unnecessary abstraction layers.
>
> The dw_mmc's request handling routines currently include multiple functions
> with confusing names and redundant responsibilities:
> - dw_mci_request() serves as the mmc_host_ops entry point.
> - dw_mci_queue_request() was used for queuing requests, but with the removal of
>   multi-slot support, it no longer performs any meaningful queuing operations.
> - dw_mci_start_request() acts as a thin wrapper around __dw_mci_start_request(),
>   adding unnecessary indirection.
> - __dw_mci_start_request() contains the actual core implementation.
>
> This naming hierarchy not only obscures the true function roles but also creates
> a misleading impression of queuing behavior, which no longer exists. Simplifying
> this flow and aligning names with actual functionality significantly improves
> code clarity and maintainability.
>
>
>
> Shawn Lin (2):
>   mmc: dw_mmc: Inline dw_mci_queue_request() into dw_mci_request()
>   mmc: dw_mmc: Remove dw_mci_start_request wrapper and rename core
>     function
>
>  drivers/mmc/host/dw_mmc.c | 58 +++++++++++++++++------------------------------
>  1 file changed, 21 insertions(+), 37 deletions(-)
>
> --
> 2.7.4
>

The series applied for next, thanks!

Kind regards
Uffe