From: Lars-Peter Clausen <lars@metafoo.de>
To: Michael Welling <mwelling@ieee.org>,
jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net,
san@rosetechnology.dk, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: mcp320x: Fix occasional incorrect readings
Date: Tue, 05 May 2015 19:29:43 +0200 [thread overview]
Message-ID: <5548FE07.7040404@metafoo.de> (raw)
In-Reply-To: <1430843395-19446-1-git-send-email-mwelling@ieee.org>
On 05/05/2015 06:29 PM, Michael Welling wrote:
> Without the cacheline alignment, the readings will occasionally incorrectly
> return 0.
>
> Signed-off-by: Michael Welling <mwelling@ieee.org>
> ---
> drivers/iio/adc/mcp320x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
> index efbfd12..46b98cf 100644
> --- a/drivers/iio/adc/mcp320x.c
> +++ b/drivers/iio/adc/mcp320x.c
> @@ -60,7 +60,7 @@ struct mcp320x {
> struct spi_message msg;
> struct spi_transfer transfer[2];
>
> - u8 tx_buf;
> + u8 tx_buf ____cacheline_aligned;
> u8 rx_buf[2];
The buffers should probably be moved at the end, e.g. reg will still be on
the same cacheline.
>
> struct regulator *reg;
prev parent reply other threads:[~2015-05-05 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 16:29 [PATCH] iio: mcp320x: Fix occasional incorrect readings Michael Welling
2015-05-05 17:29 ` Lars-Peter Clausen [this message]
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=5548FE07.7040404@metafoo.de \
--to=lars@metafoo.de \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mwelling@ieee.org \
--cc=pmeerw@pmeerw.net \
--cc=san@rosetechnology.dk \
/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.