From patchwork Fri Nov 13 00:20:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11902331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7723BC5519F for ; Fri, 13 Nov 2020 00:21:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E88EA20A8B for ; Fri, 13 Nov 2020 00:21:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R+tnkSnR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="B8gRlfkN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E88EA20A8B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rere.qmqm.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:MIME-Version:From:Message-Id:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=afkJuHKodSaEhSFRtWO4ChPuP8YoMls0GnOllrcITq4=; b=R+tnkSnR+x+ztEsrkeZc5Dg/hZ DqtOYn7kGRrHR4PwzVkychkxymC06Y+IebcSDzjV8EkqUwNG0VUYexu+Bd9ZL3gNDKkHOEI5fJjz+ cdM5xHw89woj87XwwI0qKeRDAYfZJtqQ6TU2pzeDtZaptOB969r0/l1anepA6gyxSK3xItV6Eqh8w zTB09IU6gUSkGF9n4eZpyMbFK5zBOOmtz5nJUywn4ifaERpJ+eVZ6y7vCCN/T2LmXbiWY3Y8+KXt9 M+DgzyrsAH7M05/jA4/oqikv/N8I3FFUBO7ZMN5zPT2zyLdwVnBRs69+TZT6v98AzniaKLH0ieNZg VuB4p/Nw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdMpe-0001Y5-Pt; Fri, 13 Nov 2020 00:20:50 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdMpM-0001T8-Nk for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 00:20:35 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4CXJyf6T7ZzBc; Fri, 13 Nov 2020 01:20:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1605226827; bh=5AvHMwmdXrUqDje3yNByZNR9Li4JpuwLy9j5ruyPFms=; h=Date:From:Subject:To:Cc:From; b=B8gRlfkN0eVaYPJbKkEJHXXFuzXs8VBvfcwJmLbG2pFhTuzlQH2wOkv9fcaliqDO+ JKqFpcwKlZwAqMN2rlUn2ooWFa9BnaTbvFjsqop0gJH8tRphvdqggUznOoM9uPMHl6 uzJPcssISA9uuIP3VfBrQ8HjwsSXsBD3RcUTYoB0JrN3SfkGJk67Nn34H6wQCp0FKL DqCz1bfcgUBNQ2uL+InGINGA7h88I70ec99XC9mq3yphdRN00eEQ33tHwkQPY0JsS9 CieFHEGjOG+xaXvFFBVVhRliLnIZTSXUGMdt+g6wATnKvIwf9MWfb9XnzshBVrB5qm sMEHT1e6GFHaA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Fri, 13 Nov 2020 01:20:26 +0100 Message-Id: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= MIME-Version: 1.0 Subject: [PATCH RESEND 0/4] regulator: debugging and fixing supply deps To: Liam Girdwood , Mark Brown X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_192033_028468_AAF869DC X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It turns out that commit aea6cb99703e ("regulator: resolve supply after creating regulator") exposed a number of issues in regulator initialization and introduced a memory leak of its own. One uncovered problem was already fixed by cf1ad559a20d ("regulator: defer probe when trying to get voltage from unresolved supply"). This series fixes the remaining ones and adds a two debugging aids to help in the future. The final patch adds a workaround to preexisting problem occurring with regulators that have the same name as its supply_name. This worked before by accident, so might be worth backporting. The error message is left on purpose so that these configurations can be detected and fixed. (The first two patches are resends from Nov 5). (Series resent because of wrong arm-kernel ML address.) Michał Mirosław (4): regulator: fix memory leak with repeated set_machine_constraints() regulator: debug early supply resolving regulator: avoid resolve_supply() infinite recursion regulator: workaround self-referent regulators drivers/regulator/core.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) Tested-by: Ahmad Fatoum # stpmic1