Yes, you are right this is redundant check, mmci_validate_data in mmci_request should catch this error anyway. we can remove this check totally and use your original patch.writel(host->size, base + MMCIDATALENGTH);I don't like this BUG_ON at all, I would prefer if we remove it. The
>
>- blksz_bits = ffs(data->blksz) - 1;
>- BUG_ON(1 << blksz_bits != data->blksz);
original patch "mmc: mmci: Support any block sizes for ux500v2", did
so as well.
Now, if we still think removing it is fragile, let additional tests in--
mmci_validate_data() and return and error code from there.