Re: [RFC PATCH] mmc: remove the MMC_DATA_STREAM flag

Robert Jarzmik
2016-01-23T17:59:30Z

Jaehoon Chung <jh80.chung@samsung.com> writes:

> It's not set to MMC_DATA_STREAM anywhere.
> It seems that it had used with CMD11/20. But now CMD11/20 didn't also use.
> I didn't know what is exactly, so i sent the patch as just RFC.
> If i get some comments for this, i will resend the patch after separate to each host controller.
>
> If MMC_DATA_STREAM can be removed, then flags of data should be then one of
> MMC_DATA_READ and MMC_DATA_WRITE.
The commit message won't pass checkpatch, will it ?

> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1525,13 +1525,13 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
> }
> if (rq_data_dir(req) == READ) {
> brq->cmd.opcode = readcmd;
> - brq->data.flags |= MMC_DATA_READ;
> + brq->data.flags = MMC_DATA_READ;
Why this chunk ? If the caller had already set some flags of its own, why
overwrite them ? That has no connection to MMC_DATA_STREAM I can see.
...
> - brq->data.flags |= MMC_DATA_WRITE;
> + brq->data.flags = MMC_DATA_WRITE;
Ditto.
> - brq->data.flags |= MMC_DATA_WRITE;
> + brq->data.flags = MMC_DATA_WRITE;
Ditto.

... drivers not within my area zapped ...

> diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
> index ce08896..4285d3a 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
Works for me.

Cheers.

--
Robert