Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp247384rdb; Fri, 5 Jan 2024 08:31:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFH3hpueEHlxGNDIuYgCKsuTFkn/bsDGjtoTGf5G0JvXszMzL7to70PsFLQGZVZ+sfCBZVw X-Received: by 2002:a05:620a:4453:b0:781:a0b1:be2d with SMTP id w19-20020a05620a445300b00781a0b1be2dmr2877167qkp.93.1704472274420; Fri, 05 Jan 2024 08:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704472274; cv=none; d=google.com; s=arc-20160816; b=k91Z54/bYgxca5O1O1EAvJT/4/RjY7gx89WAvcZHzJbjBC7bY/vxPym40X06L3psRK ImiEtNefGuQgdywgL90qhLXrwG2plTn08N467MJzeNqyahRDI0bMW98NPNb6lZj+g9dm y+W2lK4O80gau8hdztij70W0RshbhggxbQFcIWDyfmJn1rsbc6y7Hk8n23Gs9HGVcLlL CBfbD8/csGlB57z4Zul+eq5KLSfxcoas9MH4XEQ2jNlGdgjXzR7MpBsrTOod4R4WBfIf Te90RQ8NLA9EpU3CwHeJKpN1kgHMuGzKyNNhPR1bfiXs677bP0U4pfmt43/FVw2OfoKp /HOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1r9Dxt60UEPKQ2eP33gVr+rpsnVimC0xf6QaQUB3kTc=; fh=oGr8iwi38XAFbcu8oqo0N+05Jb4Xz+lZSIxXTCU3KSM=; b=Q2T8s/I38nyYmi/oWZRwYRIT8rbHZOFYCwPowMqVCzQQPh5dEuuxKnZLpWI84y++Db i7t+f0JNTMqW3l4fM9gZLIW0pSpNo4biOPNJCxsKFUaP2SvoefdUVyTTTdrBaoICS7WK eU980MwMoZFZBEMnK/DV9zaa1eEJApgb9GiJIXN/CQkofIlWhSz/l6+m5K0ij/TJqrw0 /K/V1wisAd+0uGU0Rh9kKijXpP5lDQJ7mu/2BkAzh9VESKhuY4PqCPkIl3Eo4gXvlDoC /yFXtBYLsMzSoS2LkiA75zU5Kd+FmEvNVM6GeUZr6yrR/+gPjwDkffDKHW3oSjEHw10n aUCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oQupj9bP; spf=pass (google.com: domain of linux-kernel+bounces-18065-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18065-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q8-20020a05620a0d8800b0078114cc3893si2192035qkl.37.2024.01.05.08.31.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 08:31:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18065-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oQupj9bP; spf=pass (google.com: domain of linux-kernel+bounces-18065-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18065-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F1F041C233A8 for ; Fri, 5 Jan 2024 16:31:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F3FF31A69; Fri, 5 Jan 2024 16:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oQupj9bP" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C51D531725; Fri, 5 Jan 2024 16:31:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D7DDC433C8; Fri, 5 Jan 2024 16:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704472266; bh=YT9ZNsftjsycktRUoMx3FX1B6YamDKgCzg0gW9xnfVA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oQupj9bPOLfSV/imoIA13iDeCckcijw1deztSvdocxs1xVihtorHvStLiudzww0wF /3BvLq9M/0S8cavZgW7kZNv5Ron2CyidElOrjYUuYJ8N7hxtSVXBWQwURwMrmZnysr +GPnNAznJa0vGtWabLjDPxwKcGBDqP5aHkr7415XOtHXdliKrqU1l3U6rFqU4JKNEB 90MY3scEOqM+wdW6WTvsAncUR+pI2za5DtrKc/2+CP3j8/8kXJQcOlU8ss6gtkrtsO xAEisIeleZW4aPLjb+yfiHJbQLCMDB0vFY19Qvx0vf/wTYrgxPEJXYnrUMyD8ifKgb k1GQfAtEEj5pQ== Date: Fri, 5 Jan 2024 16:31:01 +0000 From: Mark Brown To: Konrad Dybcio Cc: Bjorn Andersson , Liam Girdwood , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] regulator: qcom_smd: Keep one rpm handle for all vregs Message-ID: References: <20231227-topic-rpm_vreg_cleanup-v2-1-04c79c4f9166@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SHKddNeScMT9u6b/" Content-Disposition: inline In-Reply-To: <20231227-topic-rpm_vreg_cleanup-v2-1-04c79c4f9166@linaro.org> X-Cookie: Your step will soil many countries. --SHKddNeScMT9u6b/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 03, 2024 at 09:18:37PM +0100, Konrad Dybcio wrote: > - rpm = dev_get_drvdata(pdev->dev.parent); > - if (!rpm) { > + smd_vreg_rpm = dev_get_drvdata(pdev->dev.parent); > + if (!smd_vreg_rpm) { > dev_err(&pdev->dev, "Unable to retrieve handle to rpm\n"); > return -ENODEV; > } It'd be slightly more robust to have a check here that we do get the same RPM back if the variable is already set, just on the off chance that something changes in some future system and we do end up with a second RPM somehow. --SHKddNeScMT9u6b/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmWYLsQACgkQJNaLcl1U h9BhJwf+LNWnV7aYSMGzS9p2rabLoDUBs3Oa3nH9VheBdPCnj+3+D5SWTxGHdGud 87tmCpZqyfU0BuIkjYMtvSdd9YjYLFOGBCSQKA2yTXaOpwyza7YpDxI8HXzXaZwS FZNX4keO8YbHzSIA5MUn0cx+ilemlombBlFpFXaASR+Mijs8haY6uGfMW/9H0w2k c5hfwRGAoa/UVnwbdDtNZkSF9UUvi27H8/j1EPICaxm/MMkuse2qliuehRQkIbCq B2JwOfnvRB5v/OQp5LbRzGyGGcdIhz/j5w/RNs2K9Cz9ImvD1c1a3l6EQTlEFuQN CQNM2vAUtDebYaOrvTjRNtPqse5XVQ== =3e40 -----END PGP SIGNATURE----- --SHKddNeScMT9u6b/--