Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4883811imu; Tue, 29 Jan 2019 09:05:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7yXnleYZ1ztI3l3N4u6/kh7ZukMZig6CjvUhhWpQizsGOQj/YUMFOBrDeExXug0pDls/5x X-Received: by 2002:a63:b0a:: with SMTP id 10mr24480341pgl.423.1548781547734; Tue, 29 Jan 2019 09:05:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548781547; cv=none; d=google.com; s=arc-20160816; b=VR7QqOXlU1Bn0Ylh6U98YPsWCHkF8ntBC75o4fCGmRvCDRjhq1qM5uzlijh1naqJhL 4AkKQPWs/hIgLFF86v9ojdE0wU6nP3nSSKrbEo0ckEpDxtYtKLp2Ccen9QEeIVYRXF+N b5nz2oCMcBqb5QWddrxUW+KXeYVUHDIb2QkKP2IJkk8HGKy41sKd861CXZIdbJ06KDDR vqXzZDogQC76X4Hk+pW4mavnV/hOJqmMKCNTT5iZLr2x0FXLr04nmph6T5l6aSWIkZPe 1U9t/hgqJIlhlrM4HatZArIAfJ3jQ3BO9Q2hkT2YTTyI+SNEQwon3hvhzntHwzLG0MdA jVOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Hvr50WOe5YAp+ZfNWlbBzbHKySkVFiVrgRzeI4jrxMY=; b=b3yUBKNEQqDTdWa0WXQCVPogg5AXv2DZ+Xh/T2A88Eil6kXqYsiQM7YbqHcNMrHVPp D2I9qj+ujwwX27JRP/6ylaK73Y1l974i7zENkc9vNAlL/C43ueAb1NM1+0VO3cun29Is jX5XYlkytSf8BpjdhfvCOtwVIHZRSE0G6dz9hhqdhBT732tvyTcE3Gq0vXgXS+QUVBCC 6zq0HuRKMiAwqh4ba/SKBZvBc15D8f8Qh6BtGVzvZbOoUxiC0ntEkYLuGhFLKV5ARK35 qCY7ymJewiOdK/oYIgX9YPrMGiP4moxvJZQERJpSvAyNl1qWg4dUYmH5YczaIsJdy+Qh toKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cirpHcDv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn8si35613390plb.264.2019.01.29.09.05.30; Tue, 29 Jan 2019 09:05:47 -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; dkim=pass header.i=@chromium.org header.s=google header.b=cirpHcDv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728839AbfA2RE7 (ORCPT + 99 others); Tue, 29 Jan 2019 12:04:59 -0500 Received: from mail-vk1-f196.google.com ([209.85.221.196]:36416 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728017AbfA2RE7 (ORCPT ); Tue, 29 Jan 2019 12:04:59 -0500 Received: by mail-vk1-f196.google.com with SMTP id 185so4659270vkc.3 for ; Tue, 29 Jan 2019 09:04:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hvr50WOe5YAp+ZfNWlbBzbHKySkVFiVrgRzeI4jrxMY=; b=cirpHcDvmVexDxUSFxEOMfTqD9LddehQ6agRWW1r/TYMjffUW4bEbw7rEs+b/eBIfm rQkPjrQXfZnB9c63yzODT1AdFY9zX86Zwyns2lSICzrfoppBiDthnWVeS0wTejgvefo2 1VGJHhTfUz+20nu0NMDQ1ENbO3SwB2U9gwxBU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Hvr50WOe5YAp+ZfNWlbBzbHKySkVFiVrgRzeI4jrxMY=; b=SzQqzDxm7uOEJ+yDuU74JpulpEPyWJpy3b9i7o/2YDjH6Cw3+IR53wdK9EF/4bby0k Hpqaqn9tbK77QxoB7ex9UwUT0OVLG6jR7aFiUSsYaepMIsK4OzIyn4qD7NLKrAOjTnxz Kcpgx7vMLV9s8AceBJYx7R/Bxu9/H0ta1dJOnh1UAmpPyefWFpvmWNA96jXMyPXzjL3y xzTJLFPq0cFS8ft+D1ynGoo0qqYShjeay3ZM3qCHOFddm3qA50b6fCweDKV3PyAhclBY JNPoNwjGoadYbijB+Ueu/085vG3EKHxOP/pHu7RJh5nsbHDYD5IVpPoP6eFX69ERAwL1 c7jg== X-Gm-Message-State: AJcUukdzF+A8KMsiGi7G2Q0GC9/KVK1CPlPcA6r55Wjqfiy0F97C1XuD E5vekxVWDzMABFLxquBm5jhAp3UM0NU= X-Received: by 2002:a1f:54e:: with SMTP id 75mr10744996vkf.71.1548781497735; Tue, 29 Jan 2019 09:04:57 -0800 (PST) Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com. [209.85.221.171]) by smtp.gmail.com with ESMTPSA id q199sm14617387vke.23.2019.01.29.09.04.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 09:04:57 -0800 (PST) Received: by mail-vk1-f171.google.com with SMTP id 185so4659247vkc.3 for ; Tue, 29 Jan 2019 09:04:56 -0800 (PST) X-Received: by 2002:a1f:bfd6:: with SMTP id p205mr11125087vkf.70.1548781496482; Tue, 29 Jan 2019 09:04:56 -0800 (PST) MIME-Version: 1.0 References: <20190129164813.GA5720@atomide.com> In-Reply-To: <20190129164813.GA5720@atomide.com> From: Doug Anderson Date: Tue, 29 Jan 2019 09:04:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: New underflow of regulator enable count warnings in v5.0-rc1 To: Tony Lindgren Cc: Mark Brown , Sebastian Reichel , LKML , Linux ARM , linux-omap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. -Doug