[PATCH v5 08/10] spi: expose master transfer size limitation.
Mark Brown
broonie at kernel.org
Tue Dec 1 15:12:33 PST 2015
On Tue, Dec 01, 2015 at 04:51:06PM -0000, Michal Suchanek wrote:
> +static inline size_t
> +spi_max_transfer_size(struct spi_device *spi)
> +{
> + struct spi_master *master = spi->master;
> + if (!master->max_transfer_size)
> + return 0;
> + return master->max_transfer_size(spi);
> +}
Can we change this to return SIZE_MAX instead (ie, the maximum value for
a size_t)? That way callers don't need to worry if there is a limit, if
they want to handle it they can just unconditionally assume that a limit
will be provided.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20151201/c15a97d3/attachment.sig>
More information about the linux-mtd
mailing list