Re: [PATCH 1/5] mmc: block: Move duplicate check

2017-06-15 Thread Shawn Lin
Hi, On 2017/6/15 20:12, Linus Walleij wrote: mmc_blk_ioctl() calls either mmc_blk_ioctl_cmd() or mmc_blk_ioctl_multi_cmd() and each of these make the same check. Factor it into a new helper function, call it on both branches of the switch() statement and save a chunk of duplicate code. Cc:

[PATCH 1/5] mmc: block: Move duplicate check

2017-06-15 Thread Linus Walleij
mmc_blk_ioctl() calls either mmc_blk_ioctl_cmd() or mmc_blk_ioctl_multi_cmd() and each of these make the same check. Factor it into a new helper function, call it on both branches of the switch() statement and save a chunk of duplicate code. Cc: Shawn Lin Signed-off-by: