From: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
To: Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>
Cc: boris.brezillon@free-electrons.com, computersforpeace@gmail.com,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
richard@nod.at
Subject: Re: [PATCH 1/1] mtd: spi-nor: improve macronix_quad_enable()
Date: Tue, 13 Dec 2016 17:35:04 +0100 [thread overview]
Message-ID: <2a16b055-76bb-1e97-f07a-0ae715721743@wedev4u.fr> (raw)
In-Reply-To: <5962912d-b5de-f0d0-077b-af3b9ff2a77c@gmail.com>
Le 06/12/2016 à 20:01, Marek Vasut a écrit :
> On 12/06/2016 05:01 PM, Cyrille Pitchen wrote:
>> The patch checks whether the Quad Enable bit is already set in the Status
>> Register. If so, the function exits immediately with a successful return
>> code.
>
> Performance optimization I presume ?
>
> Acked-by: Marek Vasut <marek.vasut@gmail.com>
>
>> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
>> Reviewed-by: Jagan Teki <jagan@openedev.com>
Applied to git://github.com/spi-nor/linux.git
>> ---
>> drivers/mtd/spi-nor/spi-nor.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
>> index da7cd69d4857..1fd32b991eb7 100644
>> --- a/drivers/mtd/spi-nor/spi-nor.c
>> +++ b/drivers/mtd/spi-nor/spi-nor.c
>> @@ -1216,6 +1216,9 @@ static int macronix_quad_enable(struct spi_nor *nor)
>> val = read_sr(nor);
>> if (val < 0)
>> return val;
>> + if (val & SR_QUAD_EN_MX)
>> + return 0;
>> +
>> write_enable(nor);
>>
>> write_sr(nor, val | SR_QUAD_EN_MX);
>>
>
>
prev parent reply other threads:[~2016-12-13 17:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 16:01 [PATCH 1/1] mtd: spi-nor: improve macronix_quad_enable() Cyrille Pitchen
2016-12-06 19:01 ` Marek Vasut
2016-12-06 23:05 ` Cyrille Pitchen
2016-12-06 23:46 ` Marek Vasut
2016-12-13 16:35 ` Cyrille Pitchen [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=2a16b055-76bb-1e97-f07a-0ae715721743@wedev4u.fr \
--to=cyrille.pitchen@wedev4u.fr \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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).