Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp766673pxb; Thu, 12 Nov 2020 16:20:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0OhjwEizZh+E2U9yBtwDKNyhj3lSJL2syXGuqltWoSV75TeGlll4hAJGPLAL0rTvhNJBT X-Received: by 2002:a17:906:3fc5:: with SMTP id k5mr1959147ejj.158.1605226846660; Thu, 12 Nov 2020 16:20:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605226846; cv=none; d=google.com; s=arc-20160816; b=eufRPQqNFEJikmqvExp+1RKChL+W08rtZQlGjdwWbkeOe7zInW7VligG6GVKZ3Z1/S cM1VvzSrTvEuu6l5N5/oAG65U5UvCF8YHyREW8YCMbvsoyS14/MUxc1fihkKqqWII9I7 w7YaH11twmSs59z+GPFTNEGaPfLDjr0rwhc6S/Y1ArG8YeFZJi+/gqcqudElPoM5o/Zx dABUh1TY+6zjpfvzm39OWJXMLXuitFP2nw+Pa3uf+Pjpv75U0Y4DdeUykh9Eo6s7UJb5 tx3wT6CaHEe0plPLU/lCPqv4S6s3HcBk4P397x96q21iRj6S2eSVBwOx+zLtfJiRw7y5 S0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :subject:from:message-id:date:dkim-signature; bh=8JOxDh2h03ulGLhgq/mIZHIM7H4ukYgCI9YSkTKPYlA=; b=zQogo1ySWQ4wPwE6XO6oHhgVEZNnm+zeyLvVYxaH82Sqo8iiirm+6p6lERuaSAuLyU fVyNqLYg1lfW4SfJt2uDqtawrNcm/Mkm8vwBjefHjYC2kdwdfkBxe+6nJlzgUenUQN7q dsEdfMV0BfN+F66uZDFvAJqHc4iTnEa2KRoyjSJCD6CtSDKoRecsQRGhyvC7GcHqcyd5 AySNur8settlF4MJ/Fhs5e/DvOVRSjy++z0F/spf1vqMOG6DaRTc3BQhVCpFdCb9q7+K N2rFmrt2e2tTuPK6MepMYuzDhHHZLXFcX3njhrnuL/GhBqbofwQL4K4rWqPou4vVCVG4 740g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=OzGIcMAP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e14si5500395edl.270.2020.11.12.16.20.23; Thu, 12 Nov 2020 16:20:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=OzGIcMAP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726064AbgKMAQv (ORCPT + 99 others); Thu, 12 Nov 2020 19:16:51 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:58353 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725929AbgKMAQv (ORCPT ); Thu, 12 Nov 2020 19:16:51 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4CXJtS4ZzMzBc; Fri, 13 Nov 2020 01:16:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1605226609; bh=PKfext26ZSEBjtW9babqh2FuB50HIUS6rN783BtOwmw=; h=Date:From:Subject:To:Cc:From; b=OzGIcMAPaeoSuHfucksUencTqUEkVpFhmYcQ4YWnOQ5JZsyTDrutw0fRD83RceBur MfEdvxAZPYyOtagakJOvG2f0Br3HU9U3bL0DtjV+3BsReYonIk2A32IAdGovLbJuMZ tr6QcyO+X3lCKTMkDAckkUF+2DXDXqp6VOvtP7utQNDLr6FtbGUe9LGldaPX+yZvpJ onggR8SEnalti5qI4DLok8h62SCkwBdB+ioknrIuge5ysueW5oFFYnxejP9ps65WbS fbOA+vyCyycijZRp09wOoJcJVo8cWa4fjQaG/8caUqXNU8G9bY6qOpBkISXYK6lU0P CnpNZubKyH64A== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Fri, 13 Nov 2020 01:16:46 +0100 Message-Id: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 0/4] regulator: debugging and fixing supply deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Liam Girdwood , Mark Brown Cc: Ahmad Fatoum , linux-arm-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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). 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(-) -- 2.20.1