From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754671AbcIOPrU (ORCPT ); Thu, 15 Sep 2016 11:47:20 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:47538 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753112AbcIOPrM (ORCPT ); Thu, 15 Sep 2016 11:47:12 -0400 Date: Thu, 15 Sep 2016 16:47:01 +0100 From: Mark Brown To: Viresh Kumar Cc: Lee Jones , linaro-kernel@lists.linaro.org, Krzysztof =?utf-8?Q?Koz=C5=82owski?= , patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org Message-ID: <20160915154701.GN27974@sirena.org.uk> References: <9f4aa8441344137272549e65d81c7fe65e37a8a8.1473938123.git.viresh.kumar@linaro.org> <2b050796dd4230f8b60ed39d32716c2fec5b44d0.1473938123.git.viresh.kumar@linaro.org> <20160915144720.GK27974@sirena.org.uk> <20160915150844.GE30169@vireshk-i7> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DXTueXWT3Da08pik" Content-Disposition: inline In-Reply-To: <20160915150844.GE30169@vireshk-i7> X-Cookie: Even bytes get lonely for a little bit. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 2/2] mfd: wm8994-core: Don't use managed regulator bulk get API X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --DXTueXWT3Da08pik Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 15, 2016 at 08:38:44PM +0530, Viresh Kumar wrote: > On 15-09-16, 15:47, Mark Brown wrote: > > On Thu, Sep 15, 2016 at 04:47:01PM +0530, Viresh Kumar wrote: > > > Fix the kernel warnings and crashes by moving away from managed > > > regulator bulk get API by using regulator_bulk_get() and explicitly > > > calling regulator_put() for all the supplies in exit paths. > > Moving away from regulator bulk get to regulator bulk get? > Moving away from "managed" regulator bulk get to regulator bulk get? > Isn't this how we call the devm_* APIs as? That's really unclearly worded (especially since one uses the function name and the other doesn't). > > > - ret = devm_regulator_bulk_get(wm8994->dev, wm8994->num_supplies, > > > + ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies, > > > wm8994->supplies); > > > +err_regulator_put: > > > + for (i = wm8994->num_supplies - 1; i >= 0; i--) > > > + regulator_put(wm8994->supplies[i].consumer); > > Why are you unwinding regulator_bulk_get() with an open coded > > regulator_bulk_put()? > Because there is no regulator_bulk_put(). Should I add it? I mean regulator_bulk_free() there. --DXTueXWT3Da08pik Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJX2sJ0AAoJECTWi3JdVIfQ440H/08EI3HkxBlrXMfy+XQ7WWtm XeNTN3vTi8TW91sqLw1fdwiKqGQULtMIc1akfkG9maGO01vHNr4PdvWBqPkuOxxS sA9ihsgRkUGF6qbXCC84D42psXHgO9kIzYS/rCesaYTGpMZnp+ZWAC4xzJiToO+g EfinSYCDhCoY0mIx/cfdfdd0zWZbPDTvEnACeAm6KDR4cgHjCB72YkOE6NkoPMAv vCPOuEcgF2wW6IK1azb73mpjk7jU7Vrq4JBI8jtrWOiZIUJY+G5rD9+FLkS/sWtO 4cFXCSZeWR3QHhaPu4qY4nf8+DMHhzheP3eA/+Y9rzT5+xg5IN9eyVdXcuIkhGM= =cgO2 -----END PGP SIGNATURE----- --DXTueXWT3Da08pik--