linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: Robert Foss <robert.foss@linaro.org>,
	linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] i2c: qcom-cci: simplify access to bus data structure
Date: Thu, 2 Jun 2022 19:51:11 +0300	[thread overview]
Message-ID: <ff845970-3db3-f078-12b0-d8b111e380fa@linaro.org> (raw)
In-Reply-To: <CAMZdPi-iK0_OHdtdz9gakUoBqLJQyzjvntBQfvxObYPz-8e-DQ@mail.gmail.com>

Hi Loic,

On 6/2/22 16:49, Loic Poulain wrote:
> On Thu, 2 Jun 2022 at 15:15, Vladimir Zapolskiy
> <vladimir.zapolskiy@linaro.org> wrote:
>>
>> Trivial non-functional change, which adds an alias to an extensively
>> used data location.
>>
>> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
>> ---
>>   drivers/i2c/busses/i2c-qcom-cci.c | 28 +++++++++++++++-------------
>>   1 file changed, 15 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
>> index 8d078bdb5c1b..c4a4a4b54131 100644
>> --- a/drivers/i2c/busses/i2c-qcom-cci.c
>> +++ b/drivers/i2c/busses/i2c-qcom-cci.c
>> @@ -541,6 +541,7 @@ static int cci_probe(struct platform_device *pdev)
>>                  return -ENOENT;
>>
>>          for_each_available_child_of_node(dev->of_node, child) {
>> +               struct cci_master *master;
>>                  u32 idx;
>>
>>                  ret = of_property_read_u32(child, "reg", &idx);
>> @@ -555,27 +556,28 @@ static int cci_probe(struct platform_device *pdev)
>>                          continue;
>>                  }
>>
>> -               cci->master[idx].adap.quirks = &cci->data->quirks;
>> -               cci->master[idx].adap.algo = &cci_algo;
>> -               cci->master[idx].adap.dev.parent = dev;
>> -               cci->master[idx].adap.dev.of_node = of_node_get(child);
>> -               cci->master[idx].master = idx;
>> -               cci->master[idx].cci = cci;
>> +               master = &cci->master[idx];
>> +               master->adap.quirks = &cci->data->quirks;
>> +               master->adap.algo = &cci_algo;
>> +               master->adap.dev.parent = dev;
>> +               master->adap.dev.of_node = of_node_get(child);
>> +               master->master = idx;
>> +               master->cci = cci;
>>
>> -               i2c_set_adapdata(&cci->master[idx].adap, &cci->master[idx]);
>> -               snprintf(cci->master[idx].adap.name,
>> -                        sizeof(cci->master[idx].adap.name), "Qualcomm-CCI");
>> +               i2c_set_adapdata(&master->adap, master);
>> +               snprintf(master->adap.name, sizeof(master->adap.name),
>> +                        "Qualcomm-CCI");
> 
> Let's use a single line for snprintf now.

thank you for review, let me send v2.

--
Best wishes,
Vladimir

      reply	other threads:[~2022-06-02 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 13:15 [PATCH] i2c: qcom-cci: simplify access to bus data structure Vladimir Zapolskiy
2022-06-02 13:49 ` Loic Poulain
2022-06-02 16:51   ` Vladimir Zapolskiy [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=ff845970-3db3-f078-12b0-d8b111e380fa@linaro.org \
    --to=vladimir.zapolskiy@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=robert.foss@linaro.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).