lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7B8CE47BD58441468D2BB13285B50E6031DE62E9@BGSMSX107.gar.corp.intel.com>
Date:   Wed, 30 Aug 2017 17:04:21 +0000
From:   "Mohandass, Divagar" <divagar.mohandass@...el.com>
To:     Sakari Ailus <sakari.ailus@....fi>
CC:     "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "wsa@...-dreams.de" <wsa@...-dreams.de>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Mani, Rajmohan" <rajmohan.mani@...el.com>
Subject: RE: [PATCH v3 3/3] eeprom: at24: enable runtime pm support

Hi Sakari,

Thanks for the review.
My comments below.

---
^Divagar

>-----Original Message-----
>From: Sakari Ailus [mailto:sakari.ailus@....fi]
>Sent: Wednesday, August 30, 2017 6:11 PM
>To: Mohandass, Divagar <divagar.mohandass@...el.com>
>Cc: robh+dt@...nel.org; mark.rutland@....com; wsa@...-dreams.de;
>devicetree@...r.kernel.org; linux-i2c@...r.kernel.org; linux-
>kernel@...r.kernel.org; Mani, Rajmohan <rajmohan.mani@...el.com>
>Subject: Re: [PATCH v3 3/3] eeprom: at24: enable runtime pm support
>
>On Wed, Aug 30, 2017 at 12:32:07PM +0000, Mohandass, Divagar wrote:
>> >> @@ -743,6 +770,15 @@ static int at24_probe(struct i2c_client
>> >> *client, const struct i2c_device_id *id)
>> >>
>> >>  	i2c_set_clientdata(client, at24);
>> >>
>> >> +	/* enable runtime pm */
>> >> +	pm_runtime_get_noresume(&client->dev);
>> >> +	err = pm_runtime_set_active(&client->dev);
>> >> +	if (err < 0)
>> >> +		goto err_clients;
>> >> +
>> >> +	pm_runtime_enable(&client->dev);
>> >> +	pm_runtime_put(&client->dev);
>> >> +
>> >
>> >You're just about to perform a read here. I believe you should move
>> >the last put after that.
>>
>> At the end of at24_read we are performing a pm_runtime_put, still we need
>this change ?
>
>True, so this isn't an actual problem.
>
>It'll still power the chip down when you're about to need it, so it'd make sense
>to perform the check before pm_runtime_put().
>
>I might move the runtime PM setup after the check altogether.

Ok, I will move the pm_runtime_put() after the check and publish the v4.
Moving the PM setup altogether below, will introduce more error handling in read call.

>
>--
>Sakari Ailus
>e-mail: sakari.ailus@....fi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ