Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4892981imu; Tue, 29 Jan 2019 09:13:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN6imgVXFbzqiUfnwEwKa3PpoRCZqo9lV99H83Xg38UaYGN5nmtQKKER1+buAPcv9fg0ZTGa X-Received: by 2002:a63:6442:: with SMTP id y63mr24279765pgb.450.1548782009478; Tue, 29 Jan 2019 09:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548782009; cv=none; d=google.com; s=arc-20160816; b=n7poJJwQ7UnxQ2yVLuGqcQaYEHKzovGLj0U5CVC+UoKFjJ57HsGlcDUAJSKMsh57Ts amTnk9KQlhG5VFN/HQcSEOUSFWa+c1fBjS/Nv3XvaCxVwTIWt9IEMutX/G7oussGb4m7 f+C9+OeGNwO4Sf466OhEQzf9CkzF1Us6nLBHfyN/lYTgtBqdifagkvMNAnRdtPxTnfWg m/+VL6Qf69NEhYR8zrwpsmNQS/PgOOsBfo/pqT/oqzXbMhUabHM25FJChOBPaS4eD7jM 61qvbNSG+ajvpXRHvVbv1mjs6vr8gMwD0NBW4ifRKZctjF9oZDX6AktRjZTBLpIB89oi NIZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XPvKZ1BXIDxkmOIyP6tckZQSj3GpUhpQJmP+J/avqOE=; b=Gfqv6lbOPWSxHUsIlpw9iA+jx5O9mYYGr2D/d0YU81sFSFDkrPPEU6i8m0DwJHWuGZ KIuKN2B/qGnACBRBR4zR4MkSkjxfhL+P6HEmRZO28JEwqLQFy5Mej3veC7ZvoQEJmM+T 0IgyZyiXuUb1ricQiZEk7rz3z+akiBFdzoH2hmLKiLmkXFR6hpfknNfAtjE4HivPMtvl 7jzf9qkC9vXZ/5Kgfr7ZYAUorJWUWjhZ1hMjzCI1cfOKmjm1zwLBnH+ZFCvYN6wJoMk1 yi80aFdepfDeGeLZNDSbpUBkB4Bgx57xmmXcy676lfh8c8IsV21+KSUFCCGOU5F/bH6J cujA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si5196056pgr.569.2019.01.29.09.13.00; Tue, 29 Jan 2019 09:13:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728704AbfA2RLz (ORCPT + 99 others); Tue, 29 Jan 2019 12:11:55 -0500 Received: from muru.com ([72.249.23.125]:36626 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728379AbfA2RLz (ORCPT ); Tue, 29 Jan 2019 12:11:55 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 0AD1C8140; Tue, 29 Jan 2019 17:12:02 +0000 (UTC) Date: Tue, 29 Jan 2019 09:11:51 -0800 From: Tony Lindgren To: Doug Anderson Cc: Mark Brown , Sebastian Reichel , LKML , Linux ARM , linux-omap Subject: Re: New underflow of regulator enable count warnings in v5.0-rc1 Message-ID: <20190129171151.GC5720@atomide.com> References: <20190129164813.GA5720@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Doug Anderson [190129 17:05]: > Hi, > > On Tue, Jan 29, 2019 at 8:48 AM Tony Lindgren wrote: > > > > Hi, > > > > Looks like commit 5451781dadf8 ("regulator: core: Only count load for > > enabled consumers") started showing new warnings with v5.0-rc cycle: > > > > regulator-dummy: Underflow of regulator enable count > > > > I'm seeing this at least with my pwm-vibra test case: > > > > # rumble-test /dev/input/by-path/platform-vibrator-event 0xffff > > pwm-vibrator vibrator: vibrator supply vcc not found, using dummy regulator > > input: pwm-vibrator as /devices/platform/vibrator/input/input4 > > regulator-dummy: Underflow of regulator enable count > > Upload rumble effect... id=0 > > regulator-dummy: Underflow of regulator enable count > > > > Are these bogus warnings for dummy regulator or do we have > > real unpaired regulator calls or somewhere? > > My first guess is that there's a real unpaired regulator call somewhere. > > I actually meant to include this in the commit message, but I'm an > idiot and I used "--" to break up the parts of the commit message > which confused git when Mark applied it. Sigh. For the full commit > message, see: > > https://lkml.kernel.org/r/20181120175255.227783-1-dianders@chromium.org Oh I see, thanks for the link :) > In that message I said: > > > - We can (and will) spit errors out for code that used to be invalid > > but was never caught before. Specifically if someone leaves a > > regulator enabled and calls regulator_put() we'll yell. We'll also > > yell if a single consumer calls more disables than enables. > > Looking quickly at 'pwm-vibra.c' it wouldn't surprise me at all if you > call regulator_disable() more times than regulator_enable(). If > that's true it should be fixed. OK. Let's see if Sebastian spots where pwm_vibrator_start() and pwm_vibrator_stop() might get called multiple times or something similar. Regards, Tony