linux-stable/include/linux/mmc
Linus Walleij 8e8b3f514c mmc: core: use enum mmc_blk_status properly
There were several instances of code using the
enum mmc_blk_status by arbitrarily converting it to an int and
throwing it around to different functions. This makes the code
hard to understand to may give rise to strange errors.

Especially the function prototype mmc_start_req() had to be
modified to take a pointer to an enum mmc_blk_status and the
function pointer .err_check() inside struct mmc_async_req
needed to return an enum mmc_blk_status.

In every case: instead of assigning the block layer error code
to an int, use the enum, also change the signature of all
functions actually passing this enum to use the enum.

To make it possible to use the enum everywhere applicable, move
it to <linux/mmc/core.h> so that all code actually using it can
also see it.

An interesting case was encountered in the MMC test code which
did not return a enum mmc_blk_status at all in the .err_check
function supposed to check whether asynchronous requests worked
or not: instead it returned a normal -ERROR or even the test
frameworks internal error codes.

The test code would also pass on enum mmc_blk_status codes as
error codes inside the test code instead of converting them
to the local RESULT_* codes.

I have tried to fix all instances properly and run some tests
on the result.

Cc: Chunyan Zhang <zhang.chunyan@linaro.org>
Cc: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-11-29 09:00:51 +01:00
..
boot.h
card.h mmc: core: use enum mmc_blk_status properly 2016-11-29 09:00:51 +01:00
core.h mmc: core: use enum mmc_blk_status properly 2016-11-29 09:00:51 +01:00
dw_mmc.h mmc: dw_mmc: add reset support to dwmmc host controller 2016-09-26 21:31:19 +02:00
host.h mmc: core: use enum mmc_blk_status properly 2016-11-29 09:00:51 +01:00
mmc.h mmc: core: implement enhanced strobe support 2016-07-25 10:34:05 +02:00
pm.h
sd.h
sdhci-pci-data.h mmc: sdhci-pci: Add support for drive strength selection for SPT 2015-06-01 09:07:14 +02:00
sdio.h
sdio_func.h
sdio_ids.h brcmfmac: add support for bcm4339 chip with modalias sdio:c00v02D0d4339 2016-09-09 12:12:14 +03:00
sh_mmcif.h
slot-gpio.h mmc: core: expose the capability of gpio card detect 2016-11-29 09:00:37 +01:00