From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Steven King <sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] spi: coldfire-qspi: Fix bits per word setting when t->bits_per_word is not set
Date: Thu, 27 Feb 2014 10:09:59 -0700 [thread overview]
Message-ID: <530F7167.7000307@wwwdotorg.org> (raw)
In-Reply-To: <1393463102.12945.3.camel@phoenix>
On 02/26/2014 06:05 PM, Axel Lin wrote:
> This ensures to use spi_device's bits_per_word setting when t->bits_per_word is
> not set. This looks like a bug introduced by commit 24778be20f8
> "spi: convert drivers to use bits_per_word_mask".
I thought the SPI core already contained this kind of logic, so that
drivers could rely on t->bits_per_word always being set up? Yes, this:
> static int __spi_validate(struct spi_device *spi, struct spi_message *message)
...
> /**
> * Set transfer bits_per_word and max speed as spi device default if
> * it is not set for this transfer.
> * Set transfer tx_nbits and rx_nbits as single transfer default
> * (SPI_NBITS_SINGLE) if it is not set for this transfer.
> */
> list_for_each_entry(xfer, &message->transfers, transfer_list) {
> message->frame_length += xfer->len;
> if (!xfer->bits_per_word)
> xfer->bits_per_word = spi->bits_per_word;
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-02-27 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 1:05 [PATCH] spi: coldfire-qspi: Fix bits per word setting when t->bits_per_word is not set Axel Lin
2014-02-27 17:09 ` Stephen Warren [this message]
[not found] ` <530F7167.7000307-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-28 5:23 ` Mark Brown
2014-03-02 14:20 ` Axel Lin
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=530F7167.7000307@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.