From: Andy Gross <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Bjorn Andersson
<bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
Subject: Re: [Patch v2] spi: qup: Fix incorrect block transfers
Date: Tue, 30 Sep 2014 14:55:44 -0500 [thread overview]
Message-ID: <20140930195544.GA26928@qualcomm.com> (raw)
In-Reply-To: <1412080080.26751.15.camel@iivanov-dev>
On Tue, Sep 30, 2014 at 03:28:00PM +0300, Ivan T. Ivanov wrote:
>
> Hi Andy, just few comments.
>
> On Wed, 2014-09-24 at 16:04 -0500, Andy Gross wrote:
>
> <snip>
>
> > +static void spi_qup_fifo_read(struct spi_qup *controller,
> > + struct spi_transfer *xfer)
> > +{
> > + u32 data;
> > +
> > + /* clear service request */
> > + writel_relaxed(QUP_OP_IN_SERVICE_FLAG,
> > + controller->base + QUP_OPERATIONAL);
> > +
>
> Please, could you indent function parameters to open brace, when
> they can not fit into one line.
Missed this. Fixed.
> > + while (controller->rx_bytes < xfer->len) {
> > + if (!(readl_relaxed(controller->base + QUP_OPERATIONAL) &
> > + QUP_OP_IN_FIFO_NOT_EMPTY))
>
> Should be aligned just after first open brace.
Agreed.
> > + break;
> > +
> > + data = readl_relaxed(controller->base + QUP_INPUT_FIFO);
> > +
> > + spi_qup_fill_read_buffer(controller, xfer, data);
> > }
> > }
> >
>
> > +static void spi_qup_block_read(struct spi_qup *controller,
> > + struct spi_transfer *xfer)
> > +{
> > + u32 data;
> > + u32 words_per_blk = controller->in_blk_sz >> 2;
>
> I have been confused from the variable name. These are number of
> 32 bits reads, not SPI words, right?
Correct. Naming is always a little funky when words can mean more than one
thing. Let me change this to reads(writes)_per_blk.
> > + u32 num_words = (xfer->len - controller->rx_bytes) / controller->w_size;
> > + int i;
> > +
> > + do {
<snip>
> > + /* ACK by clearing service flag */
> > - spi_qup_fifo_write(controller, xfer);
> > + if (opflags & QUP_OP_OUT_SERVICE_FLAG) {
> > + if (opflags & QUP_OP_OUT_BLOCK_WRITE_REQ)
> > + spi_qup_block_write(controller, xfer);
> > + else
> > + spi_qup_fifo_write(controller, xfer,1);
> > + }
>
> ERROR: space required after that ',' (ctx:VxV)
> #414: FILE: drivers/spi/spi-qup.c:414:
> + spi_qup_fifo_write(controller, xfer,1);
> ^
>
> You don't really need this last parameter, right?
Fixed. Sorry, that shouldn't have remained.
>
> Regards,
> Ivan
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
--
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
prev parent reply other threads:[~2014-09-30 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 21:04 [Patch v2] spi: qup: Fix incorrect block transfers Andy Gross
2014-09-30 12:28 ` Ivan T. Ivanov
2014-09-30 19:55 ` Andy Gross [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=20140930195544.GA26928@qualcomm.com \
--to=agross-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).