From: iivanov@mm-sol•com (Ivan T. Ivanov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/6] i2c: qup: Add V2 tags support
Date: Thu, 26 Mar 2015 09:31:50 +0200 [thread overview]
Message-ID: <1427355110.7093.1.camel@mm-sol.com> (raw)
In-Reply-To: <55139CD4.5040100@codeaurora.org>
Hi Sricharan,
On Thu, 2015-03-26 at 11:14 +0530, Sricharan R wrote:
>
> > > + if (msg->flags & I2C_M_RD)
> > > + qup->rx_tag_len = (qup->blocks << 1);
> >
> > here again.
> >
> hmm, why not shift ?
Because it makes reading code harder and because compiler
is smart enough to choose appropriate instruction for
underling CPU architecture.
> > > + else
> > > + qup->rx_tag_len = 0;
> > > +}
> > > +
> > > +static u32 qup_i2c_xfer_data(struct qup_i2c_dev *qup, int len,
> > > + u8 *buf, int last)
> > > +{
> >
> > I think that xfer is too vague in this case, prefer write or send.
> >
> ok. Will change it to send.
> > > + static u32 val, idx;
> >
> > static? please fix.
> That was intentional. Using to pack tag and data in to one word across
> two calls. So preserving val, idx across calls.
Sorry this is no go! Reorganize the code, please.
Regards,
Ivan
next prev parent reply other threads:[~2015-03-26 7:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 17:49 [PATCH 0/6] i2c: qup: Add support for v2 tags and bam dma Sricharan R
2015-03-13 17:49 ` [PATCH 1/6] i2c: qup: Change qup_wait_writeready function to use for all timeouts Sricharan R
2015-03-13 17:49 ` [PATCH 2/6] i2c: qup: Add V2 tags support Sricharan R
2015-03-25 12:24 ` Ivan T. Ivanov
2015-03-26 5:44 ` Sricharan R
2015-03-26 7:31 ` Ivan T. Ivanov [this message]
2015-03-26 8:36 ` Sricharan R
2015-03-13 17:49 ` [PATCH 3/6] i2c: qup: Add bam dma capabilities Sricharan R
2015-03-25 13:10 ` Ivan T. Ivanov
2015-03-26 6:08 ` Sricharan R
2015-03-13 17:49 ` [PATCH 4/6] i2c: qup: Transfer every i2c_msg in i2c_msgs without stop Sricharan R
2015-03-13 17:49 ` [PATCH 5/6] dts: msm8974: Add blsp2_bam dma node Sricharan R
2015-03-17 12:48 ` Stanimir Varbanov
2015-03-17 13:10 ` sricharan at codeaurora.org
2015-03-13 17:49 ` [PATCH 6/6] dts: msm8974: Add dma channels for blsp2_i2c1 node Sricharan R
2015-03-13 19:54 ` Andy Gross
2015-03-16 9:55 ` sricharan at codeaurora.org
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=1427355110.7093.1.camel@mm-sol.com \
--to=iivanov@mm-sol$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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