From: Marek Vasut <marex@denx.de>
To: Sourav Poddar <sourav.poddar@ti.com>
Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org,
balbi@ti.com, dedekind1@gmail.com
Subject: Re: [PATCH] drivers: mtd: m25p80: Add quad read support.
Date: Tue, 29 Oct 2013 19:24:27 +0100 [thread overview]
Message-ID: <201310291924.28110.marex@denx.de> (raw)
In-Reply-To: <526FEC7D.6060403@ti.com>
Dear Sourav Poddar,
[...]
> >>> This way, you can check if the SPI read failed and if so, handle it in
> >>> some way. The return value would only be valid if this function
> >>> returned 0.
> >>
> >> I got this, but do you think its necessary to have two checks for
> >> verifying whether read passed. ?
> >
> > Yes of course it is necessary, how else would you be able to tell if the
> > value is valid ? Sure, you can depend on negative integer here and on
> > the fact that the u8 will never be 32-bits wide (to produce a negative
> > integer when the return value is valid), but personally I think this is
> > error-prone as hell.
> >
> >> If I go by your code above, after returning from above,
> >> check for return value for successful read
> >> and then check the respective bit set(SR_*). ?
> >
> > Yes, you will be checking the bit in SR only if you are sure the value is
> > valid.
>
> hmm..alrite I will do the cleanup and send v2.
Brian, does this make sense? I'd hate to misguide someone.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-10-30 9:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 9:25 [PATCH] drivers: mtd: m25p80: Add quad read support Sourav Poddar
2013-10-25 10:18 ` Huang Shijie
2013-10-25 10:19 ` Sourav Poddar
2013-10-27 16:45 ` Marek Vasut
2013-10-27 18:26 ` Sourav Poddar
2013-10-27 18:30 ` Marek Vasut
2013-10-27 18:37 ` Sourav Poddar
2013-10-27 18:47 ` Marek Vasut
2013-10-29 5:57 ` Sourav Poddar
2013-10-29 14:01 ` Marek Vasut
2013-10-29 14:08 ` Sourav Poddar
2013-10-29 15:27 ` Marek Vasut
2013-10-29 16:52 ` Sourav Poddar
2013-10-29 17:08 ` Marek Vasut
2013-10-29 17:12 ` Sourav Poddar
2013-10-29 18:24 ` Marek Vasut [this message]
2013-10-29 18:34 ` Sourav Poddar
2013-10-30 6:27 ` Huang Shijie
2013-10-30 6:46 ` Sourav Poddar
2013-10-30 6:54 ` Huang Shijie
2013-10-30 10:11 ` Marek Vasut
2013-11-12 18:13 ` Brian Norris
-- strict thread matches above, loose matches on Subject: below --
2013-09-24 12:10 Sourav Poddar
2013-09-25 3:06 ` Huang Shijie
2013-09-25 5:20 ` Sourav Poddar
2013-09-25 5:48 ` Huang Shijie
2013-09-25 5:51 ` Sourav Poddar
2013-09-25 5:54 ` Sourav Poddar
2013-09-25 5:56 ` Huang Shijie
2013-09-25 6:16 ` Huang Shijie
2013-09-25 6:24 ` Sourav Poddar
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=201310291924.28110.marex@denx.de \
--to=marex@denx.de \
--cc=balbi@ti.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).