From nobody Mon Dec 1 22:35:42 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 E3588278165 for ; Wed, 26 Nov 2025 17:40:22 +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=1764178824; cv=none; b=F3ag5gmKsHjiDLmRSl5mBy0PM1H/iyudpaxgwwprc6ts88DlX+29f514Z/DLsgfqKbrHQlyGcgEAFBkJMS2dUaPXifEVELRH4oMqq/cMZ6qz31aqynb1RreyqZrZKWGHW2h66lcvK3BbpNsCLThJP13FxZ3XIUJlfZ9GtjfUG24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178824; c=relaxed/simple; bh=U43YtcHpntkrCP9ocMS7I2vJE2/QxslbHKdrzw9qWsk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Bbi4COJZ9HhPTLz8UaJsuPA5+ZNPs7QcFLAf0S7ES/Uhuu8g460F7uAIO49ev1gfXy4g4DpvrRZm5mQcHC8YWzASFuB9UU/nZPCea/yUfS0s8/Hf1Xi2c9gSyiwghFs/TKDXGNDSm63kXdzEx1lrr38SOAdeUpM1DWk8qyPB/Rk= 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=X2hCpKOj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=bwWsPk8Z; 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="X2hCpKOj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="bwWsPk8Z" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQAsjPE1700282 for ; Wed, 26 Nov 2025 17:40:22 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= JLI88Fy68vj0FHydbJ/LnweRpXCDXBC8BYlqjA1nmeY=; b=X2hCpKOjHqvkmIyQ uMGbdM+Zq5Xqds9v1bnS9koQdy81a4bAdgN8NvvPP5J/HCmK+XTBmct4P65Tnu7A MQIW9dyQ3VUq1w2rSb2t5p52+5dyBx9GWl5C+l00sgvx7ZOwp7UBKxea+3NPOMCG WY/rw4N8magCB4VbYTP+6Tt98itsAbM6YyfHRB+c6ph/DsNKacRtgotONcfOgwMI vJOWToH3NNrJrcRJCZ8tYqSNsiwtKtfeImSvCgWLTMjl2H/8mCXu6uilBOJPv2Vc hDw8UhX3AyL/8+lzgoavZPSKVV6Q/hWuTj+rChEK9j0ZIljyutimxvESTnFs0a/L +zCV2w== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ap07a13t6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:22 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8b234bae2a7so1841589585a.3 for ; Wed, 26 Nov 2025 09:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178821; x=1764783621; 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=JLI88Fy68vj0FHydbJ/LnweRpXCDXBC8BYlqjA1nmeY=; b=bwWsPk8ZClJROeKA3AYo1oWpXClHWtb6cIFC7mM1AyYP8RIGRI/pZ+BKhlDdIhldev sQ0dDSo7IsrlcjpCmbblG7ex+kLax3gYMAC1n84CKkaJ6rsjukAvgrvjJraMiiaT3JeH LNhulY/vgOsAHzTxmVWQZt3rRD5lO+wdP6As765fvnzHl8LvJam2RiirVDugXyW7lMJR +mGRLN0g7G08ozh0smwZU3KzWqFbxP8iYS8cDxzR2orgD4Ea1Tl2Gz0AbxSyaNCbx+e4 ahqq11l+NcflLCkbPG7MYlu+clrbJ1lDfFO/hBqGT7aRQt+HTfh/Otcnyovv8dHSWLVQ A4xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178821; x=1764783621; 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=JLI88Fy68vj0FHydbJ/LnweRpXCDXBC8BYlqjA1nmeY=; b=wiWNke61Pvixv5hP1MKIKR0CXkPxWwgcleyKDO2SouEt1IIig8T8kUjvzlzkUXQlIa Ab0eVaxiWTEhd68NPiZJsXYa9cOqZ6KwahKhmyqwK8o3YanbZVuRaW8IMUVFnpRg9QMO kcJxMtrV6no7jPs0vkyGsJcZzeXOBfaoX9K3bzX2MPXQ5cCFoUmFaFi++9NryRelLocH SghfoUa9aZUwKjKlTw+J2P2FVjGPSIgK4yrPIaHxPIHcbUqH7JbjPQ+UeNMYiqo7baoR ekUCru5B8C1QirSUZ3pPElD5uVVNg5k9g6eKpVDyehzTKl5nzGkUfJpxkj+OUdxdWfsN 01CA== X-Gm-Message-State: AOJu0Yx2+9DHOi2mi1YWJcUDuQe32m2X7s/iJ1sPTSctI9MR4pwx257+ eTtp0/LDGdK1XzP18TbXElce0Vbd3M0ahl6s+xQg/zaa0gHMadgZ/35RTIE685MQ4WE4FLm0Hny tF5IlD3HEqYXUu6Neq/E8/Q11jvaQDZSMUtUnsTK5vH1zBXTJGEpUMgb7Q+iwUvzD12g= X-Gm-Gg: ASbGncs4VyhlAYU6HqPkHzK05X7caGSFXkI0MOragT1XgIG7ploAu2rAWVlOzjNB5X8 OAxIZONqUbobnLfB/ijVWfqDeIw9LplnwuH1aoHZZOSK6b2C9+3OM0bJd1gP+rjsaU/HK/dDwaZ weMcr0hv2nifV6dsEORHVdM94kAkzJFf8t4UwIFM77FzzOd5NeovxnV8QtrNeUu+XwZTb2mQXoG wrhRzdrio5vqufJ25nOUBmTZZQa7jIh0EaSs2846qAAvdhKlrGNGRDHas6uhPWMxeyq4bxFLklz zSjP/I7U5C4SHAFqtgXUqFwehRdlijjXdPwuLfzfT01YCe7CaaNoBZf4MGe3ijCPnDSTCdEdzhO W9rcJf4TKF3EfIzz9OvwDQezT+tJSGSmFcg== X-Received: by 2002:a05:620a:700b:b0:8b2:db27:4262 with SMTP id af79cd13be357-8b33d469984mr2447581185a.74.1764178821024; Wed, 26 Nov 2025 09:40:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgxrvUjv1L8Qqp5Ly7KuU6GITEy+qFYGTAMuG8yUfN6EMn37qZfVIiA/8CZ6KMq+7xblT3zA== X-Received: by 2002:a05:620a:700b:b0:8b2:db27:4262 with SMTP id af79cd13be357-8b33d469984mr2447575985a.74.1764178820475; Wed, 26 Nov 2025 09:40:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:19 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:05 +0100 Subject: [PATCH v2 1/8] regulator: Use container_of_const() when all types are const 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-1-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=8192; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=U43YtcHpntkrCP9ocMS7I2vJE2/QxslbHKdrzw9qWsk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt68w5EN9ZnwGt1+nnfONVEK5b/pP2uSwOUj +R+gfl30iOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7egAKCRDBN2bmhouD 14DUD/9GDZY/BGcJN5fJwbIt8KBO50Zvvu3MGbl6ps2SMhhE4/fcSimXlgCtPW1JuNC4OZz40MQ 91cKFWG4uvhsNWiI6lkxzKr/57Jg6PMtDBHOTxIhn9OLDa3hOqftufyWUAD6FOrK7npVd7Lvc2g kEsw8Wtu/LCt/qUvkMSMNdzhr6OjynagBdWBjSNWv2RMgbucSHk6U8SbK5+oKXIJnnN0b3H05uM E/Z67qDfAG53irxS88P3LH0RNiRUAGCKPZ/XOO8FlWjKjlBqX9SDMNCqVWH7OO8ZHyTHtgSOD8A CfXoWzhYMQZvpN2Bi4pGUNqAqKZAYuALqB6TLEMmH6InA7M4moUOGcvzLoTU/egz6sBLyI3MmU8 Y9OBwAauqzQ7gFvZ+FfEcYbqYHClcEgEISU+cz1/ABq1Zh+PqDxl3pjZw/6YB5IZaMj9juzT/9B cu9enEWaDT95j4tw41tZnPfBjcpsxQytQcSUQ67KidiCq/pvZKYR87T765Miiy50ZzORHcbMJnA ylQ6VEs9i+C9qJfuyU2pArE5hx3vKZ2wpQPJbe0DPUmLGWuL0V9V5RsvZFcLhOLRwGo5GR4uuMz QS3P34ZzExhBWJsA9GRwJVgTpt2xGDbSIB1fXDUOpRd1IKqeEwTyUclbct67aVIHaqpiUT966aa AD2y65T2pvfNdjA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=ZZEQ98VA c=1 sm=1 tr=0 ts=69273b86 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=Iax6wTeSMpqzYiZSKl48GQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=vouig9Kt115S9qvWE1EA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: 5izk8J3KfCdX713qa6dlY5RJNJaTO620 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX1f56aQKarIKO cRgCZ8cYAmEJCAdfO5HaB5Zy/qvXPrYMRzvhK/eEGClP0P9d5lEtrCtI06qf/q2q4bs1U8qbkra 5pAyX+Q261Eda1ilsfe/6knnGm90WxOSmDsqA02LTu9WTDcZzpBYiHM9KaQc8/7V5X29s1jlN4Q CEBnddnGcyS7MBfQ+0hIdCVN/kcKHzG4BPSI2FlqKhEe309WB8BTi+2MxpQr/jkivmbbCjiX0XL gqNxPSNeAic4yMzrKHtdmziopFg+hzBM+KjQxlu4ZQLSXO3fXESTJEB/myOwPCzRso+vsIeRuDj SGsZz6nJItlX0FyIvtJ+WjgACgN8Vd3GMuBowlipd18TzK9XcvXMQe7Atk7PMKdIIDYIXJqmbJI p/JrE74DkSIbQqov7SSCDvSDIEYuSA== X-Proofpoint-GUID: 5izk8J3KfCdX713qa6dlY5RJNJaTO620 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 malwarescore=0 impostorscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 adultscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260144 Use container_of_const(), which is preferred over container_of(), when the argument 'ptr' and returned pointer are already const, for better code safety and readability. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Matti Vaittinen --- drivers/regulator/hi6421-regulator.c | 10 +++++----- drivers/regulator/hi6421v530-regulator.c | 4 ++-- drivers/regulator/hi6421v600-regulator.c | 6 +++--- drivers/regulator/max77650-regulator.c | 6 +++--- drivers/regulator/mt6315-regulator.c | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi642= 1-regulator.c index 69d24728d6a4..cd06030c3587 100644 --- a/drivers/regulator/hi6421-regulator.c +++ b/drivers/regulator/hi6421-regulator.c @@ -387,7 +387,7 @@ static unsigned int hi6421_regulator_ldo_get_mode(struc= t regulator_dev *rdev) const struct hi6421_regulator_info *info; unsigned int reg_val; =20 - info =3D container_of(rdev->desc, struct hi6421_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct hi6421_regulator_info, des= c); regmap_read(rdev->regmap, rdev->desc->enable_reg, ®_val); if (reg_val & info->mode_mask) return REGULATOR_MODE_IDLE; @@ -400,7 +400,7 @@ static unsigned int hi6421_regulator_buck_get_mode(stru= ct regulator_dev *rdev) const struct hi6421_regulator_info *info; unsigned int reg_val; =20 - info =3D container_of(rdev->desc, struct hi6421_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct hi6421_regulator_info, des= c); regmap_read(rdev->regmap, rdev->desc->enable_reg, ®_val); if (reg_val & info->mode_mask) return REGULATOR_MODE_STANDBY; @@ -414,7 +414,7 @@ static int hi6421_regulator_ldo_set_mode(struct regulat= or_dev *rdev, const struct hi6421_regulator_info *info; unsigned int new_mode; =20 - info =3D container_of(rdev->desc, struct hi6421_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct hi6421_regulator_info, des= c); switch (mode) { case REGULATOR_MODE_NORMAL: new_mode =3D 0; @@ -439,7 +439,7 @@ static int hi6421_regulator_buck_set_mode(struct regula= tor_dev *rdev, const struct hi6421_regulator_info *info; unsigned int new_mode; =20 - info =3D container_of(rdev->desc, struct hi6421_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct hi6421_regulator_info, des= c); switch (mode) { case REGULATOR_MODE_NORMAL: new_mode =3D 0; @@ -464,7 +464,7 @@ hi6421_regulator_ldo_get_optimum_mode(struct regulator_= dev *rdev, { const struct hi6421_regulator_info *info; =20 - info =3D container_of(rdev->desc, struct hi6421_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct hi6421_regulator_info, des= c); =20 if (load_uA > info->eco_microamp) return REGULATOR_MODE_NORMAL; diff --git a/drivers/regulator/hi6421v530-regulator.c b/drivers/regulator/h= i6421v530-regulator.c index b3ebd1624814..1822f5daf6ce 100644 --- a/drivers/regulator/hi6421v530-regulator.c +++ b/drivers/regulator/hi6421v530-regulator.c @@ -110,7 +110,7 @@ static unsigned int hi6421v530_regulator_ldo_get_mode( const struct hi6421v530_regulator_info *info; unsigned int reg_val; =20 - info =3D container_of(rdev->desc, struct hi6421v530_regulator_info, rdesc= ); + info =3D container_of_const(rdev->desc, struct hi6421v530_regulator_info,= rdesc); regmap_read(rdev->regmap, rdev->desc->enable_reg, ®_val); =20 if (reg_val & (info->mode_mask)) @@ -125,7 +125,7 @@ static int hi6421v530_regulator_ldo_set_mode(struct reg= ulator_dev *rdev, const struct hi6421v530_regulator_info *info; unsigned int new_mode; =20 - info =3D container_of(rdev->desc, struct hi6421v530_regulator_info, rdesc= ); + info =3D container_of_const(rdev->desc, struct hi6421v530_regulator_info,= rdesc); switch (mode) { case REGULATOR_MODE_NORMAL: new_mode =3D 0; diff --git a/drivers/regulator/hi6421v600-regulator.c b/drivers/regulator/h= i6421v600-regulator.c index e5f6fbfc9016..e7c8bc10cf24 100644 --- a/drivers/regulator/hi6421v600-regulator.c +++ b/drivers/regulator/hi6421v600-regulator.c @@ -121,7 +121,7 @@ static unsigned int hi6421_spmi_regulator_get_mode(stru= ct regulator_dev *rdev) const struct hi6421_spmi_reg_info *sreg; unsigned int reg_val; =20 - sreg =3D container_of(rdev->desc, struct hi6421_spmi_reg_info, desc); + sreg =3D container_of_const(rdev->desc, struct hi6421_spmi_reg_info, desc= ); regmap_read(rdev->regmap, rdev->desc->enable_reg, ®_val); =20 if (reg_val & sreg->eco_mode_mask) @@ -136,7 +136,7 @@ static int hi6421_spmi_regulator_set_mode(struct regula= tor_dev *rdev, const struct hi6421_spmi_reg_info *sreg; unsigned int val; =20 - sreg =3D container_of(rdev->desc, struct hi6421_spmi_reg_info, desc); + sreg =3D container_of_const(rdev->desc, struct hi6421_spmi_reg_info, desc= ); switch (mode) { case REGULATOR_MODE_NORMAL: val =3D 0; @@ -162,7 +162,7 @@ hi6421_spmi_regulator_get_optimum_mode(struct regulator= _dev *rdev, { const struct hi6421_spmi_reg_info *sreg; =20 - sreg =3D container_of(rdev->desc, struct hi6421_spmi_reg_info, desc); + sreg =3D container_of_const(rdev->desc, struct hi6421_spmi_reg_info, desc= ); =20 if (!sreg->eco_uA || ((unsigned int)load_uA > sreg->eco_uA)) return REGULATOR_MODE_NORMAL; diff --git a/drivers/regulator/max77650-regulator.c b/drivers/regulator/max= 77650-regulator.c index 7368f54f046d..a809264c77fc 100644 --- a/drivers/regulator/max77650-regulator.c +++ b/drivers/regulator/max77650-regulator.c @@ -68,7 +68,7 @@ static int max77650_regulator_is_enabled(struct regulator= _dev *rdev) struct regmap *map; int val, rv, en; =20 - rdesc =3D container_of(rdev->desc, struct max77650_regulator_desc, desc); + rdesc =3D container_of_const(rdev->desc, struct max77650_regulator_desc, = desc); map =3D rdev_get_regmap(rdev); =20 rv =3D regmap_read(map, rdesc->regB, &val); @@ -85,7 +85,7 @@ static int max77650_regulator_enable(struct regulator_dev= *rdev) const struct max77650_regulator_desc *rdesc; struct regmap *map; =20 - rdesc =3D container_of(rdev->desc, struct max77650_regulator_desc, desc); + rdesc =3D container_of_const(rdev->desc, struct max77650_regulator_desc, = desc); map =3D rdev_get_regmap(rdev); =20 return regmap_update_bits(map, rdesc->regB, @@ -98,7 +98,7 @@ static int max77650_regulator_disable(struct regulator_de= v *rdev) const struct max77650_regulator_desc *rdesc; struct regmap *map; =20 - rdesc =3D container_of(rdev->desc, struct max77650_regulator_desc, desc); + rdesc =3D container_of_const(rdev->desc, struct max77650_regulator_desc, = desc); map =3D rdev_get_regmap(rdev); =20 return regmap_update_bits(map, rdesc->regB, diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt631= 5-regulator.c index 2608a6652d77..d3f93aae0fc5 100644 --- a/drivers/regulator/mt6315-regulator.c +++ b/drivers/regulator/mt6315-regulator.c @@ -80,7 +80,7 @@ static unsigned int mt6315_regulator_get_mode(struct regu= lator_dev *rdev) int ret, regval; u32 modeset_mask; =20 - info =3D container_of(rdev->desc, struct mt6315_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct mt6315_regulator_info, des= c); modeset_mask =3D init->modeset_mask[rdev_get_id(rdev)]; ret =3D regmap_read(rdev->regmap, MT6315_BUCK_TOP_4PHASE_ANA_CON42, ®v= al); if (ret !=3D 0) { @@ -111,7 +111,7 @@ static int mt6315_regulator_set_mode(struct regulator_d= ev *rdev, int ret, val, curr_mode; u32 modeset_mask; =20 - info =3D container_of(rdev->desc, struct mt6315_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct mt6315_regulator_info, des= c); modeset_mask =3D init->modeset_mask[rdev_get_id(rdev)]; curr_mode =3D mt6315_regulator_get_mode(rdev); switch (mode) { @@ -165,7 +165,7 @@ static int mt6315_get_status(struct regulator_dev *rdev) int ret; u32 regval; =20 - info =3D container_of(rdev->desc, struct mt6315_regulator_info, desc); + info =3D container_of_const(rdev->desc, struct mt6315_regulator_info, des= c); ret =3D regmap_read(rdev->regmap, info->status_reg, ®val); if (ret < 0) { dev_err(&rdev->dev, "Failed to get enable reg: %d\n", ret); --=20 2.48.1 From nobody Mon Dec 1 22:35:42 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 CC5D83126AB for ; Wed, 26 Nov 2025 17:40:24 +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=1764178826; cv=none; b=mclNMX7iInuyVmjf4nx2Rm7G0DscAcEMOgT7F4L6uG9nbYuMJGI1L5GFNWOg4chZYHaX1MlpZ0VyTZLMQ0SsQn2BFXpihS2FMJQGQ3zHqtydDe0Vbj35+PsbiaCjEduTfzcwpBNtsYmZSdIpwciRqwxFfjT3l4oxUBUADYzhh5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178826; c=relaxed/simple; bh=VUNpL3jXdgc3MZUwnQFvZgDT2ptHwcLxGJcoxf3oJiI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ej5ESxJD+RGElj182tAj0VD+j+UHeBE1fi8QYPX0nKSHvE7BwXFIK46rOrkOqnmfju5Vxv8GvyBFDjKRSP0J9k9QcVkl4oLZk30Ya2Mz1qYfBfWJzDyrCYzgnoa2fi64BU7p5ayhzHLk+pqMZs7vdiz55TI2x/R3E4V/0Av4vqM= 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=YqVj+Xxp; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=P0Sk9oEn; 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="YqVj+Xxp"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="P0Sk9oEn" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQ98J4K3666161 for ; Wed, 26 Nov 2025 17:40:24 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= YXi5iMekNPozgcM2KO7yOuNDGNCDpMEgSaAIxNoOMS8=; b=YqVj+Xxp9YY2tixt eenl7IDMEmeVj2aENO6JE6BD5dviSs3iq5LlydV+9qIhor8taBRBI9aq61US8BlS xiwHrwUNjI+AQY90WiDZ7gDZOxRO1zRCpf3ZQY7IsYUBcVCaaJDaLqOGAI/HxNw4 bXxSQvdPrMZwqaJPKLv4Bz/05CF22VxqsRF7O3rkaE/XyarKZrcWO0wqaWiT5Kjx 2Gn8gBGgippfcGAxPiCP38wekbqdxtWUKChyiCvL+2Xdf/O3tJSlf8z0bW+41uM6 sEJIC0veB5XQLmVkD+dBouvwB/AmpWH+2IdVeNYsUS1sDEboIjOlIE3ZX9i3Yfmc fb/Vrg== 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 4anmemu0uk-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:23 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8b2de6600c0so1936867185a.1 for ; Wed, 26 Nov 2025 09:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178823; x=1764783623; 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=YXi5iMekNPozgcM2KO7yOuNDGNCDpMEgSaAIxNoOMS8=; b=P0Sk9oEnp+G1GeJrRqFpqT4+2XSGnCVvQrY0DlkuBmLw1zLGi35rATEMDtLcyI+r3v TnRegfSvDJxvqK2qbSM6rQ23k051wCoqGB2efvJIT7Ca1pJ8xKNGim1w/PjJAcYsCkvH OOlylvYcrqRo7vca81jAOD5pZz2+Prf/BAduQi93OqRqlhU7BAhzKG9kbwrRIJN+dpvq PF+Zh7anVdCdmAcxjIYiK+MXW57nUpD8c19ogkLcDMxDkXjvHBFTz1mrKxQxaflu1uDO bzso318DRzie5Xg5h6azCfmiEA41Wc0V+D6bpC8lKoT4hg27XOzqcth4vPYVwLpUXiPK w94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178823; x=1764783623; 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=YXi5iMekNPozgcM2KO7yOuNDGNCDpMEgSaAIxNoOMS8=; b=tI1l7kkfaA92pTMWXflvzl0vPHdYhRvDGtfXmFg0hdxZh0YgYB4kM7q3LWAoh9dTed 6zW4RZ4BvO9nwsYD8uKtjI8Xd7qgfnT6AFXiIVl6ONZVIBzeDuP+qF913D1Ci0dSEVzm VXKFQsho/WlljzICgZLFRritMiifsaOiOBSwcULwqRvSbsbpMUvUjZnrg4wF855AxpAg G49gUYkNCHHTSPlMNCedZeoawJvelt9dZRv4U0m5wmZBeMJi7zpq+MlbuWXvXy+rzKm1 iXpx761Xdg6brmUVx4JttVH6MnhsSmBzDfyZg+M9GrYLsyeSGYdBwEqQeakQgllQCgOM KV1A== X-Gm-Message-State: AOJu0Yxv20x3w0lPfwGaIk59lM8Y2NCrXzXuL34MLW2hvy6qfj47YDSH QfNGaIbcxJBfZ/vPjU9Ih/oH8dQDHyaB/X565WwFsUdeBpphsZwr1LJZ/wkyc0nzPZWuV2/DBn0 boWAYeKmuqYaU1lbGKWqIiScCQM1YyZkG6iaNKhD/M3lT3rC3WTzl/GM2jXCUPyvI01k= X-Gm-Gg: ASbGnctwaQ+PJCXgKxnXdVwewVm6rGIjSqL8A0eM6DtMzcenaI8NidcRY2v5s7LOJBW VpZmGiR6x9g/PqINC69RzgcDryFPY3NDRUdonU08FWIHQ5BM+GCmu1JPtjU/qdc40sacO1TnpNv LthVIBvmAkfIhA7wQNukvz2BnSfvBfq87RH8UrRx+8NBGkJWXLystZurkSGKEBUkFE+T1BQ8Ki1 ptvMBzcQt6JYuSqmR47TekXbA6L2ZyRmgNlexNSUh0NzVajKPdyVy6kjDI8Jj3fg7Y00rubrRuS Nt9Ux2pg+E6zJh9LKz0iuvh24rh0Cdaf+DMVYHa6fo+tHrXcJGr/Wf6zc/9T2ca6nr0uWQDrXtZ QaM8ZlCFsDxunecUSX9TkY5DSmZRS+V21Nw== X-Received: by 2002:a05:620a:700b:b0:8b2:db27:4262 with SMTP id af79cd13be357-8b33d469984mr2447594985a.74.1764178822812; Wed, 26 Nov 2025 09:40:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFe3tkVK1tsFBQiS4G+6Zjm6S22v96S5ZcYKIvedvhh8WC93a4qg7Aoeuo37ULuK17/ykM07Q== X-Received: by 2002:a05:620a:700b:b0:8b2:db27:4262 with SMTP id af79cd13be357-8b33d469984mr2447590085a.74.1764178822232; Wed, 26 Nov 2025 09:40:22 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:21 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:06 +0100 Subject: [PATCH v2 2/8] regulator: bd71815: 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-2-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=1606; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=VUNpL3jXdgc3MZUwnQFvZgDT2ptHwcLxGJcoxf3oJiI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt7AGT6LRAY8YfTFg7COgV+NHDwYgj6p9TWN VpN1PDcNE6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7ewAKCRDBN2bmhouD 1yreD/wORlUqhLlB45GKp/eaG6b75/1Gp+R/YcNxqWEg2vaslfLtaam7C2VNfj1bijUX30oHGsV cvb5KCyoED+dHbJeunzFQLHUyRKJYQKvNgi/1i19ttMSWbnODpIM+eKNEtjS5h98uq+/g8Ja5o2 ihes407gdCdW5M8NKknn9xPb0j43QQtYq5MpghUXAnmY8l4p+ly2V3dwvHLbbLDzqqMHZz0g8R2 60TZalrhocpwjgjBxNZDaFk/3PWEmgiUmkTBQ4PuV362d0Sq4qU+L87zXCc2PSpCZydbPSVgc4P CkTBsAup4SXI+FQSDzJleQfgwwbM1EBTUkRTlv7ruB9rjksAVpIBU5K4Z/kFd/lg4uuq34MbFqF OwYEZiJZHnGihTn0SgEOgp/EheBr/eGTcVksVvUS1Ko5hh14gFhIUIy16T9wSyoc7XYHKgCr7Tw xgyea8gx9hwFo2A8z3Z/Mw+zJRULbVeILjFQw2Twx36z3MuKWXAEF0JDDDRX8cpWZswQ8rDKLOi u89KNH5rZV/R20O8aDfZIB0Q6gbntWdzlE19d2hvEhRUXnRED36YaYfT70ccbfKrJshM9woCi3u ovO2Tvn/y8dDRXNNTuFizGrvIC6ay4E8Tvd2E/z0VaNerk+CPu/M4bc+devSFo8tWMehxBBF371 7CuJNQBLi/UUsZQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: ZHULHa1ZLB7apimzR32XXlfCPw7XZTRh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX9mETbe+WYAio o+6vFQ6Md4/fzZ8HEJn4gu2H7j8OeIMRdy1d0ab5pqEW1nBv5nv5l5aCP/OcBSKljQh9kqXuDtm QtdwQ0RV/hJfaWgWcgk7G1lEPcjH02eZ+FgC0Uhd7lqGiGZyA2ypMUNfYN0OW+/t4T51Ypb1FVG 0ryiW8j918p3YfEQutekBHymSAufKps7Ep4aHAwE9jSzJIMElAqG09HUQSBWRn2R4QF/PO5DjQ9 vbNKqXefqCga2YrsYqUvElGbjrgSlaulzT+1U9mhscy3IHWsE/My1pO4AXEeTN+H/OVDT0UoAtY kFvNkY5F37R7SnImnrLUwaXmWMKJCd1CnN+jYMBb+RAW431j/RFhWPUuiubrfD+BZVejeui4kKH erDmoLWfWO1EpAOehDz5Izc0iqqBTg== X-Proofpoint-GUID: ZHULHa1ZLB7apimzR32XXlfCPw7XZTRh X-Authority-Analysis: v=2.4 cv=bZBmkePB c=1 sm=1 tr=0 ts=69273b87 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=9MRJ1adic_HRPEocbcUA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 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 impostorscore=0 spamscore=0 clxscore=1015 priorityscore=1501 adultscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 malwarescore=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 Reviewed-by: Matti Vaittinen --- drivers/regulator/bd71815-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71= 815-regulator.c index 79fbb45297f6..8da57a7bb2f1 100644 --- a/drivers/regulator/bd71815-regulator.c +++ b/drivers/regulator/bd71815-regulator.c @@ -173,9 +173,9 @@ static int set_hw_dvs_levels(struct device_node *np, const struct regulator_desc *desc, struct regulator_config *cfg) { - struct bd71815_regulator *data; + const struct bd71815_regulator *data; =20 - data =3D container_of(desc, struct bd71815_regulator, desc); + data =3D container_of_const(desc, struct bd71815_regulator, desc); return rohm_regulator_set_dvs_levels(data->dvs, np, desc, cfg->regmap); } =20 @@ -195,10 +195,10 @@ static int buck12_set_hw_dvs_levels(struct device_nod= e *np, const struct regulator_desc *desc, struct regulator_config *cfg) { - struct bd71815_regulator *data; + const struct bd71815_regulator *data; int ret =3D 0, val; =20 - data =3D container_of(desc, struct bd71815_regulator, desc); + data =3D container_of_const(desc, struct bd71815_regulator, desc); =20 if (of_property_present(np, "rohm,dvs-run-voltage") || of_property_present(np, "rohm,dvs-suspend-voltage") || --=20 2.48.1 From nobody Mon Dec 1 22:35:42 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 ACC0831282F for ; Wed, 26 Nov 2025 17:40:26 +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=1764178828; cv=none; b=R7vtIOKUpZomZkhstyBauvsiKrR9Uf4Nz2MSlsi19llzHOARvZCK39tjm5tG557XPUA021lDK+Dx8faP4xzibqYsQL4tlpS4g5nKiCwq88SJhx7Yp03uCkSGTFhmLVU6NQ7Hr4l/qGE+bwtQQcrEOBP/YLJoTiKZjBuNEfuGFgg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178828; c=relaxed/simple; bh=DUpWNqruSQhmXQP3XRdoDV1aijYo/dZHk2b5HlvKVaY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q6HzZTUfPGQ0AplN2lIoc/T3ibXjWTyIDG+nBI5XJUpZzbAj4XAEDMQutd4fbwytPJJs49Zctr6hAPr1BQTQDXNBWZ9TxU4TkalXC9mef0Rwjml3MJGlojE9AGy7GwuY4Jxm34KUmsEbCeqp07N954ojHErCw2YGvqFJUGG1D8Q= 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=ayZHyRX6; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=a7WEQIgg; 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="ayZHyRX6"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="a7WEQIgg" 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 5AQG16xB1234827 for ; Wed, 26 Nov 2025 17:40:26 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= X1sBMN4aYdnkQShY49zVQ/9mVbxGlJEjkTF4Hi7fNtc=; b=ayZHyRX6tMYKRV2L MG7IZwBvoGRwaxWvEabJ5AGpU46K+fHm5YslQIWa5RbaxFe6QUZvAj64cOOw3Nbd 5OMasmfDeWc1rr6ASY9I7C++uiFMuw+iACWPuWKSOW3YmPM5H0fRis5Xt/9ia2BL BNOnYxs11roBt5SvwjXfT7VACs8Vv46mYV8XFW45Axq3OW7QwvpSCzflm8+fnWDs IgfJoobJb/gQhLbaPXPxWNxXyAfV9GbfuM8tPj/Z4L9z3UDISGT8v8DafOfjIDTe 8dlj4BqvC5XCYEn6HFjcf6xUVoE0Z/FJffPZvkanSzxH+Q+VT4RHBfgKfYfo1kv+ RCwkLQ== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anwd41rxn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:25 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8b19a112b75so1654749585a.1 for ; Wed, 26 Nov 2025 09:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178824; x=1764783624; 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=X1sBMN4aYdnkQShY49zVQ/9mVbxGlJEjkTF4Hi7fNtc=; b=a7WEQIggCSeR5tI2wFyFiYNux2LXPEdheC/h/JJMX4Nx0ci04aHuwuapiWpjodaNHa 1nZc+QogtzFnyHl5IAa7cBd++a0CHilWiQkWhbeciqNt+pcpMH1Z7SBPAXb/qsnVYr0J ZS01lEYZiDCgHUfMY5R5QSewn88Bm+sXnzPUuHHuFO0kWcGYbyc6eI9vaJfgZC5YyXBt 15RlRIeQEt06gDuf2udqk+IJZD+07U4Zi1kN/a1qw278XQYDM2MlMIU4QFvxFZ7QGJFy c3tiDk8BbNzpxMoGK+piueCB+1QuXMK20MsoMEq/XMClePW06NUoy9LEcR5eMoxORemn qkkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178824; x=1764783624; 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=X1sBMN4aYdnkQShY49zVQ/9mVbxGlJEjkTF4Hi7fNtc=; b=Y2GPnGk6/4TSPyJW5l8Y1b29F6qosDzSyieDnGz+/4GaeojDfFZSNCPY7CsgWipkBv CsiLu4HUqMsYgoemAIT5mdXFqVDoNqPxexsMS5HuCAMc9kmvaKz0Yk8qHdfzGwwjm72e je8tGkWjNNoE4TIbt7+RKE0U6FU9lPYJHSTm3RnQcvLe+mjimwXkVmMr4UlX4r6Uo4V9 N9wsKIOTllvE4l+b/PykbOZOyLp/4leceCmm6E2jVfMrfiYGFCF7WNPJxLv+ypRswWqI 5ajSRh/t5ztQtISleV5QbTIhhKFp5ipnKWRf+viZPurcMQyxZruz6ahtT7jNmGsvbdqE FwoA== X-Gm-Message-State: AOJu0YzQnkhfhWSDnqC1O2sodwPYAE+CDA29fbtAQU/BAnpxV2uG1X+f qsKaybh4lrpICZE/Cfv7brt4MoBUKB9R0g0P8HGPeG7MBTqeWnvuuxMQ/kDKEb4lzAgirFpycri fecnSPQYkdbQgm8L6iXLFoo3yIXD8kkG6pg7db/xPWmlXsbJpjtntIZ6Kq4pAlbEeDZ1UdNLyAu E= X-Gm-Gg: ASbGnctL5fhmm8d38x1bDaZbMXv6daypL/sqrC5qo5z1T74pnfoAi89XxZcZWRvG70y UuNLFDpbH8AZKukZ9GjFtJcQb00lG4DCYdv2QdZnjxcq9hh1PWbDTlrtHeE6NPaTVWT0LhabeCX cSykU9Cj/msPTUvs1kFQscZSy3A3bpFWPtFqkhL499sRI+qF5TfCjlFL+/KMyRj7lx6D0/xdpBD 78aGHErwIZywR5gZYenvU87qvrWANBmLO9GSOpyQk80ohF3cQod5/ES+M2CdkaNHV+JkD0fuzwk fgQnknX5VDfMFGiGkTbAM/c4zpLdrIGiZE17tcLp0PwpcpZrC93W0TKtZYadtUn+F4UdgIDAnFE pi9SJkoaRQLHO7bY9/pg9bKh7PRRL/KGI2Q== X-Received: by 2002:a05:620a:40cb:b0:8b2:e7db:253d with SMTP id af79cd13be357-8b33d210524mr2592965885a.38.1764178824448; Wed, 26 Nov 2025 09:40:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7nhci4TP1tVjsETA0tlWunV2qp6pDTsMykO36IvhVB1WF8317r9qgovKqAlWtXjv5oMmPIQ== X-Received: by 2002:a05:620a:40cb:b0:8b2:e7db:253d with SMTP id af79cd13be357-8b33d210524mr2592961085a.38.1764178824000; Wed, 26 Nov 2025 09:40:24 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:23 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:07 +0100 Subject: [PATCH v2 3/8] regulator: bd71828: 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-3-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=1097; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=DUpWNqruSQhmXQP3XRdoDV1aijYo/dZHk2b5HlvKVaY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt8B2DOoorWpIacFqRiKYdaRVgdvJIOyX1+J Z/akURM0yqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7fAAKCRDBN2bmhouD 160KD/4lnr6Qkpo/E3Y0Sgwj2Ollr93XBJuEN1ps3HH9wxcoQQnblBcZSKsFGRx7C1S9/eJ8A2i 13m0RTmbbs0eFI9KMsaVQsvkvXwSoLCj1Gq9nHlrGqFeJN2FA/h134L+cKM+3iuzBG8G7PKoYwz 3kfvYhIufwkCNbAR/yVzOW/K1rXiodaoCP9x81wb/5r4ifZWh0AQWTaB+5HCN7aYmEEpMOUqP6n PWd6U7hyaXNkiAFalQl+2GZzTVXjM8WZoIBRfMyvPNX4DK/ccf4BMmAL6GtBvxLFHkykmvE9YWV WmOPiddYFrVS8bqOZjHJ77yaNKPjgF7EGjqDUBfh5O78iGvB6gTiwddpvIYvFtxxBDdS6E5iB9D muz2wyodr8EfwWYArDy/U65P6DqOuaKjiuwKiiv9gfkKzvxHQO7sCmw/v7v97C1TLMzQ/0xSFef 68rPX3sHmknklQ7lGJW2obGQK3IQSBZ+GCBNcX2iC+3UOlJXrUxQqEuKd9vGAC/qbTeBwXH4ecm 3Bz+FxIqthvmhCBN71jhDdFKspfOHCYhZqiH5FIKPWn7XrsRaRNA3np8IpAHFaDDtP8n3d6NwLs XQJhF5LotKfRzuMhFVTWaFUMh4t2iGJuGo60n8Q8hVc2ilpTp8/OzvLEd1hEDbu+ho2PUy6mYYq 6QhNbv9iLln2yOA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: jkowFFWJ-J5_nNJpdSk-1mE7uXN6tDT8 X-Authority-Analysis: v=2.4 cv=feqgCkQF c=1 sm=1 tr=0 ts=69273b89 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=Iax6wTeSMpqzYiZSKl48GQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=9MRJ1adic_HRPEocbcUA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: jkowFFWJ-J5_nNJpdSk-1mE7uXN6tDT8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX3e1vQw4hFwkE e0Hnbab6NMGFEb1dJS0rX+Wznkcg8hzzhNL+fxjLK4PbGI5sP7AEVZ4f3uspvoidHfCE9EbfuAc 8fmG/m3nfCUUh9dm7icwqIsmpSUmZc6UiZNFUSppiwlWvgCfOykWjGVzfdKuBr+kC0iBRDH+aMQ HvCO/kI5R4GODWSVad9pfuHNM+82wnXlvfbPK/y0itWGZ2aKb7vQE/2/BU8S3c6VjpeV7mejKxc kXv0tQt8Hsuq93a/NTApcSSeZXZXqWNyni3RcDyKZCHNJEPca/DdL9OnxhKZODNH6wl1CnjLW5L uz44tHaCmqMHJahfdLNXQRyWJ1Y6O+PGIFE6zuHu0uYX+1XuQ3RLn6LUGsl4TWdvFfG6/WmpXVG ICpkOzoQTCZtWWIZ6fByw3KhvffSBw== 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 Reviewed-by: Matti Vaittinen --- drivers/regulator/bd71828-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/bd71828-regulator.c b/drivers/regulator/bd71= 828-regulator.c index dd871ffe979c..87de87793fa1 100644 --- a/drivers/regulator/bd71828-regulator.c +++ b/drivers/regulator/bd71828-regulator.c @@ -95,9 +95,9 @@ static int buck_set_hw_dvs_levels(struct device_node *np, const struct regulator_desc *desc, struct regulator_config *cfg) { - struct bd71828_regulator_data *data; + const struct bd71828_regulator_data *data; =20 - data =3D container_of(desc, struct bd71828_regulator_data, desc); + data =3D container_of_const(desc, struct bd71828_regulator_data, desc); =20 return rohm_regulator_set_dvs_levels(&data->dvs, np, desc, cfg->regmap); } --=20 2.48.1 From nobody Mon Dec 1 22:35:42 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 AEA0E3128D2 for ; Wed, 26 Nov 2025 17:40:27 +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=1764178829; cv=none; b=H/x2fON3AbNuH/caVsBfUPuuWz7mSmsUIgn3SLUwBLdwYrfk/MpH+shDMnCtzwY2ue0xYELgLp9XamG5xAhLlLZJr94ywXIaOtVN3PsR3EVYHuR151buAvVrFtBG7yOKmbaOlmGtBqbh0MZTX5cYeeAUI44AvwuKY1K6xyHpz4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178829; c=relaxed/simple; bh=hS8RVWi3XaF10PpDUVAlrbmypT/xVq1XUUFF7etuthE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SAsIdL5agQtTDeAbB4oyVtFIv8KJxQtGcCH7FFZMfesN4Rpp+J/YZ1hAPNDELIwVX8CV6CsC4N+X3ZZbWM+gZ2OmRfbnxReLeDKya8TpeSLldDrIV0UmEidDGAsYQIEhhuo80qEWwDoywFeuu7keCp60FEoDVClQycNYDkg7Ha8= 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=Ee8TkNAe; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Aeaxdnyd; 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="Ee8TkNAe"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Aeaxdnyd" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQAslHp1700325 for ; Wed, 26 Nov 2025 17:40:27 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= eikYGZPX6lrV1IJPXaurHo/qZqzuHDqLnrPvPuI5kdM=; b=Ee8TkNAeaCYxJvR7 lYj1pXGUbOv1ZioxdpU4PbsiUvJKz6+krctW4P9wtMVAaXktpi12jqYfhfAqpaRn 3aO+9nS1uAS2jbej8HMZ2z03oc3ux04JYY17n2PJM0rxXpobRbe1JlQezjc1qbGr SNS95Zmk/sFlw94g/jNOcsfiodqdCNXvoq77llIjDhTGjN95MGIeno1Q/LK8+emq 8NIb/V9LFDMoGHxREC+x5Y6EqPnoPVu+SZGutRkA88nyNURY9L2alyO9UZO9i5Fs rtU0aZbSyTEFvx/gByqCNh3PjNPnaOOCl6h/H0b+RY5IwvaqHvmCCGHrCmWKtOOV ySUDiA== 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 4ap07a13tm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:26 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8b22d590227so824116485a.1 for ; Wed, 26 Nov 2025 09:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178826; x=1764783626; 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=eikYGZPX6lrV1IJPXaurHo/qZqzuHDqLnrPvPuI5kdM=; b=AeaxdnydHVanJi6bJBsr2MO7sKRWFpnEUzXOG6g3xS6ZhschFgLfOx6etE86PrdpHy Tmf/mrOuarpbxxCPQWMau+0zny5e36Pup1WDt7gzBHu6vaPvXXGDIq/XXzQ7ej8q6QlO h8d93ROFvq3bhSEsapcyBwL2WnoPo13HV+70oh0lbWbp7tnBw3JGs5YVVWRI20bBfx0g h/3YR3oSjSAdaZFn5SyqCBY5Tf3WcaLymTr1Ryl1rjYhqCEpJN+D0iGPiL5BOVYGDBWy 5IgiaZcRSYdnU/PwAfMJC97/3SjrZkD7DTcKpFto/wu+t+Xq3JeAB4cIUJqxw9Mf3hM9 0c+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178826; x=1764783626; 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=eikYGZPX6lrV1IJPXaurHo/qZqzuHDqLnrPvPuI5kdM=; b=AFMiD+8O5t0pmn2X+GnXLkDFHtKVwvkdbvBvzvh4PxMj6cKRUPwtJHy7wmjINO518Q fmaPZofCfLzRogCxEJ2kIxP9lHYiQZcqVUqrgsvji+DFsaIARgh9RXzfvq+bPWc+ZbFC aRarHutwiKVDVJh7osA6GpjJ323CE+y6EfMkcxCyhSFTSPRYkAsSARJ7VIOwvq70n2iB Lco6SK58fsuR1SnxWVjfXZUKD0oUg4p2veIwwiQUpQI1A2QtlT3qp6J6S9D65GgonoMG 8JPGifkcTs207qwBe46AD4qyRDhfXAqnv661ekmbYiLKbDcPSE8Jm3Bg6rqcNm80+pjv xkCg== X-Gm-Message-State: AOJu0YwmrgkDl48ux4Q8/YmUeNg5aEwVAdexXKkgVfHw5Wn6geDL7WQU Ux08lpnH+vg46lTFHlactLJp1bK0CjF9cb3behvjmKpGpD4KQE8SjmtQbof4vIQ7JvJSudKDt7z oWb7WEkAY5FWavwAtISo+G3dxqW6ZU7fulsfpvf9ua08fYzb8WoteElAaMz2Q7my9yFc= X-Gm-Gg: ASbGncuoLeSoyEiykWYntDSHpSq0rryC2hVEPiA5fG3miWNIkNlESsTAVveqBbBQn7x 7kgsrA2+kUJVoCWprFAPWJlzDOHEVV4U2+NTT3Kqo5a1crqF8BKcqCaifx5mkYzZm6SdcvrIXzm JM5vaCzS+BIRuebIAiB7AXCnVxhHLhNn5Af6ANsLqguyXdZpg+tnuJzm1fGUe8hjtYC5xOwo27O V/QRlpeaGdgrrgGH5I1L99Wn7YMNfB5rl+7416nHD4KN/rRjaIQyf4CMIIX7qo5PDdfvEuFwtoA bgd/3VNwVQlZcwgbidReZetQ7EiuoFBlWdYZpC9FayvTt7Un7Dnz3V5fPHZ0552XrDqvp12yQH7 PCuTM3LttECgzYi3mvkPM8hodZ9+4O23ecQ== X-Received: by 2002:a05:620a:4450:b0:89b:9b75:f5f1 with SMTP id af79cd13be357-8b4ebd9eb92mr1051554885a.53.1764178825899; Wed, 26 Nov 2025 09:40:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFk+WYbCB4UAQQbssL44Zoba/uliDJA/IjRYxhjiFF7e5XtfCI4o6pCvBemDjZ7Yr844NNDxQ== X-Received: by 2002:a05:620a:4450:b0:89b:9b75:f5f1 with SMTP id af79cd13be357-8b4ebd9eb92mr1051550185a.53.1764178825481; Wed, 26 Nov 2025 09:40:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:24 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:08 +0100 Subject: [PATCH v2 4/8] regulator: bd718x7: 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-4-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=1101; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=hS8RVWi3XaF10PpDUVAlrbmypT/xVq1XUUFF7etuthE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt9jg7POV/+E97cdcSXikJ0TTO5DEGd+g0Bp kPawpTUcCGJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7fQAKCRDBN2bmhouD 14ZND/43VbjQfFZ8ZQa5GgSj68cGizpnP3Lulpkl8vN/CoSgNdpLLuGGfkeOs06X70hijpxaoZe MVvrUQWpEq1kaGB1T6YYGUzWYp6FNYlBmZ+QhvikUVe5tSOxCgPNmtoSmAj+zd5g+v26Rn8gwFL eZlAaHb68jYse5ydpQoxMJHJE0321ctWbOm74TnUssgF/IDvZ1jOZ4x0dqROWnNQCPW+O3eLsM8 aU+pxN+P7yezxa8ZSs3qrPQz/hizAoumN+aUGcG9XpzXXyKqf0xBRIsoA4R819t0QQ4J1TgLSPU 8McgGQaxI3GUziCm4iHNVSb20BjsrBzKKhA+Tzw5Y8A2DqWvqvNWN0Wstshiw5ou9buzttotAy6 UKIjtlGg2ykA1Loi5KvyWbCuwtDRn/xgKrLwa0ug+R5vJ1xzvGQLhV7QxxjC/IrtSXSbaHsyFhl YaenI2PGY2McssB625qOsSAcBvaeSwVDRoadka76VqWWwFu07JcyPx46cma3Ge7oHuHWZkd/hv2 TulOrFyUwbXqB0/cqCuDyMqfs6z2sqVN6Ei2ElwBAxH758K6NImijE8nh+yHfUCP6zhYF46OwE2 T2drQ6+mL0of8qUkQXJ7cQfXPEW4ooIL4iXCXmS28dcJ2SZ0HQXC391KYo3g2a55OKm/7/okviI nKAGPltNQY3T/mw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=ZZEQ98VA c=1 sm=1 tr=0 ts=69273b8a 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=9MRJ1adic_HRPEocbcUA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: Y1b6Q9VvJpL0oykuBlTwGk96jVb6RTmG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX9Sx4K4TCzM6p YvsNW3zcCxhR4xtDozPqVb2jH72cZb+s+eCxPpvC2jQ85LvX8SysCNEfI0HiwoL02TKBvrYbhcV i3usUlxuThJ+8KDquJjAvwXwxFXL/t2DXSiHO5XH9KclxWXU2yxwPYsS7u768ohva6IEg8HcWXp sQo44Ps4xgyH5cdaqNmDGC4YX2I8s7Gg29vuaAwHSbC9INQOsS6/3InkXVo8dUEUu+NSIkIXytb L98UEy2L/xPgrCzcMNJ6t8B/gOHP913ZfNmIexqKxdcNG/2ocZ8gJ0+C5Wd8gfLaj1ZoRrUKqTc 69E0FN/wyBVN8fHYC0K5nnLNQs29ZlnFnBYQ6NBCE+K2+ih8YNdnzZMFZ9G3/kRh5ceTjBu7e9L f0rI3a/WU6b9/2c6EX1QPSX1D7u/5g== X-Proofpoint-GUID: Y1b6Q9VvJpL0oykuBlTwGk96jVb6RTmG 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 malwarescore=0 impostorscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 adultscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=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 Reviewed-by: Matti Vaittinen --- drivers/regulator/bd718x7-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd71= 8x7-regulator.c index ea9c4058ee6a..1b5997c8482e 100644 --- a/drivers/regulator/bd718x7-regulator.c +++ b/drivers/regulator/bd718x7-regulator.c @@ -698,9 +698,9 @@ static int buck_set_hw_dvs_levels(struct device_node *n= p, const struct regulator_desc *desc, struct regulator_config *cfg) { - struct bd718xx_regulator_data *data; + const struct bd718xx_regulator_data *data; =20 - data =3D container_of(desc, struct bd718xx_regulator_data, desc); + data =3D container_of_const(desc, struct bd718xx_regulator_data, desc); =20 return rohm_regulator_set_dvs_levels(&data->dvs, np, desc, cfg->regmap); } --=20 2.48.1 From nobody Mon Dec 1 22:35:42 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 50E7A33FE09 for ; Wed, 26 Nov 2025 17:40:29 +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=1764178831; cv=none; b=q1dY6i03KLyv0cTfnqVtTfgfE7uyb4KKEhq5PeIp7Lt61AFMzOhlxDNytriyZwe5q35dhd7+GKiMUly5NI+kEOKLqoD8CQtPIWofVR/67mc7OxmLQTdeYpOKP+kNWvpWtdEVhuEbauIF3N3Xc0AwUVABpuUF0pbIuGSBkofmv6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178831; c=relaxed/simple; bh=pvkowGB42YgFOHad3W/lZDavbKmrMX9dgCpdtLR0vaY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NUM844UGTq1SPz95mjQMOOorqpfxCGoatLdmn7O4fXXTaDEF64Xem5K2zx5MJ+yIkVfhtjz3z1AplDaAib2cvCVef3y0UI0jq2U4msaQzHv2+7jO6YbMoBnokjLqlxFiBr+n4xkwChPFpuaqBS1cptnO2n/xDE9Ont+JhNSy2A0= 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=IXkbEk+Y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Lhfqy9J6; 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="IXkbEk+Y"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Lhfqy9J6" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQB42jU1668527 for ; Wed, 26 Nov 2025 17:40:28 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= vCpXbzbZhOct4JHJAIu7jvMANlG6baOBU0kaSDKLRkY=; b=IXkbEk+YGREtz/1U 32bBxazLAEtjNXTZ4ZgbuvnCuIbD68OathytH6ciVnxPiaMDydKBquwUkSCyxu3t 4mlWFrdryxYfgu37f7UtaY2OcQGySdzVHLWkBuaVRHOABiHbzKee8+RsgBZQh0sI uGTeCqSxV8hkI7yuCZOS8gpNNZmkgg7T17M8wQfyDLhLk2LYFw80cFizrZurJKNy gdCV2ak95JlDmWa8Zz1+KSfURicFkDBqZz9ovZzJ8NyFzbF16Z+lbZWecoorMjIz lWsFA4a9EEaDAyKY7Vhvwq1J5KkPdNQTO2qocc/V5XiQvZMCmT43kBoq+fWO3QwX 3RNe0Q== 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 4ap0bms3hb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:28 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8b2e2342803so1773273885a.3 for ; Wed, 26 Nov 2025 09:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178827; x=1764783627; 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=vCpXbzbZhOct4JHJAIu7jvMANlG6baOBU0kaSDKLRkY=; b=Lhfqy9J6THFRdbcN2db243xxcTfFKuzVhqybGfiw9GTOl2EwFNiMDHDY+JMpObvjfF iz+IOFsodepMQGuQJ3Q95bvD2bDgqOIyrVM/OzcJtBpkJaHDFlUiUMNekKfpjsHbt3rX LzvY9k3x1WtI2wb+CYWiie8cplYg664lkGC8dfzyvVnIp4ffq7KSicNWET6BvZPZiGwD opaj8Bp/xVXuwM2ma1FugnJRJLzKs9jOx59aDw0xStz0eb8Et+XydV3GLoCN+Re4nEvk jfalomAALsTogPJIhOdvxCOYblM/FqINRo1+J8KqDslLE2ujXfhrDn3aC/M36lWHxBGI Q5lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178827; x=1764783627; 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=vCpXbzbZhOct4JHJAIu7jvMANlG6baOBU0kaSDKLRkY=; b=a6JxULri5of6JdGQT4O0EoSCCR+bH3uncX8lyZe0ViV1Ncx+kiklyl1M2dsEsAj0Lp be8fK2rYLBXIGZOhk8KqTNeWwKPiXHEzQ6WI0tPa4uhd7N4U3vLIaePk1fVg+2eVQPPu IBISfJnVcT/W2fUF84a5CtwejbZL04HcQyQlhHwUpcpAe/X1QHNrA9UcxhV2Ft7VaDNd QyMbmH+d23PIfkTbML+PJszxsHeOcE8LjPyKq4Y93Pctl1Z8DbYfdctU/sZslwTwNnAd zHNqHH/rbk4T/RDEZdErXMmAcKBwGzrJ5ZTI1tYoPVH4vqGtcnz/8HTuoad8AQr6wzKp 78xQ== X-Gm-Message-State: AOJu0Ywok/4cIQXzjqnktbLDhv2s98te1Vh77nQ3BVFmhQ3nfjsYylJi fSP7DcHv6laL36sQmK+rSU969FlQA91bRp0DqvjzS5I/m1UXhLS8KOWsVXIQbsmgm1B8TQt/QrW fCe1ZvY/4Cy4GDedE1QpEoyWhqqnxDfR58b+UUew6rlGZw1QizI99kP7CZCnUXkvePiw= X-Gm-Gg: ASbGnctz6FMpQy2ep/fdx53/UttnNLDdf0yxIQgEo06LXOTOSlyGr2SYxBo9n2vsVV0 STFLHQUNX8t4bjwjFhTczEdk85BHEXsXMiCnQVhvXbTTad9mqZl0fd9z/5y8dtWwy2xiF4nPzqE xpqs+utQTKm0ZMcbJ3kk6L2ISmKxSncQECKuExqZcJRsDgMHUL/dt6Q8431jatp7qhdjZbl/LK/ Ag1PE5TTqmsQd2In6OpDqKKVKoHGU/GSzK7giK8S9XKFl92F3ALT814WOve9E+gq79sRXOUK31y FS5NTw5FhiOLIfVgPzSXJEJL93HSfpdeuef1P5OsddfXdcQGVXX/YFmEFCCHpumF3coWANE5uXY unVCGck5enK0meNWb76zCD9yJxdJ1wzwx0Q== X-Received: by 2002:a05:620a:4496:b0:8b2:dabe:de42 with SMTP id af79cd13be357-8b4ebdb0549mr1021001885a.46.1764178827500; Wed, 26 Nov 2025 09:40:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZUDWs7JiLSSF7ArWfRHkaAuwTyK+QSHjFarP5skIIj4AqiWmo9YleaDZxRWKvb5+rueimyQ== X-Received: by 2002:a05:620a:4496:b0:8b2:dabe:de42 with SMTP id af79cd13be357-8b4ebdb0549mr1020997085a.46.1764178827001; Wed, 26 Nov 2025 09:40:27 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:26 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:09 +0100 Subject: [PATCH v2 5/8] regulator: bd96801: 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-5-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=1703; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=pvkowGB42YgFOHad3W/lZDavbKmrMX9dgCpdtLR0vaY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt+qhcdHZT1bVlP+KvVAUFrdcV1FOsogvx2/ PQmEEsCxTWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7fgAKCRDBN2bmhouD 19XsD/9iNsNCUzdvVYQCqdrlXFz46c3uzDS/W95FVBCYak9EvFYa8wvG/SyoqmfyzqJ3hZ30pLK Nqxuz7x4oAaguorR9koog8fcSQdtLEvhbLV54bx2qy70JlZqK+Pl2GR6iXhe4/JS2BLIIkZQEy5 iKVWsQJ+PjirJRXjfWw8OpLXiCqWS9kYT9Zus7Z3XWn4TMoOeMJtboSBCIX6ZBFhomKz0mE2HEn pDOdv645GxGl9y1BNlza5oviDZJyIrHoqxBhv77iufU5u/SScJmJiv9BpkXcHZ5hxPFPvRUkU0w NSjzVvQjh5H5jz4xa5CjjzuddZ3ExOjI6r392yeVz3KNLwQ6tGJAGvmGTPb3T/XvEOlbhMSbWHx LsNuAnaiw6FbEMXaYwzHgUbMaRId1U7hufR+rJIE2KZfPMQiHrTQzarB3Tiu9OdGByRgHtlSudz FnLBZsVHjTlFbfIfPQLqGVOERHP7N3k2wn1PzKRrsp5nrl7yJVFUWfTrQiVgF4XL9M0CktAj3xN PCWl/QBXd0b7YvKOIMHu9jXLii+TBPB80HqOJUaeHx25qA8J3QaT/K7e8zMjiOeh44OwyMNGixS 91o+Bzq4oluoS225GxO8nUBr99gpFCf3Iyqo1mqzzfyCUC0Km2vYvLbw9ZgN7+3O9Bgf+sBeffs UGbhlyD8nWsiPFg== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=AKyLkLWT c=1 sm=1 tr=0 ts=69273b8c 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=9MRJ1adic_HRPEocbcUA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfXzWtYRoXFVGtZ DH9CZFVFZJjXdtrp1y0lewZtAnwffyaR5kbjf9o0QYLGqriY7drCJimtXRNW3odXUkyBLqS7L3K 04jLIFAJbnzN/UKTLu/VhxTIduvleMvPA0K6cLKFXKl5kx6CVXfd+MpCp8auxE3rrINdinQU7B5 ZdhGNasMlVyXAo9l2hgtF3bi+oepWIE0oCOw0PPBHotucHwRlKea6wNF3rgDSc62D1wd9Cu2NC6 os3O2NZOPc47CGUtM6bwGW/vA+00bzmqiAX30v4QAG06Xyt5nH82yE9dQRInqPMtcOpY4QK8Q/v s+3coXRioTr52MhFVBMzNyhsddB6PYodv8vibuqISPv4FPvW1ro+ZOvO3821BW2s1EIG/IGnXFY tntwk5jZSw42rEhW2iUW1Xg7LiWbKQ== X-Proofpoint-GUID: KULkQqPqkY_Fopo0Jw1Sq95kUaRzh7QY X-Proofpoint-ORIG-GUID: KULkQqPqkY_Fopo0Jw1Sq95kUaRzh7QY 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 phishscore=0 bulkscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 adultscore=0 malwarescore=0 impostorscore=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 Reviewed-by: Matti Vaittinen --- drivers/regulator/bd96801-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/bd96801-regulator.c b/drivers/regulator/bd96= 801-regulator.c index 24d21172298b..129b20c33bad 100644 --- a/drivers/regulator/bd96801-regulator.c +++ b/drivers/regulator/bd96801-regulator.c @@ -337,12 +337,12 @@ static int ldo_map_notif(int irq, struct regulator_ir= q_data *rid, int i; =20 for (i =3D 0; i < rid->num_states; i++) { - struct bd96801_regulator_data *rdata; + const struct bd96801_regulator_data *rdata; struct regulator_dev *rdev; =20 rdev =3D rid->states[i].rdev; - rdata =3D container_of(rdev->desc, struct bd96801_regulator_data, - desc); + rdata =3D container_of_const(rdev->desc, struct bd96801_regulator_data, + desc); rid->states[i].notifs =3D regulator_err2notif(rdata->ldo_errs); rid->states[i].errors =3D rdata->ldo_errs; *dev_mask |=3D BIT(i); @@ -354,9 +354,9 @@ static int bd96801_list_voltage_lr(struct regulator_dev= *rdev, unsigned int selector) { int voltage; - struct bd96801_regulator_data *data; + const struct bd96801_regulator_data *data; =20 - data =3D container_of(rdev->desc, struct bd96801_regulator_data, desc); + data =3D container_of_const(rdev->desc, struct bd96801_regulator_data, de= sc); =20 /* * The BD096801 has voltage setting in two registers. One giving the --=20 2.48.1 From nobody Mon Dec 1 22:35:42 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 0F98C34029C for ; Wed, 26 Nov 2025 17:40:30 +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=1764178832; cv=none; b=hRnKzWk2t4mwA9eGLRv+wni3MZuWLpOKK0NzT+4xI36hatcnHtbRIxMU8yRXOTkLT0d0bSHygWc8/1zUmlAN1lccS0b3+WgTPSrwphYDJZZyFFX7/3gpmZ0t2F5V25URgfUuAlbisKzyMWT7tvhR372hpfEqqktQmBIuhJM+O/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178832; c=relaxed/simple; bh=F6pa/hBnZb7Gkzh+tLhiX1+7lOKGS/rRVschNyVww/Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MfuY9NGfqpxf4r7LVL+pqUxLqFnlYombDi4xFWBiyXvvnNFFKjCejEWI2mIFM8CHMOiojHeh3Qood3RmcWRKghmE8Kto2eCT5WsDA9CSzvBzOlUvmm5nnLZwU4k2/TD9MeKK7aJUycBAwOv/gRlBWYsoh11sB7v+hU8WGClc134= 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=Cj8kss0c; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=W8d+dgQG; 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="Cj8kss0c"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="W8d+dgQG" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQHbFtu4048893 for ; Wed, 26 Nov 2025 17:40:30 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= yuBdo4Df7AcVAGzqPD11S2PZNb+g82HKKFiS0s50Rho=; b=Cj8kss0czCvnTOtK Oijfre79MZ9wzUFjAdOBAzakqYgkLLwcaGA3Ep2OJL+tKIMH34zsRzpjosJgvcvY TwTN5BTLT6jwCyBVwS3esUlBJ150Xa5cHMnHlQ86QobLdE+UdwdPd+dXuh/RcIMK owSWi+pm6vT99vArbQoe/fFzd6+Qi5tY5w9CoPm6TpR6MBjt2JlFnH0iQ8PiDRg8 RxEvos7ozO//9HvBlGk09Bb/4bVB2czq9GEsep/zmkaUZItAXhn2sjnOEhX99dlC CVArODyt50cMve0X4h4EYOS0R1mMOtnjl5om6uUcMtWzHFp9wQ+d3DWx9YFlkgKI KEvu8w== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anp2njueg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:30 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8b22d590227so824124085a.1 for ; Wed, 26 Nov 2025 09:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178829; x=1764783629; 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=yuBdo4Df7AcVAGzqPD11S2PZNb+g82HKKFiS0s50Rho=; b=W8d+dgQGq17vuMi82Zos90qGUHUWGvoGoK352fdk24AY8yTUbprZ84TKZdCWet40f+ +7QfjxHQS/6iAR8KBZFoipYmUZd/ubOOqoGXT1rX945wm8H9uffycZT+INd2G98gcNCC wQHL6srNFX85HyuLh6OBIMwN3X1LWv5Wc2FrPEWdcjjWk+++dPWCmnelJ1vkcDl27MWv l8VTSZ6wIss8sfubabV6w8RRaR6XvyXyLjyX7nPJNtnfdfDchurTqJTXlNG60XJMXId/ tXvxhjZHYsL9sAQhIFAhaWDJWgoLgib97myZrenIgx+jKbUPKM+7ZCWcu3A2Fu8+BgZ4 nuuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178829; x=1764783629; 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=yuBdo4Df7AcVAGzqPD11S2PZNb+g82HKKFiS0s50Rho=; b=g9LrTESsWiBoVPRZBpovvemw1Gu3Mu+SVdhGFebiYudhD6UCrTnSEDRWgVivGlzayh l+yvdGHI937C2RFALN+vIMsKHAhMFDNCBi92JP98wQwBZY7C4KpT+w/WRI2+HmdWVvTE Lau84Wo77LgKc4WGpI7FK40gbPRrvXWY3kYreuQmy8Z81GI2I8CbwE4HQhi5q0ulaHSP nBOsyp+ZufCRVRl8qH8iwTPtg7we3V/QcPVb56JoLIdhsYw3+hlZ7M8TLRW9B2rF/Wcs 0Hhz7vB5YO9PprV+jEfx3sl2EdTE9SpkQVnFjC2qSDeJtD6dKjBxOcMG+ygcHR6kWkTM Qw+A== X-Gm-Message-State: AOJu0YziMPLRb1W07bWumQim/nVJeJKZdQO/3JEvFHcULvf4wpwVTsRX gnRnzT78ohjHDGUOUgHmwA7CACFKEX06JfL0yd5WUSV317GglTqav4rgJ9eTfyTJJZ+IvMg442I RcmbL2UJmPMBDNPOClw7DtagVc2tJGLSGW6QR9cXQqwuBDMMvRSA0fxIrv5yuJMFbO90= X-Gm-Gg: ASbGncuk7C8W5gzV5cy1vZTPLphgfjkMV1nuU41Nm5bGz8GP38CYZPNMEe1xJOOYDzK NBcYCYA2lYAsRWYCnxMbC+lJC9+iKlpbfEzhlskZCfLKp+GsZp2ZSjELKtJ44GDEoFsC1O0M5tH LsjHyBW7gUOehRpL/QZT/g5hRkotplaXqMjyB5ECgv8CJD1ldLIYImrdZJYxXZ9rLSAr2WcOuip 730DZPWPNN5ZyTvsY73BSiNMh40JCTAjHq+F4bLKpT5hHBM0Xc6r5ebYip3GKxKM7UOfvyIq+Xi cULB55N5FGik1FUSjq6xjWwgT422fAwZy9dEIhSrVqmSNoT5anbqGG2xVPDOmwiWrGYekshv1/c qjEbOlbL98GXVzNpKMJsib5k4iXDU9Vgndw== X-Received: by 2002:a05:620a:4085:b0:85d:aabb:47d4 with SMTP id af79cd13be357-8b4ebc438d4mr964587385a.6.1764178829131; Wed, 26 Nov 2025 09:40:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IG417jnmNWXAWdIRUdmzeTUa3tigqlN4NwGpHVGLuGH+RAKsdxFm+oamJUZ2Qjvp//ID20XHA== X-Received: by 2002:a05:620a:4085:b0:85d:aabb:47d4 with SMTP id af79cd13be357-8b4ebc438d4mr964582085a.6.1764178828589; Wed, 26 Nov 2025 09:40:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:27 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:10 +0100 Subject: [PATCH v2 6/8] regulator: mt6358: 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-6-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=984; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=F6pa/hBnZb7Gkzh+tLhiX1+7lOKGS/rRVschNyVww/Y=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzt/In1RckvHlGVJEYfhwVdbZbbsAIGgtydc7 BD2Swj1fa+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7fwAKCRDBN2bmhouD 13fND/9pvcnMehA/jPpNTRYcpmfk9vKCGiew9Tj1EjZh1iFgSuHQz61oCY/3cku2nvA2KygTSJv dks9xOd4kSRomwUJ5Lw4b38aWjDVl3L4a1JC2STgffMgUcShdezfwua8SbYDDUqUTCcUdrnrTMS VqvDN/aX77y2U/nWvtMSMou11DGAAk9uOf9x/hOLPwCZHhNopxHNyFkABCqs1IiYGO/XKZOIHTt zko4CGv2e4ltSHtYwT3c4kA+ECtC7DBdAmxb2bJXlc1cONLCeNOs6855LpVXbholJBzmyexR5JI Pt+PoyIA94CptVwY5Et65kkiY+VS9E+45Fs/Wwlq40H+QvIXtg0zJ1bNL1UUyqDdQu7TyAwGMB0 cW4JA3si3sz/Mv7uqb9ui+sm2q7SoEAo76rTGvEmBYrsb5UY8MqPD6er0AtiPKcrd6xZd3rWnLg 23ecm6uDkbSrKyFZKr2Hgcq4LRRSism/TqnCKSGgFrfL2OwW5GsUVVijevacMry9emhgIyqrzZB WlCqZXeNI/IGl5j/d8veBNhmttzzrmBlijszFSN5Epw+mdViihypemE+JhC8sYqEMimZ2magKSo AJOfEY9Rro4TjyIineaslcIxixvSna5hlvu/mfWZJtQ/jEgGV6MzV5N+MVN6duxg+neqtONjzER eGV0zqMMcxVGXaQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=KerfcAYD c=1 sm=1 tr=0 ts=69273b8e cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=Iax6wTeSMpqzYiZSKl48GQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=FqRRrX31zAmjg7hXLkcA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: BbFKThB2oYfBp_cl1Dy8QhpyKkjhXAg2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX4wRVuXJMakb2 0Qa7mv5pq6SaEsGM5IvTv2mH2c+oSRIb8c1dDPmrOAvaQWq8v4DoHxr6FCyHrY4oosznySimQRU dljyIMrBQCWqILRsu8zT7STemg00DO5EsPoK6G/kB1VxlKj+72gQBTgsrlRWNa9Qmaiqjhtqwdm AWHF3TqCGLimOPG0xNgMbXfYVXX+zQkTp0W3tkbXJhNZD/a/3cvR7/UVv6fQKy+qyafDbU77dWP /6G8Iir6MtmmGR4+cW6WI9JEJYFlhxWOQJRwxC7sF0J7GuSk6uZnswqMfAHZf30sXAfVE39UYFm w0KOZo0mHE2Ayaip8/RCKoAhV7aht8MNl5/CQg9DD72ZrGdW9LeYeO5+dI7Nn9+acxEeGpO9+kV ReDULl7/Bpt/sRA5mPFD9e8IhGGG6Q== X-Proofpoint-ORIG-GUID: BbFKThB2oYfBp_cl1Dy8QhpyKkjhXAg2 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 malwarescore=0 impostorscore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 adultscore=0 clxscore=1015 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 Reviewed-by: Matti Vaittinen --- drivers/regulator/mt6358-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt635= 8-regulator.c index e4745f616cea..2604f674be49 100644 --- a/drivers/regulator/mt6358-regulator.c +++ b/drivers/regulator/mt6358-regulator.c @@ -31,7 +31,7 @@ struct mt6358_regulator_info { u32 modeset_mask; }; =20 -#define to_regulator_info(x) container_of((x), struct mt6358_regulator_inf= o, desc) +#define to_regulator_info(x) container_of_const((x), struct mt6358_regulat= or_info, desc) =20 #define MT6358_BUCK(match, vreg, supply, min, max, step, \ vosel_mask, _da_vsel_reg, _da_vsel_mask, \ --=20 2.48.1 From nobody Mon Dec 1 22:35:42 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 Reviewed-by: Matti Vaittinen --- 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 From nobody Mon Dec 1 22:35:42 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 A476E341066 for ; Wed, 26 Nov 2025 17:40:33 +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=1764178835; cv=none; b=LGj+xAmc9wAbhxxJk3W8heoywQvxjMTNFgw4CYzeO1dOme4Hvf2ZtwNbZdzv7Z5bR7Av/xHiQ7IzwBKYRD33h9h7CFOiHKrh/B2AlpT9axhCb8dqaOvpEqhJeVCaqa+Fc3wDcpC1gB5jZfJSCSejq1eFT3l3KsoVCAklkXsY0HI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764178835; c=relaxed/simple; bh=hmZwf+gqSZxGRRmKDKGj7wIJ5dnf5CYeGgO2dqTIhtc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BV3eYd2sI19+apno4sZOZYWTEEKmaKjhsYWJ22q5jabcPxar3r6pzpCUjg4xmcX+4rtBLNxq5E7wlWs80HS/ymIN3iGYf2AF5b2uDmwvB9uNeykJrtoIVaaqeIUHrNJh/8LgAVvIX/vQqrwDE+fEq45LM3hYjWBXONa2X+kqhh8= 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=E+BqSqmb; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=c8bwsowL; 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="E+BqSqmb"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="c8bwsowL" 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 5AQG2h1d1234822 for ; Wed, 26 Nov 2025 17:40:33 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= +CNzxCmRqCkzPCZPo7wdwLbBBFP1ERFX65HRTQOL9Xw=; b=E+BqSqmbiaNAb7vw 8UW6PwH67Z2RGFducWxuBNS8YDwBtvrqrchDotx7GR06oGLdfLhpM/c6AvzBBTsc XcA75/GmWOL6oR8/Bng/iHomcrsNI8ZCyrj4HciJ2MxKFIpxS/2Kn96oKZ6WtgRV cyUl1tgNA4c00CuhzIm+hR9Zv50ayRnihL1A1PfNZiTSyTNG8CXjk0koI2kYfWG/ 6dqbgFbjg7APbtTU6PyONswxE6pd7stYlDfKhAQ1DYNn398VdubOPedw7eosAZ4H 4X1M4JUC0q08CjCsmlgYDzbjQT4edkW3/mItFU3q8Fg3hV4sJ3EMOefxsucNbim5 M+odng== 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 4anwd41ry4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 17:40:32 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8b2d2c91215so1681232085a.1 for ; Wed, 26 Nov 2025 09:40:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764178832; x=1764783632; 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=+CNzxCmRqCkzPCZPo7wdwLbBBFP1ERFX65HRTQOL9Xw=; b=c8bwsowLoHUu6Ym8Zas63Gkg9/xHYCjaMZ4GPkdpUZ+I3zYdi6wqjXLsRVhQ7+B5f7 Z8oLHQsqtnpFgfjpqxkDJ1/mfxkPeThfZtSOZoNPosE1TQ6f+C/tWOkrpYQmudXf1dtY HKy6+wX2g3FXtm/jb27OqxxteMTP8jnnBlaesBEqhwD0A2VPylCoOrX4QZY+n/CHh/jY TyBp4/LlMggZWuzkkdfOdN3pXDu5Z4C6kjHR1vNwXouO5ZHJByVkcp3UOhNk8ixlHcbq rPxntCkA2+Uvp1mfkOixwPg9O7OM55568PDKVlcFxEnA+CKDHqQ67alGwe3U44L8nXFC qMmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764178832; x=1764783632; 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=+CNzxCmRqCkzPCZPo7wdwLbBBFP1ERFX65HRTQOL9Xw=; b=Q9f2Cw4NTakvJ+24KTaSqYpQvpkENmiYG4fmRl8jLcXZJCdrwdmXld9PcOWneQyQqf +ipdRf5uiCzUt/Fa3zWw38wyIXZqPuPTFU8T2Nvj99fkcWLhoprh3zKwRSZvgIiapn6q 4DN9H2MwNMcJ4q24xLYwYd7maRkosOCymyWM5GFC3FUDgFvHj7FLeG+G9ECiBEMVSnJB snWwyaPLQi+L7ASRec3xTFnt5LOLmesKIPpR2Mt42a/80Ly7IsNaYAuK3wVY+X/nKE7M 4925fbp1EqWEPW1qDR7gEFUQsaKs5Y5InqWZDqIIKLMrywFi7MwgL4O0LUWM7LDFSR95 ZW+w== X-Gm-Message-State: AOJu0Yzzt6qlyIXyRBDCiy89wymIyrK+C9xGDZGdTpP+NaI4wf06HhI8 jawz1wab8L6cp/L50UCJ4q1dBsMtAu50LZLKcUjLoJPFCcVxuIqMH/kJifRHo3OAb+4fzM+TVAp 8jc1kukwS9RWkyFqJRNgEdN7+gM8aU/OccdEUspUm7Ip9VMPaYyK07NddvjZhW0K9KHM= X-Gm-Gg: ASbGncsY+giRWW130XDpqgjBUtggcfdMod2iM81pNoUqoP1x2SqWekm8rJvO7HguVJ1 gm/jMaYBblYrYGFh96xlP0lWI1hWg/89DvbCWm0z24ntxye74990nkU4/S+J3wDAidrt1Wf8tcP hYgs4CbUnVMmzdsSTmRxRjv05fSenYJTBWxEmvFzJS4xfU4Ozd7dpk5LOj42CU8kt6kh0QCC51M T+oqYzn8+vnv6uUPd1JnKhAxv2gJHdADSGx21TmNqJriguQ4SndJ5xJajzKM/D0o6/phoiSJO5V wyWxTg2ROPo94xTaqCjUUkRLzRQSPPyox+qUXjEv06CfyY+YuzGmOwW+60/G7q9RShQ9Rp5+mRJ xSpCYnYkC2fuBMVytmsF5UPrb4Rj0s/sFHA== X-Received: by 2002:a05:620a:2909:b0:8b2:ec00:7846 with SMTP id af79cd13be357-8b33d1d100bmr2726795285a.28.1764178832008; Wed, 26 Nov 2025 09:40:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbqjKB2O5sFoZAhlM0Xp12Fq79ZAX/1usQXGn4gK+ya5/tETRvn2zPSCy7xw2177LVeVx2DQ== X-Received: by 2002:a05:620a:2909:b0:8b2:ec00:7846 with SMTP id af79cd13be357-8b33d1d100bmr2726791185a.28.1764178831610; Wed, 26 Nov 2025 09:40:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 09:40:31 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 18:40:12 +0100 Subject: [PATCH v2 8/8] regulator: pf9453: 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-8-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=1202; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=hmZwf+gqSZxGRRmKDKGj7wIJ5dnf5CYeGgO2dqTIhtc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzuAy4+4pJL42G4NnFpgzf5sY9W3LscY+MVSN MQ99It4xk+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSc7gAAKCRDBN2bmhouD 1+EED/0SBwYzE7RXfH6kNNQOVHrlmegqHI8oD3Wp8oWC/rAteI3V6KVnUlW+pNM9N+/eF3v1WOw 3EWld96KEMWs6ha/2f8+6XHKUvA/y1NChDfhXooLoxhwu1OJSWOcmeV72joeqc9m7JdpF07zH++ x0SxMUUvB0vIqq+d+EfZUPhvxxyYJvntH6NIAnl28Ahtq9Lcwar4OcgDzcOi3LscL7/p3STeT6Z FdXMQuUaSc8gQUmed8XJ6APlO0OEP6ZmcvNBaSr3tqYgurmKrzIjzOuqS5MubAZVOBRZ2BlNEUl dVGG7W/BB4SjLtFiy06wBW/aiu8nD5yoyNEWCXWDo0iSuyll0f94EuRbu2kTsQ8Jm65woX+h11G QMbbFTFA7ZbgrBhMFl/6KsNCISAYRk8l1kxIhLct9zx7f3f2Bv2ilaxH943wU01Y3dTQU0O54wY 0mqqzHGwM/yJp2z7WqEBUFSJOIdJnEZnU0PQlpI89/LO1WTOzfbHfVpBbFBtB5AwjKQbEXKSEF5 DjyVJ5SL2O/STz4sPT7fJ2IECzJpiBrj7vS8gUi7zHzxsavZHHYXTqMG/VLMGbommIyvwE+07Bn rhXhx2v4M2fNmRO0oEtu2b+3tEqB+RcyDqXVIp9Ax7tdzcZDH985n6PgnMcf2/fKQMYiWyrxGKK vSGcM6CkTkD7XaQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: _csEKt_eRkm2tSvzevZhyEtNHo5PFoog X-Authority-Analysis: v=2.4 cv=feqgCkQF c=1 sm=1 tr=0 ts=69273b91 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=9MRJ1adic_HRPEocbcUA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: _csEKt_eRkm2tSvzevZhyEtNHo5PFoog X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDE0NCBTYWx0ZWRfX6VUsLqGLqVSS oiWJqvJCPD2yJuqiu7MjaCTr4enQIjDdZm1bamBxOH2dYoJ+ofGS58BouCpD9WUvd4WpighOs+c ljCP1E0tkcqiqj+eIgb2NBWxBKjENKdw6EUp9VuL3hGtrln0pwnMmT0UDGCh/fMep8swbsEvGqN EWEC9JWJLWWdc8RXf2BEb/phNnk72j57IDw+Ia3VsOvMPjeU0PVVJal7OixpAown7GuU84DkFPu qqh2ii0/9ZoPkJA9w/g3cCbL5V2K46Kxj0lUg0er7TdVWMfegs9L2IqezPJuIaq3Ijrv44DYjsS ppHdels/pWx9s3JaYGOJLNB7btCRSKRHximprmqan2X90FqVNyhRTwk/y8QxIowAlW/t8pGzydZ sTB/dX4OEsqNR6dc6EPFPTtaTDcnFA== 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 Reviewed-by: Matti Vaittinen --- drivers/regulator/pf9453-regulator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/pf9453-regulator.c b/drivers/regulator/pf945= 3-regulator.c index cdb80f9d1bd7..779a6fdb0574 100644 --- a/drivers/regulator/pf9453-regulator.c +++ b/drivers/regulator/pf9453-regulator.c @@ -538,7 +538,9 @@ static int buck_set_dvs(const struct regulator_desc *de= sc, static int pf9453_set_dvs_levels(struct device_node *np, const struct regu= lator_desc *desc, struct regulator_config *cfg) { - struct pf9453_regulator_desc *data =3D container_of(desc, struct pf9453_r= egulator_desc, desc); + const struct pf9453_regulator_desc *data =3D container_of_const(desc, + struct pf9453_regulator_desc, + desc); struct pf9453 *pf9453 =3D dev_get_drvdata(cfg->dev); const struct pf9453_dvs_config *dvs =3D &data->dvs; unsigned int reg, mask; --=20 2.48.1