Re: [PATCH v4 2/2] mmc: core: Support packed command for eMMC4.5 device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -1065,12 +1075,60 @@ static int mmc_blk_err_check(struct mmc_card
> *card,
>  	if (!brq->data.bytes_xfered)
>  		return MMC_BLK_RETRY;
>
> +	if (mq_mrq->packed_cmd != MMC_PACKED_NONE) {
> +		if (unlikely(brq->data.blocks << 9 != brq->data.bytes_xfered))
> +			return MMC_BLK_PARTIAL;
> +		else
> +			return MMC_BLK_SUCCESS;
> +	}
> +
>  	if (blk_rq_bytes(req) != brq->data.bytes_xfered)
>  		return MMC_BLK_PARTIAL;
>
>  	return MMC_BLK_SUCCESS;
>  }
I think it would be best to keep the request length (brq->data.blocks << 9
or blk_rq_bytes(req)) in a variable and use it in the original if above.
This way you can avoid doubling the exit points from the function.
Thanks,
Maya Erez
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum



--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux