All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graham Moore <ggrahammoore@gmail.com>
To: Gerhard Sittig <gsi@denx.de>
Cc: Graham Moore <grmoore@altera.com>, ZY - marex <marex@denx.de>,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Jingoo Han <jg1.han@samsung.com>,
	linux-kernel@vger.kernel.org,
	Yves Vandervennet <rocket.yvanderv@gmail.com>,
	linux-mtd@lists.infradead.org,
	Insop Song <insop.song@gainspeed.com>,
	Alan Tull <atull@altera.com>,
	Sourav Poddar <sourav.poddar@ti.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Dinh Nguyen <dinguyen@altera.com>
Subject: Re: [PATCH V3] Add support for flag status register on Micron chips.
Date: Tue, 22 Apr 2014 14:17:05 -0500	[thread overview]
Message-ID: <CA+iBjpS2UAPk+TiuX7_Ufp6uXwU3nxFZ-8emwGU2TMF9+6q66g@mail.gmail.com> (raw)
In-Reply-To: <20140422184518.GC3528@book.gsilab.sittig.org>

On Tue, Apr 22, 2014 at 1:45 PM, Gerhard Sittig <gsi@denx.de> wrote:
> the patch appears to not have dev_err() references, were they
> removed? see below
[...]
> this emits a message that an error has occured, but doesn't tell
> where it occured -- can you dev_err() here to make the message
> even more helpful?

Yeah, the previous dev_err was actually copy-pasted from a similar
function that already existed.  When I rebased to l2-mtd/spinor, I did
the same copy-paste but that branch has pr_err instead of dev_err.
I'm a noob, so I didn't want to change things without a good
explanation :)  On the other hand, I'm in favor of using dev_err
instead.

[...]
> this logic always returns "timed out" when the ready flag is not
> seen, even in the case of read errors -- can you "preset" the
> error code with "timed out", and update it with something more
> appropriate before returning when other errors are seen?
>
> though this is an internal helper, and callers may not tell the
> situations apart in the first place, so this might be a minor nit

Same here as above, copy-pasted, and so the logic is what already
existed.  I double-checked the calling code, and like you say, the
callers do not tell the situations apart.  About half the calls assume
any error is timeout.  The others either pass return value or some
other error up, or they ignore it.

Thanks,
Graham

WARNING: multiple messages have this Message-ID (diff)
From: Graham Moore <ggrahammoore@gmail.com>
To: Gerhard Sittig <gsi@denx.de>
Cc: ZY - marex <marex@denx.de>,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>,
	Graham Moore <grmoore@altera.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Jingoo Han <jg1.han@samsung.com>,
	linux-kernel@vger.kernel.org,
	Yves Vandervennet <rocket.yvanderv@gmail.com>,
	linux-mtd@lists.infradead.org,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	Alan Tull <atull@altera.com>,
	Sourav Poddar <sourav.poddar@ti.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Insop Song <insop.song@gainspeed.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Dinh Nguyen <dinguyen@altera.com>
Subject: Re: [PATCH V3] Add support for flag status register on Micron chips.
Date: Tue, 22 Apr 2014 14:17:05 -0500	[thread overview]
Message-ID: <CA+iBjpS2UAPk+TiuX7_Ufp6uXwU3nxFZ-8emwGU2TMF9+6q66g@mail.gmail.com> (raw)
In-Reply-To: <20140422184518.GC3528@book.gsilab.sittig.org>

On Tue, Apr 22, 2014 at 1:45 PM, Gerhard Sittig <gsi@denx.de> wrote:
> the patch appears to not have dev_err() references, were they
> removed? see below
[...]
> this emits a message that an error has occured, but doesn't tell
> where it occured -- can you dev_err() here to make the message
> even more helpful?

Yeah, the previous dev_err was actually copy-pasted from a similar
function that already existed.  When I rebased to l2-mtd/spinor, I did
the same copy-paste but that branch has pr_err instead of dev_err.
I'm a noob, so I didn't want to change things without a good
explanation :)  On the other hand, I'm in favor of using dev_err
instead.

[...]
> this logic always returns "timed out" when the ready flag is not
> seen, even in the case of read errors -- can you "preset" the
> error code with "timed out", and update it with something more
> appropriate before returning when other errors are seen?
>
> though this is an internal helper, and callers may not tell the
> situations apart in the first place, so this might be a minor nit

Same here as above, copy-pasted, and so the logic is what already
existed.  I double-checked the calling code, and like you say, the
callers do not tell the situations apart.  About half the calls assume
any error is timeout.  The others either pass return value or some
other error up, or they ignore it.

Thanks,
Graham

  reply	other threads:[~2014-04-22 19:17 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 14:03 [PATCH V3] Add support for flag status register on Micron chips Graham Moore
2014-04-22 14:03 ` Graham Moore
2014-04-22 14:03 ` Graham Moore
2014-04-22 14:03   ` Graham Moore
2014-04-22 16:55   ` Marek Vasut
2014-04-22 16:55     ` Marek Vasut
2014-04-22 18:48     ` Graham Moore
2014-04-22 18:48       ` Graham Moore
2014-04-22 18:58       ` Marek Vasut
2014-04-22 18:58         ` Marek Vasut
2014-04-25  4:47       ` Huang Shijie
2014-04-25  4:47         ` Huang Shijie
2014-04-25 15:50         ` Marek Vasut
2014-04-25 15:50           ` Marek Vasut
2014-04-22 18:45   ` Gerhard Sittig
2014-04-22 18:45     ` Gerhard Sittig
2014-04-22 19:17     ` Graham Moore [this message]
2014-04-22 19:17       ` Graham Moore
2014-04-25  1:34   ` Huang Shijie
2014-04-25  1:34     ` Huang Shijie
2014-04-25  2:42     ` Marek Vasut
2014-04-25  2:42       ` Marek Vasut
2014-04-25  1:52       ` Huang Shijie
2014-04-25  1:52         ` Huang Shijie
2014-04-25 22:12         ` Marek Vasut
2014-04-25 22:12           ` Marek Vasut
2014-04-26  3:10           ` Huang Shijie
2014-04-26  3:10             ` Huang Shijie
2014-04-28  5:06             ` Marek Vasut
2014-04-28  5:06               ` Marek Vasut
2014-04-28  7:06               ` Huang Shijie
2014-04-28  7:06                 ` Huang Shijie
2014-04-28 14:22                 ` Graham Moore
2014-04-28 14:22                   ` Graham Moore
2014-04-28 15:37                   ` Huang Shijie
2014-04-28 15:37                     ` Huang Shijie
2014-07-12  2:07               ` Brian Norris
2014-07-12  2:07                 ` Brian Norris
2014-04-25  1:54       ` Huang Shijie
2014-04-25  1:54         ` Huang Shijie

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=CA+iBjpS2UAPk+TiuX7_Ufp6uXwU3nxFZ-8emwGU2TMF9+6q66g@mail.gmail.com \
    --to=ggrahammoore@gmail.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=atull@altera.com \
    --cc=computersforpeace@gmail.com \
    --cc=dinguyen@altera.com \
    --cc=dwmw2@infradead.org \
    --cc=geert+renesas@linux-m68k.org \
    --cc=grmoore@altera.com \
    --cc=gsi@denx.de \
    --cc=insop.song@gainspeed.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=rocket.yvanderv@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sourav.poddar@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.