Skip to content
Commit b305882f authored by Sergio Valverde's avatar Sergio Valverde Committed by Ulf Hansson
Browse files

mmc: core: optimize mmc_calc_max_discard



If the max_discard value is zero, the conditional branch that checks the
trim capabilities will never update this value with max_trim.

Change the condition statement to also check the max_discard value in order
to avoid an unnecessary call to mmc_do_calc_max_discard.

Signed-off-by: default avatarSergio Valverde <vlvrdv@gmail.com>
Reviewed-by: default avatarShawn Lin <shawn.lin@rock-chip.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5a871bf0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment