Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281305
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 08/10] spi: expose master transfer size limitation. |
| Date | 2015-12-02 00:20 +0100 |
| Message-ID | <qB2ng-7GU-19@gated-at.bofh.it> (permalink) |
| References | <qAZfI-5yU-17@gated-at.bofh.it> <qAZfI-5yU-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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.
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Mark Brown <broonie@kernel.org> - 2015-12-02 00:20 +0100
Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Michal Suchanek <hramrach@gmail.com> - 2015-12-02 10:40 +0100
Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Martin Sperl <martin@sperl.org> - 2015-12-04 15:40 +0100
Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Michal Suchanek <hramrach@gmail.com> - 2015-12-04 17:50 +0100
Re: [PATCH v5 08/10] spi: expose master transfer size limitation. Mark Brown <broonie@kernel.org> - 2015-12-07 21:20 +0100
csiph-web