Re: [PATCH 13/29] memstick: core: stop passing pointer to card->current_mrq

From: Alex Dubov
Date: Mon Oct 25 2010 - 11:41:29 EST




--- On Fri, 22/10/10, Maxim Levitsky <maximlevitsky@xxxxxxxxx> wrote:

> From: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
> Subject: [PATCH 13/29] memstick: core: stop passing pointer to card->current_mrq
> To: "Alex Dubov" <oakad@xxxxxxxxx>
> Cc: "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>, "LKML" <linux-kernel@xxxxxxxxxxxxxxx>, "Maxim Levitsky" <maximlevitsky@xxxxxxxxx>
> Received: Friday, 22 October, 2010, 4:53 PM
> This cleans up a lot of code and
> makes the assumption
> (*mrq == &card->current_mrq) official.
>
> Signed-off-by: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
> ---

Unfortunately, the description does not match the patch.
While the main optimization (merging req and card arguments for good) is
fully reasonable given the posterior knowledge of MSPro evolution, this
patch introduces some functional changes as well, which can not be
considered to be a pure cleanup. Some WARN_ONs also appear to be misplaced:

> if (msb->block_req) {
> - mspro_block_complete_req(card, (*mrq)->error);
> + mspro_block_complete_req(card, mrq->error);
> error = mspro_block_issue_req(card, false);
>
> - if (!msb->block_req) {
> + if (error) {
> + WARN_ON(msb->block_req);





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