Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp768809pxb; Thu, 12 Nov 2020 16:25:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzROQ2ZznkGEUocKosPSl+hPTuSEe0en3hAgG65G0NcUWY4P4E7394A4vvrE9TIdbAkOdam X-Received: by 2002:a05:6402:17b4:: with SMTP id j20mr2858252edy.24.1605227104078; Thu, 12 Nov 2020 16:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605227104; cv=none; d=google.com; s=arc-20160816; b=urxmgtOfs6Zkfef2opqj+jIIdm5gCVV4g4eBPgUJytmvZnoFxUaAsKkl23/UYKULdq /t5xejyAWSc7nxOb19FRhi9heA+hXizdLM99MPN9/K5aIMpV775rhuF4jiCaLTw7fAkS XweRCGYX97ISJ4HHgmvgpRK9JOCpUVlaasEB4SmOD6ZESfT+TuNS6HlR1VN2Cf8vldDC sbqlX7AaqucuSf7DpZxbwvN3g8Ubm+bO6sPYlvoKtTHNLpKE6+o19iFbUgshxo6YiXP3 PdPsVHZjdiNqqV8n6+Rfuu5bmEOd2/bCGJFBkUJY8cTQ6Z1OYSLHQTYyEnnyOacFzO1p yQMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:content-transfer-encoding :mime-version:from:message-id:date:dkim-signature; bh=B8rmEKC4HfvC0paCnTuQ+tx3PUBzJiiHzd4PvJ9ICPc=; b=rx4adsY+0hmStPvlQ1TxrBJWHWTCGbC05Y4WU+SVzibqgRxnn4BC+94ijg/pLjALvg aqYEx72Tzy6aN+0GpNku55ehy7SksjzuJOskjW0C50ThTQI3Q6r9DdAoI8QnUaHjV5Ey xkPqGL9SpL7SUrgN/gywy8z/+Yp+o17FR4OQvQZSPHzBjRBO7VWpFTxxmdp0HIgfgo3b nq9N6DgLw97K3qmcaKzPCih/l5X2+RNTnZHPaJ0FzfszYf0dPb8KbY/r182FKc0gqLHj pGA5rnJAYggvvdsESjsLj/3qW05HT8yQ4mQ6WY2kuWSH62fyju/FABnr7PgIxAZrpOlY WNOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=B8gRlfkN; 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 v17si4767618ejr.127.2020.11.12.16.24.41; Thu, 12 Nov 2020 16:25:04 -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=B8gRlfkN; 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 S1726150AbgKMAU3 (ORCPT + 99 others); Thu, 12 Nov 2020 19:20:29 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:52944 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgKMAU2 (ORCPT ); Thu, 12 Nov 2020 19:20:28 -0500 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?q?Micha=C5=82=20Miros=C5=82aw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [PATCH RESEND 0/4] regulator: debugging and fixing supply deps To: Liam Girdwood , Mark Brown Cc: Ahmad Fatoum , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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). (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(-) -- 2.20.1