From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752849AbcIOPI7 (ORCPT ); Thu, 15 Sep 2016 11:08:59 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:32831 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbcIOPIw (ORCPT ); Thu, 15 Sep 2016 11:08:52 -0400 Date: Thu, 15 Sep 2016 20:38:44 +0530 From: Viresh Kumar To: Mark Brown Cc: Lee Jones , linaro-kernel@lists.linaro.org, Krzysztof =?utf-8?Q?Koz=C5=82owski?= , patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mfd: wm8994-core: Don't use managed regulator bulk get API Message-ID: <20160915150844.GE30169@vireshk-i7> References: <9f4aa8441344137272549e65d81c7fe65e37a8a8.1473938123.git.viresh.kumar@linaro.org> <2b050796dd4230f8b60ed39d32716c2fec5b44d0.1473938123.git.viresh.kumar@linaro.org> <20160915144720.GK27974@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160915144720.GK27974@sirena.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > - 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? > Also please think hard before including complete backtraces in upstream > reports, they are very large and contain almost no useful information > relative to their size so often obscure the relevant content in your > message. If part of the backtrace is usefully illustrative then it's > usually better to pull out the relevant sections. Sure, will add only relevant bits in the next version. -- viresh