From nobody Mon Dec 1 23:03:15 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 54F25340D82 for ; Wed, 26 Nov 2025 17:40:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178834; cv=none; b=oEvI3ea/afJ8p07YMJX31t0V9dmH3ijs4H2QggSMO4nRjgH0YvWt9YJ5JrSesCoDw0JkdaB3QqjD9UNvUiutGXgRx0v3Yn4y6qEUkNq3A0twRyJWFFAOXcf31I7EWgo15T7bUtk4cV2WlTM2ptwAAh8U2tCz1ChTJFj5OQxzcTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178834; c=relaxed/simple; bh=QHCV631sE287htt5ntixmRlFJMMXMDvt0ofW7ZLTi8E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mYVSFtKjCaK6t2aZ3IiK7GKQVfYisFKhIeBAToOCeZyOV6KGm12mClfGs2hQ59nfQRuE8c6lDABMqRntL0EwKLppgM5umkCSCBocfeHr9MxO61nmEX+x5NKQZPCuO0MsIljgCiWL3czCCnOa+rWRI/gUZgx9vQ7gsPIVebuu3hk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hhzZvyxL; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cBiussvl; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hhzZvyxL"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cBiussvl" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQG2h1c1234822 for ; Wed, 26 Nov 2025 17:40:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 9/nE9mFzLK64dd3Op/zaOJqEf8z2tEMBy+TpKMFxK7Q=; b=hhzZvyxLmJY8GRFc WnVCW0cAYn7x62Rw2dgZd/Sra0R/cKZZQ7LobHH08olKbex/rZvgyuSjcahjMBcH bYv21fMI3yYeJ0F6DAK5eEJbann5O64mrgep4Huus3mZaj+qSCf2GvSoomsn31Qo LU9vl/VXqnALdcgqDjRrVrxtNX7Y3KyGUEZoqlXlX4ZDauA2QIcY3JE8gf1LuyDU ejVgQRjf2VNMhGi08uBriquiyCXBG9/th7ab9sTtCV8bETFBQiTNReIsiZbxv1T2 FVErpwsNqPRT/j+A64Rp0WvYTEdevNjSWeqavqy6Y6y5rstBZBEnGR91th3L0HJE ywPglw== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anwd41ry0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:31 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8a1c15daa69so768814485a.1 for ; Wed, 26 Nov 2025 09:40:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178830; x=1764783630; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9/nE9mFzLK64dd3Op/zaOJqEf8z2tEMBy+TpKMFxK7Q=; b=cBiussvl+9T3st5mSoSGTuusT3PtnpYG7Rx9mnkIrfcthchqn7AjKYsSIvwtFWPSVk ybCm73kH0lL5nDbXveVDYWV9NwYU0csco8OojTRoXUbUH364V6yKPaOBXih5UqAU+Mp9 J3JskdiiljZDwCc6RbWuDVCRhxIOTfKzsp5zjSUxMBF1wTvCN+ebkD95Mh6j45sdxmJE YtU3WU/iVv8PgRwBWjZaslsThf352XbWJcxE3Mk1qhY/crY8DHPSib5N+49BGMHwCpvO P98H6aftx3Pn9OwHnszAbBQ3NfoXGsU3C9NdCK0zENELbHZIwJjYc2LjziNhuaGwIXw+ HM9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178830; x=1764783630; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=9/nE9mFzLK64dd3Op/zaOJqEf8z2tEMBy+TpKMFxK7Q=; b=kxLF/6ORaNsQE4wUbDLwMyyWPRWFZHrpThnDKLmeds+yZE63ORxrXYHg1xiiOjFBHK Fz4OpNglHAbwMsur2SruPF/U76u3XvEkJupYi7IZk6uxP2lxfs3qRL8+rgOz983Zbk7Y OVKxXEH26x6/ALlxfW1qZHarEzsaHiu2KeINaSlG4h3+0xy7JCtSVhlPLj2Cj52fcgdu Rbd9+2fSrNlmaBP10smhM9qu8x4kFMZd7YRX30zk2NFTdp+XfeK3/IVJbB74srcgAdmi JyTvz41jaEZeqEDFX7S44Gxjbahwboqa5RqEV+skz0cf7UjZ2C9qgjDvud+SWgsihQl+ pXJw== X-Gm-Message-State: AOJu0YwRTrukhdyZ//eBYBDlLy+9IQAlBOhiI17hhZ2dD6hsLZAGo8d9 3Mka895MoZ0tta4RxmfgMX1nLkDxVprdWvLAzfFTqDdGzz6KG1vshbpHfi0vB2LjtDx9WYMVxmA B3BHn6LXyoG9+WitqWd77V5G5bkW1gWeFqfTr+gY7zgf6MUSFmTg1PFjBeA+nBtI6pn0= X-Gm-Gg: ASbGncsynUFGfiCS/KFXNiLZdr9/0tmOQOmEsKUE67wHJ6DJ45DMJFxbQph+Aotse0T puU30fE2aSxrcFcRisCC8Zk34so4Tg5nLV8wzn5NtTkh4TqsYJXrQ0s+pP1Y78rYwiulVP1IKu7 G1omxcJF6GAeMswrysIuNKxKlmEo/i3nyZwsCoZXd1EZnu++W+Z+j1PcEuhob7EuKULPkva2XOC k95Mq2K1K6XfX1WumaZFah5oVQlVwIszEPS7ZAW9pXFr10v8ZUv1jZ/jblVRG3Muzt3IAfVC+cg y2IdDUITrzEVQV2M8QoyczXTPmfR4dd2VzsnDY1TPUAFegd0ebhb0WzIcnDj79TAVl7nK9VXd0r MStRjZiSfidirEcDOmbJ96xSPPvWt50i9Gg== X-Received: by 2002:a05:620a:1909:b0:8b2:6121:5af7 with SMTP id af79cd13be357-8b4ebd54602mr1013173285a.3.1764178830604; Wed, 26 Nov 2025 09:40:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt1Mz9fBy3af1695aDhvFped40qCkoUYHIDo3l5Pjiw2ThshIXfjfsGRpZLC9wUBlHEqde+Q== X-Received: by 2002:a05:620a:1909:b0:8b2:6121:5af7 with SMTP id af79cd13be357-8b4ebd54602mr1013168785a.3.1764178830218; Wed, 26 Nov 2025 09:40:30 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fd8e54sm43226430f8f.40.2025.11.26.09.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:29 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:11 +0100 Subject: [PATCH v2 7/8] regulator: pca9450: Constify pointers to 'regulator_desc' wrap struct Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251126-container-of-const-regulator-v2-7-7ad3408d6f29@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v2-0-7ad3408d6f29@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v2-0-7ad3408d6f29@oss.qualcomm.com> To: Liam Girdwood , Mark Brown , Bartosz Golaszewski , Matthias Brugger , AngeloGioacchino Del Regno , Samuel Kayode , Matti Vaittinen Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2287; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=QHCV631sE287htt5ntixmRlFJMMXMDvt0ofW7ZLTi8E=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt/rKHLlSw2aj9ekDpuHoQUuxhSPS1ONpNfU t1fSa6vSdqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7fwAKCRDBN2bmhouD 12IAD/4jnjL9wTJJWRkQ/+Sr+duE/So+Tn0cVx0bSN89gdxic7LNgiflqKQYzOf79poYlRrPqqI sgQjOR+KEmimL81vv1T7ie8fY7tpXDmIPf8Psexu9Anev2OX9zcoyfowZ4Wy98vfj6QT/HYiywF 2XgOeQ0DRUhffxOrnPCnbPiD70YOyXUZ6HYCrghW/+FPBt6SglwtX1aD7+gF2LnUf/6MqHqF1uE RhqmL6j9Iv+amRsqf11MWIuvbSOrUk/ZY5KDJRHNbP8T6WtWn9FztikJ1zpzASfTClza4VznOFH tmC2gP3R8zs2uYQAQGMB86PsEfB0JBlwUWzakp4nombs9OnEt4MScvsNXwBcnPvxJva0ODT9lwU /FYk6ew7198c04MicdYfU62HeD68RCZJP/ms4nLD0Rlg+nWAGvqGvrFZc46gjcQ3PqB2nCVUrIi uZQpiNtIcOdXpQ+tzbxmU3xH4OSYVKI/g3MDdeATNbuMQyVsGW8ty9cRfAb2aOdiBObgeKn+GYP rO9WTd0ueT5yFbp+mTiDbDtdS/LCrFpqo9ePZyeIut8onXd0cieAiy7bUJhqRtvcrrxQ3m/hlIV Igq54LQlMwWspYBbIeLTiLxMqTZy+I9Zvx4UFw74SOoOCssjQfqQcXd/HH9Uz9gDWL3/dX/+tEJ pXlZ9adGnE7i0kA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: bDqx6guoJk6q9pDRU8lmgctay6_FGh4i X-Authority-Analysis: v=2.4 cv=feqgCkQF c=1 sm=1 tr=0 ts=69273b8f cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=Iax6wTeSMpqzYiZSKl48GQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=wapfrd0RAOuIrv5d2i8A:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: bDqx6guoJk6q9pDRU8lmgctay6_FGh4i X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX8cajZAGVd+qT A4IfobkzvZaHAmaeH9iaiT1Iz1ubkK1CTKTqrHDy251EZOrqcut2DEKjBTx3lrpUqrZCZBkyArn aiAlgrl8K2NmBj5BXlbbhDQbvxOpzqX8zkVzs32U2DOsebnltGMny/XPK87KBIUMLc8BfCgKZQ3 PJrZy8+Ib+lbhGkcJjkhiPVqJpvqGAtNrXhWolK9c+2GtAJLfm7iJMSru/w/OSsVmJoY8N43iMV /ChvqnzB0Himmi+0dImo0JW5wup72JJPKe6io7J2MC1cOedqsW15gOIhlr2BqybDRw6NatViIua R1TDTwqkilIWnyiC1E1EKw41MnDJQdF1MoN4xx+JlifJtF2Iqyekbcz0mjF5AzChOoGWDdB4OH3 wXuN4uxNtpLo7QLcHqqQ+A3nTMudFQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_02,2025-11-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260144 Pointer to 'struct regulator_desc' is a pointer to const and the wrapping structure (container) is not being modified, thus entire syntax can be replaced to preferred and safer container_of_const(). Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/pca9450-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9= 450-regulator.c index 32780c311ccd..5fa868264250 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -249,7 +249,7 @@ static int buck_set_dvs(const struct regulator_desc *de= sc, } =20 if (ret =3D=3D 0) { - struct pca9450_regulator_desc *regulator =3D container_of(desc, + const struct pca9450_regulator_desc *regulator =3D container_of_const(de= sc, struct pca9450_regulator_desc, desc); =20 /* Enable DVS control through PMIC_STBY_REQ for this BUCK */ @@ -263,7 +263,7 @@ static int pca9450_set_dvs_levels(struct device_node *n= p, const struct regulator_desc *desc, struct regulator_config *cfg) { - struct pca9450_regulator_desc *data =3D container_of(desc, + const struct pca9450_regulator_desc *data =3D container_of_const(desc, struct pca9450_regulator_desc, desc); const struct pc9450_dvs_config *dvs =3D &data->dvs; unsigned int reg, mask; @@ -308,7 +308,7 @@ static inline unsigned int pca9450_map_mode(unsigned in= t mode) =20 static int pca9450_buck_set_mode(struct regulator_dev *rdev, unsigned int = mode) { - struct pca9450_regulator_desc *desc =3D container_of(rdev->desc, + const struct pca9450_regulator_desc *desc =3D container_of_const(rdev->de= sc, struct pca9450_regulator_desc, desc); const struct pc9450_dvs_config *dvs =3D &desc->dvs; int val; @@ -333,7 +333,7 @@ static int pca9450_buck_set_mode(struct regulator_dev *= rdev, unsigned int mode) =20 static unsigned int pca9450_buck_get_mode(struct regulator_dev *rdev) { - struct pca9450_regulator_desc *desc =3D container_of(rdev->desc, + const struct pca9450_regulator_desc *desc =3D container_of_const(rdev->de= sc, struct pca9450_regulator_desc, desc); const struct pc9450_dvs_config *dvs =3D &desc->dvs; int ret =3D 0, regval; --=20 2.48.1