LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Sricharan R <sricharan@codeaurora.org>
Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	agross@codeaurora.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org, galak@codeaurora.org,
	dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [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

  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
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

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.com \
    --cc=agross@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sricharan@codeaurora.org \
    --subject='Re: [PATCH 2/6] i2c: qup: Add V2 tags support' \
    /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

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).