LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Mike Looijmans <mike.looijmans@topic.nl>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org, Julia Lawall <julia.lawall@lip6.fr>,
	sil2review@lists.osadl.org
Subject: Re: [PATCH] power: supply: ltc2941-battery-gauge: Release device_node in ltc294x_i2c_probe()
Date: Fri, 6 Jul 2018 19:04:52 +0200	[thread overview]
Message-ID: <20180706170452.xw3w56dgtj4j4tru@earth.universe> (raw)
In-Reply-To: <8fef316f-85d0-0bd4-4bbe-2d8330dfe2ec@ispras.ru>

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

Hi,

On Tue, May 08, 2018 at 10:16:31PM +0300, Alexey Khoroshilov wrote:
> On 01.05.2018 15:39, Sebastian Reichel wrote:
> > On Sun, Apr 29, 2018 at 01:35:55AM +0300, Alexey Khoroshilov wrote:
> >> There is of_node_get(client->dev.of_node) in ltc294x_i2c_probe(),
> >> but these is no of_node_put() somethere in the driver.
> >>
> >> The patch adds one on error and normal paths.
> >>
> >> Found by Linux Driver Verification project (linuxtesting.org).
> >>
> >> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> > 
> > That is ugly. Let's replace of_property_read_u32(np, ...) with
> > device_property_read_u32(dev, ...) and get rid of np instead.
> 
> Ok, I will prepare v2.
> 
> What is the right way to replace
> info->supply_desc.name = np->name;
> ?
> 
> If lifetime of 'client->dev.of_node' = 'np' cannot be less than lifetime
> of 'client->dev', should we use just
> info->supply_desc.name = client->dev.of_node->name;
> ?

It looks like I never responsed to this, sorry for the delay.
Your suggestion looks fine.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-07-06 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-28 22:35 Alexey Khoroshilov
2018-05-01 12:39 ` Sebastian Reichel
2018-05-08 19:16   ` Alexey Khoroshilov
2018-07-06 17:04     ` Sebastian Reichel [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=20180706170452.xw3w56dgtj4j4tru@earth.universe \
    --to=sebastian.reichel@collabora.co.uk \
    --cc=julia.lawall@lip6.fr \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=sil2review@lists.osadl.org \
    --subject='Re: [PATCH] power: supply: ltc2941-battery-gauge: Release device_node in ltc294x_i2c_probe()' \
    /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).