[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17de613f-c417-440e-95c6-3cf65607dc99@sirena.org.uk>
Date: Mon, 10 Jul 2023 15:38:55 +0100
From: Mark Brown <broonie@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1 1/1] regmap: spi: Use spi_message_init_with_transfers()
On Mon, Jul 10, 2023 at 05:23:35PM +0300, Andy Shevchenko wrote:
> @@ -66,10 +64,7 @@ static int regmap_spi_async_write(void *context,
> async->t[1].tx_buf = val;
> async->t[1].len = val_len;
>
> - spi_message_init(&async->m);
> - spi_message_add_tail(&async->t[0], &async->m);
> - if (val)
> - spi_message_add_tail(&async->t[1], &async->m);
> + spi_message_init_with_transfers(&async->m, async->t, val ? 2 : 1);
I'm not sure this is a legibility win.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists