From: Sricharan R <sricharan@codeaurora.org>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
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 14:06:01 +0530 [thread overview]
Message-ID: <5513C4F1.4080602@codeaurora.org> (raw)
In-Reply-To: <1427355110.7093.1.camel@mm-sol.com>
Hi Ivan,
On 03/26/2015 01:01 PM, Ivan T. Ivanov wrote:
> 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.
>
ok.
>>>> + 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.
>
Ok, will change this function.
Regards,
Sricharan
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2015-03-26 8:36 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
[not found] ` <1426268992-19298-1-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-03-13 17:49 ` [PATCH 2/6] i2c: qup: Add V2 tags support Sricharan R
[not found] ` <1426268992-19298-3-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-03-25 12:24 ` Ivan T. Ivanov
[not found] ` <1427286263.25053.18.camel-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2015-03-26 5:44 ` Sricharan R
[not found] ` <55139CD4.5040100-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-03-26 7:31 ` Ivan T. Ivanov
2015-03-26 8:36 ` Sricharan R [this message]
2015-03-13 17:49 ` [PATCH 3/6] i2c: qup: Add bam dma capabilities Sricharan R
[not found] ` <1426268992-19298-4-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
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
[not found] ` <550822A7.1010209-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2015-03-17 13:10 ` sricharan-sgV2jX0FEOL9JmXXK+q4OQ
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
[not found] ` <20150313195425.GA16977-zC7DfRvBq/JWk0Htik3J/w@public.gmane.org>
2015-03-16 9:55 ` sricharan-sgV2jX0FEOL9JmXXK+q4OQ
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=5513C4F1.4080602@codeaurora.org \
--to=sricharan@codeaurora.org \
--cc=agross@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=iivanov@mm-sol.com \
--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 \
/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).