From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Sven Van Asbroeck <thesven73@gmail.com>,
linux-i2c <linux-i2c@vger.kernel.org>,
Sven Van Asbroeck <svendev@arcx.com>,
linux-kernel@vger.kernel.org, divagar.mohandass@intel.com
Subject: Re: [PATCH 1/1] at24: Fix I²C device selection for runtime PM
Date: Fri, 1 Dec 2017 17:29:27 +0100 [thread overview]
Message-ID: <CAMRc=Me6b7aRWFg-DPtNq5TKNwwr_oRO8ip7Nn9LosivOZKjGA@mail.gmail.com> (raw)
In-Reply-To: <20171201153538.fgwc4h4lbgnhabs3@paasikivi.fi.intel.com>
2017-12-01 16:35 GMT+01:00 Sakari Ailus <sakari.ailus@linux.intel.com>:
> Hi Sven,
>
> On Fri, Dec 01, 2017 at 10:20:41AM -0500, Sven Van Asbroeck wrote:
>> Thank you, it fixes the issue on the multi-address eeprom that I have access to.
>>
>> Tested-by: Sven Van Asbroeck on a 24AA16/24LC16B <svendev@arcx.com>
>>
>> One very minor remark:
>>
>> + struct device *dev = &at24->client[0]->dev;
>>
>> It is sufficiently clear to others (and us a few months down the line)
>> why we are
>> using only client[0] for power management? Could it benefit from a separate
>> function with comments?
>>
>> struct device *dev = get_pm_device(at24);
>>
>> static struct device *get_pm_device(struct at24_data *at24)
>> {
>> /* explain why we use client[0] and not any of the dummies */
>> return &at24->client[0]->dev;
>> }
>
> There are no comments in assigning at24->client[0] either (or a helper
> function). I think it should be rather evident when looking at the code
> when you think about it. I certainly don't object adding a comment if you
> insist or someone else thinks it's a good idea.
>
> Thanks for testing!
>
> --
> Kind regards,
>
> Sakari Ailus
> sakari.ailus@linux.intel.com
Pushed to at24/fixes, thanks!
@Saraki: there were some conflicts with the previous fixes queued for
4.15. Could you take a look if my rebase didn't break anything? You
can find my tree at
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
Best regards,
Bartosz
next prev parent reply other threads:[~2017-12-01 16:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 19:03 BUG: support for at24 multi-slave-address eeproms is broken Sven Van Asbroeck
2017-11-30 22:34 ` Sakari Ailus
2017-12-01 10:04 ` Bartosz Golaszewski
2017-11-30 22:35 ` [PATCH 1/1] at24: Fix I²C device selection for runtime PM Sakari Ailus
2017-12-01 15:20 ` Sven Van Asbroeck
2017-12-01 15:35 ` Sakari Ailus
2017-12-01 16:29 ` Bartosz Golaszewski [this message]
2017-12-01 17:59 ` Sven Van Asbroeck
2017-12-02 14:44 ` Sakari Ailus
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='CAMRc=Me6b7aRWFg-DPtNq5TKNwwr_oRO8ip7Nn9LosivOZKjGA@mail.gmail.com' \
--to=brgl@bgdev.pl \
--cc=divagar.mohandass@intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=svendev@arcx.com \
--cc=thesven73@gmail.com \
/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).