mmc: block: remove the check of packed for packed request routine
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 26 Aug 2016 00:49:55 +0000 (08:49 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Sep 2016 19:31:15 +0000 (21:31 +0200)
commit96e52daa508bf349582e41911da66461b54dcc12
tree9a96bd3a7f811e91e28500b99fa154f777e63453
parent67d35960f445176d5548c660a1b1708cad1c2042
mmc: block: remove the check of packed for packed request routine

packed should always exist without calling its cleanup function
explicitly. Moreover, we have use it when preparing packed list.
So I don't believe we should ever fall into this check again when
doing mmc_blk_packed_hdr_wrq_prep or mmc_blk_end_packed_req,etc.
And the code of mmc_blk_end_packed_req is trying to use packed before
checking it which makes it quite weird. This patch is trying to
remove these two checks and move it to the mmc_blk_prep_packed_list.
If we find packed is null, then we should never use MMC_BLK_PACKED_CMD.
By doing this, we could fall back to non-packed request if finding null
packed, though it's impossible theoretically.

After removing these two BUG_ONs, we also remove all other similar
checks within the routine of mmc_blk_issue_rw_rq which checks the
error handling of packed request.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/card/block.c