From: <Tudor.Ambarus@microchip.com>
To: <boris.brezillon@collabora.com>
Cc: <vigneshr@ti.com>, <miquel.raynal@bootlin.com>, <richard@nod.at>,
<marek.vasut@gmail.com>, <bbrezillon@kernel.org>,
<yogeshnarayan.gaur@nxp.com>, <linux-kernel@vger.kernel.org>,
<linux-mtd@lists.infradead.org>
Subject: Re: [PATCH v2 1/2] mtd: spi-nor: Move m25p80 code in spi-nor.c
Date: Thu, 25 Jul 2019 13:35:38 +0000 [thread overview]
Message-ID: <7a754275-94be-9b6f-0d66-a72faaec13f7@microchip.com> (raw)
In-Reply-To: <dbb33973-bb6f-9a01-b821-693387aff98a@microchip.com>
On 07/25/2019 04:17 PM, Tudor Ambarus wrote:
>>>> +static ssize_t spi_nor_spimem_xfer_data(struct spi_nor *nor,
>>>> + struct spi_mem_op *op,
>>>> + enum spi_nor_protocol proto)
>>>> +{
>>>> + bool usebouncebuf = false;
>>> declare bool at the end to avoid stack padding.
>> But it breaks the reverse-xmas-tree formatting :-).
>>
>>>> + void *rdbuf = NULL;
>>>> + const void *buf;
>>> you can get rid of rdbuf and buf if you pass buf as argument.
>> Hm, passing the buffer to send data from/receive data into is already
>> part of the spi_mem_op definition process (which is done in the caller
>> of this func) so why bother passing an extra arg to the function.
>> Note that you had the exact opposite argument for the
>> spi_nor_spimem_xfer_reg() prototype you suggested above (which I
>> agree with BTW) :P.
> In order to avoid if clauses like "if (op->data.dir == SPI_MEM_DATA_IN)". You
> can't use op->data.buf directly, the *out const qualifier can be discarded.
I'm wrong, the const qualifier will be discarded when passing the buf argument.
Please ignore.
next prev parent reply other threads:[~2019-07-25 13:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-20 8:00 [PATCH v2 0/2] ] Merge m25p80 into spi-nor Vignesh Raghavendra
2019-07-20 8:00 ` [PATCH v2 1/2] mtd: spi-nor: Move m25p80 code in spi-nor.c Vignesh Raghavendra
2019-07-25 11:19 ` Tudor.Ambarus
2019-07-25 11:44 ` Tudor.Ambarus
2019-07-25 12:37 ` Boris Brezillon
2019-07-25 13:17 ` Tudor.Ambarus
2019-07-25 13:35 ` Tudor.Ambarus [this message]
2019-07-25 14:00 ` Boris Brezillon
2019-07-25 14:36 ` Tudor.Ambarus
2019-07-30 18:04 ` Vignesh Raghavendra
2019-07-31 6:19 ` Tudor.Ambarus
2019-07-20 8:00 ` [PATCH v2 2/2] mtd: spi-nor: Rework hwcaps selection for the spi-mem case Vignesh Raghavendra
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=7a754275-94be-9b6f-0d66-a72faaec13f7@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=bbrezillon@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=yogeshnarayan.gaur@nxp.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
all inboxes | Powered by JetHome®