Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3460282pxv; Mon, 26 Jul 2021 04:49:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWvwZqAhB6PCbHZezJtHY+f/gjxZd0DxleD8piNTlAAbyfb2Eg3m8N5y3LObIlJmFNixTh X-Received: by 2002:a5e:9747:: with SMTP id h7mr4878238ioq.92.1627300174702; Mon, 26 Jul 2021 04:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627300174; cv=none; d=google.com; s=arc-20160816; b=dfotabzBqpjiKGE87d8FfGcEAYTTkKe80Mj79m2h7fkrM4b3ZTSKy/xfs1fi+2HX8k q6rvvrG2NzhYmwn5BcG7ioIskapO5ZtrHjt3FRCyJuK5awrbhneW/73FOpiqJSV87PtR ZNP8T+wsLJPR+XSiEYKAzwiknEf1v8/iwD9rB/8THPnSkMQOLRF6Yqw3bADkJqYoXKa2 7sEexsHBLPH3739Blnz6SCa39fzZ9WWVRMC4kDqM+N3Cmf4HQ9p8vhTdhVDEUEpDn+9+ De7AQNYqXiAokeovBaW/61Jh+UPHQHE0CcXHXy/R0Q7Va7FEXnCWmigxYRdiKy8jOL9F Impg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=byzq3adVgBWvFV8/MOcZ+ocx+h4KVVK1HMJBXotZXoo=; b=RKh/3N/5L985ZhEPFTuoneNCUMjG3c93uHEk4GkiN2+aVjkSgLo7Nle0qUbH7DfHV6 bPDWIflBWJWmBzmtJTlPBNFg/jJR2NN1gr7ejaZAsqMHyXgYlUMdSe8IROtxkxSnOMQ5 UTpw2imCd3WWeiUgTbcA0gnN2MOvIyn6JK6EWZgOHYvqYMwEJrNWlQJNuYO/utZ1zh+N MXGh8Bjwm7fDEGy6uNR6Nm4G1yz68KUiBwlexm8sC85aUL/ssD28EBnAnqLRAF7bsWvo mhG2poCoNl7ymFU5QaaGrAvXBxauYJBjJPue5WkYyTo30d3yffo7CtSE3scNy4XRXE9b 3R9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QGipXLAI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si33120170ilq.82.2021.07.26.04.49.22; Mon, 26 Jul 2021 04:49:34 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=QGipXLAI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233708AbhGZLHc (ORCPT + 99 others); Mon, 26 Jul 2021 07:07:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:34198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233699AbhGZLHb (ORCPT ); Mon, 26 Jul 2021 07:07:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 20B3F601FD; Mon, 26 Jul 2021 11:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627300080; bh=l8v5lSsUSMTlqG/sB46EgYt3czOPr+b+BEd8Zf5u+MU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QGipXLAIlPGnfh15+eBg7GkWRidY2KSBtFjZYFGiiA3PY9fk4jOHHiesA8369gIsC 8LUATQ0OU8aGrpHxQIQVKzK0cCVdlVq+UNVcR4Gxuqas3ZE09g/lZczmEaPJ5gOMNL vzt4cxHoVi4TbbZXoUtxpk9JsNkQJT4W/eAGhw/PF+ql/ynhmXCVJuHrn0ryPUO98o 8c7b9oPX/sTsg7IELvCRpaS0Q9S0S9bD3unR6qBuUaobey0wkV+qmFUFKK526RIgqN bC/M1v1aeYHwDtNBvVb9guuV0AhSJzVoNxeCJJDq4bVEaK8Ci0q8qRxJMCnbmL1txg 7oD8cxTQH2qIQ== Date: Mon, 26 Jul 2021 12:47:51 +0100 From: Mark Brown To: Matthias Schiffer Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , David Lechner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] regmap: do not call regmap_debugfs_init() from regmap_attach_dev() Message-ID: <20210726114751.GE4670@sirena.org.uk> References: <20210726073627.31589-1-matthias.schiffer@ew.tq-group.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EgVrEAR5UttbsTXg" Content-Disposition: inline In-Reply-To: <20210726073627.31589-1-matthias.schiffer@ew.tq-group.com> X-Cookie: Vini, vidi, Linux! User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EgVrEAR5UttbsTXg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 26, 2021 at 09:36:27AM +0200, Matthias Schiffer wrote: > regmap_debugfs_init() should never be called twice for the same regmap, > as it initializes various fields of the regmap struct, including list > heads and mutices. A visible symptom are messages like: >=20 > debugfs: Directory 'dummy-iomuxc-gpr@20e4000' with parent 'regmap' > already present! >=20 > This happened whenever regmap_attach_dev() was called for an existing > regmap. Remove the call from regmap_attach_dev() and change > __regmap_init() so that regmap_debugfs_init() is called exactly once. The use case for regmap_attach_dev() is that there was no device when the regmap was initially instantiated due to it running very early, we want to attach the device when we figure out what it is which includes setting up the debugfs stuff. Whatever is managing to call this with the same device as has already been set is clearly not that use case. --EgVrEAR5UttbsTXg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmD+oOYACgkQJNaLcl1U h9A1xwf+KhllaKuCR+0eiR+aFqT12X5eXhI1N0wuLPuD7o713TqcbTDtP7NSJEUI /Nw569My3AE0WYNeXdW85br9cTh+0qFTUdm5EEXYsY0a8fcFgf5QPpQ4SrHSM2BX +PvuQjZHBlcrl/OpoaKkdAmGWEsvgraBg9Y7obmUOfHhW0CljEB1q+vqpLaAoahA ov4wJEN50LcsNAnzPDWt+kZAZ3ArScN+0uGI12f9yu8ORXdpHbAxyCU6sbm4TzV6 8h9MeF1XYuPrA5dELuXjxZ6pO6+TUVPQtNTw8euH+rRouYgXlr8IQeqd83d1zNVU Qh6AS6a+qODGv7TvBa1SKcTIV9HjCQ== =DQ6A -----END PGP SIGNATURE----- --EgVrEAR5UttbsTXg--