mmc: remove redundant irq disabling
PATCH 1/1 mmc: remove redundant irq disabling
From: John Ogness <[email protected]>
There is no need to disable irq's when using the sg_copy_*_buffer() functions because those functions do that already. There are also no races for the mm_queue struct here that would require the irq's to be disabled before calling sg_copy_*_buffer().
---
Patch against linux-next-20110324.
drivers/mmc/card/queue.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-)
drivers/mmc/card/queue.c +0 -8
@@ -343,18 +343,14 @@ unsigned int mmc_queue_map_sg(struct mmc_queue *mq)*/ void mmc_queue_bounce_pre (struct mmc_queue *mq) { -unsigned long flags; -if (!mq->bounce_buf)return ;if (rq_data_dir (mq->req) !=WRITE )return ; -local_irq_save (flags);sg_copy_to_buffer (mq->bounce_sg, mq->bounce_sg_len, mq->bounce_buf, mq->sg[0 ].length); -local_irq_restore (flags); }/*
@@ -363,17 +359,13 @@ void mmc_queue_bounce_pre(struct mmc_queue *mq)*/ void mmc_queue_bounce_post (struct mmc_queue *mq) { -unsigned long flags; -if (!mq->bounce_buf)return ;if (rq_data_dir (mq->req) !=READ )return ; -local_irq_save (flags);sg_copy_from_buffer (mq->bounce_sg, mq->bounce_sg_len, mq->bounce_buf, mq->sg[0 ].length); -local_irq_restore (flags); }
Signature · 1 line
1.7.2.5
Hi John,
Quoted 44 lines · John Ogness
From: John Ogness <[email protected]>
There is no need to disable irq's when using the sg_copy_*_buffer() functions because those functions do that already. There are also no races for the
mm_queuestruct here that would require the irq's to be disabled before calling sg_copy_*_buffer().Signed-off-by John Ogness <[email protected]>---
Patch against linux-next-20110324.drivers/mmc/card/queue.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-)drivers/mmc/card/queue.c +0
-6@@ -343,18 +343,14 @@ unsigned int mmc_queue_map_sg(struct mmc_queue *mq)*/ void mmc_queue_bounce_pre (struct mmc_queue *mq) { -unsigned long flags; -if (!mq->bounce_buf)return ;if (rq_data_dir (mq->req) !=WRITE )return ; -local_irq_save (flags);sg_copy_to_buffer (mq->bounce_sg, mq->bounce_sg_len, mq->bounce_buf, mq->sg[0 ].length); -local_irq_restore (flags); }/* @@ -363,17 +359,13 @@ void mmc_queue_bounce_pre(struct mmc_queue *mq)*/ void mmc_queue_bounce_post (struct mmc_queue *mq) { -unsigned long flags; -if (!mq->bounce_buf)
drivers/mmc/card/queue.c void mmc_queue_bounce_pre(struct mmc_queue *mq) · line 370
Quoted 10 lines
drivers/mmc/card/queue.c +0
-2return ;if (rq_data_dir (mq->req) !=READ )return ; -local_irq_save (flags);sg_copy_from_buffer (mq->bounce_sg, mq->bounce_sg_len, mq->bounce_buf, mq->sg[0 ].length); -local_irq_restore (flags); }
Thanks, I'll push this to mmc-next for .40.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child