public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: John Ogness <john.ogness@linutronix.de>
Cc: Jens Axboe <jaxboe@fusionio.com>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH 1/1] mmc: remove redundant irq disabling
Date: Fri, 25 Mar 2011 09:22:57 -0400	[thread overview]
Message-ID: <m3tyerl4ge.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <87zkoj7fiu.fsf@vostro.fn.ogness.net> (John Ogness's message of "Fri, 25 Mar 2011 09:47:37 +0100")

Hi John,

On Fri, Mar 25 2011, John Ogness wrote:
> From: John Ogness <john.ogness@linutronix.de>
>
> 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().
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
> Patch against linux-next-20110324.
>
>  drivers/mmc/card/queue.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
> index 2ae7275..c07322c 100644
> --- a/drivers/mmc/card/queue.c
> +++ b/drivers/mmc/card/queue.c
> @@ -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);
>  }

Thanks, I'll push this to mmc-next for .40.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

      reply	other threads:[~2011-03-25 13:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25  8:47 [PATCH 1/1] mmc: remove redundant irq disabling John Ogness
2011-03-25 13:22 ` Chris Ball [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tyerl4ge.fsf@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=jaxboe@fusionio.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox