public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: jiri.pinkava@vscht.cz, Vimal Singh <vimal.newwork@gmail.com>
Cc: sjhill@realitydiluted.com, tglx@linutronix.de,
	dwmw2@infradead.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] nand: Remove meaningless delay from nand_unlock
Date: Wed, 13 Apr 2011 06:28:29 +0300	[thread overview]
Message-ID: <1302665309.14691.3.camel@koala> (raw)
In-Reply-To: <1302402611-3878-1-git-send-email-jiri.pinkava@vscht.cz>

On Sun, 2011-04-10 at 04:30 +0200, jiri.pinkava@vscht.cz wrote:
> From: Jiří Pinkava <jiri.pinkava@vscht.cz>
> 
> This delay is meaningless. If delay is needed it is device specific
> and must be reimplemented by specific driver, otherwise no delay is needed.
> 
> This function is not used by any current kernel code, affects only
> external code (like main).
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
> ---
>  drivers/mtd/nand/nand_base.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 2aef58e..5b5aff5 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -922,7 +922,6 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
>  
>  	/* Call wait ready function */
>  	status = chip->waitfunc(mtd, chip);
> -	udelay(1000);
>  	/* See if device thinks it succeeded */
>  	if (status & 0x01) {
>  		DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n",

Hi, it looks sane to remove this udelay. However,

1. If you do this, then you also have to do it in __nand_lock() - there
is a similar udelay()
2. Let's CC Vimal who is the author of this code - may be he'll tell us
why he added the delays.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

  reply	other threads:[~2011-04-13  3:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10  2:30 [PATCH] nand: Remove meaningless delay from nand_unlock jiri.pinkava
2011-04-13  3:28 ` Artem Bityutskiy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-06-01 13:56 jiri.pinkava
2011-06-02 16:23 ` Brian Norris
2011-06-02 16:26   ` Brian Norris
2011-06-02 18:24   ` Vimal Singh
2011-06-03 15:32 ` Artem Bityutskiy

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=1302665309.14691.3.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jiri.pinkava@vscht.cz \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sjhill@realitydiluted.com \
    --cc=tglx@linutronix.de \
    --cc=vimal.newwork@gmail.com \
    /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