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 AD7A43016F4 for ; Wed, 26 Nov 2025 16:59:10 +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=1764176352; cv=none; b=c0MG0Ne0pFePFmzKrYJIDgMMBpwSVsyU1e7HjvTiv0kwCqvBJJRUXLecva7KEaa/j/rC+hfe24+LDvkxbXIfKwHgRI1IW49Htj29BQcZqL+UUqkiMkYUPPRZuQBrGfjH2CwvcDPA663/Z9Fieo+S6ryjRzM2SgzNElBOWQVb9KU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176352; c=relaxed/simple; bh=ksdKQZDZf6PSfDQolGcZw2sgxojAWSKaADH0pEqNoMg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pk1qgV5kqWu5/TGSD3jBgnCkHOYTWL7EhGDobwEkcXUUg51YeYOxpcPUTgd12gIYB0stVLr0gxamqz+oZFjv6H6RtUDsLd2+s53vl8NPGvE0KYBy0ShMxcIj+guVfMwHro0viEV/Piwb9GaTyqbXqx8nv03OikGFerKTP9Awny4= 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=Pn7x4zXy; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ig4xOLnm; 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="Pn7x4zXy"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ig4xOLnm" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQBNXrk1849221 for ; Wed, 26 Nov 2025 16:59:10 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= k3JbgWsz0MgrUoNw+KV6VClK/+7GvmHIylTI2s89udk=; b=Pn7x4zXy5QN267Fx phQ+eFB+DXPWMX2zPUyRVMnKXuAkPNQXoWd0RpjRpxGSq1xv0xt9ZgidGi7+/UY6 2Q5lRK4doKzxld3kluq/bfdS33BNiSDRJ9qFMll5TdhWK4AgsIGLqtp2QqpkybJJ uioo39jXj6NvZqw5WqfERoXxP+eMo2v3HaT7Wtyho4V14DxiMrAQtN/kEXYnTm7p uE4DZUaeTzXGxnzkN4aZB7NQgbO4v/OFYrAtEcTN5t57F0L5110thT1twtsDXk2H /9UXPyJ4HTzAtnMpwWwZ62iU/NDVfOR7zsxPYzRCDd+dBhMhkC/CqwBvR9fJ1Rbu fN8Njg== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ap0msrxea-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:09 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4edad69b4e8so33681cf.1 for ; Wed, 26 Nov 2025 08:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176349; x=1764781149; 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=k3JbgWsz0MgrUoNw+KV6VClK/+7GvmHIylTI2s89udk=; b=Ig4xOLnmx+EY+fLt+C+wSJctBqzTe5Q5dhLaMAONwLX2nAnSatweAqC8HKiEvmbHTc fxETvoefvFF/liU4uWZjT4c8Ld9XIa8phyUUWdBZKC6ONJIPSl6HeXsKgDcwuxXFzn6W lyZVbuUYMOykPyQz019j1KrU1nq8yco6lciYpwoGDiGDx1OtrhQS7G5rMQ1Zzx5moEL4 sjNqPX02UBmyaT3+b7Y7XeoFAtphBGdefNE+8q5qx0MZswEet0JadQI6/zOlAK4Qynje 9CInebEjd/EvgxMHB8OIBSoRGIeRuRFcyW1wbXtg4UICMWxbsNfX32mSd4D6QZUGi5zn S25A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176349; x=1764781149; 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=k3JbgWsz0MgrUoNw+KV6VClK/+7GvmHIylTI2s89udk=; b=ust9n0p0SqOI1kYxUR0+ZHOb6Axq/Ob5lgzEdqer3tM2u+4BCG6S7J4ltg5QUmfaBk 7k9IOMdLcf0A0pnhR+JROKjXLMwqJr3X6A/5l9xX28/DwFB6EKfbO9C2/R4w6ts/LdBZ tmotWKsERUQXQPmzPpkVawUSrjGsmJdczFXKWe6QryTlQ/5XAQ2FS2NCYRnTHLHDSm+h vZA9akMaYbJVckMLZJy21DoT6oSuk0K2wi2A3rWTnZnkohW5CWXIs8Y/JkIABrxpM3qY b3HWeLoBQjrtvWUCwXLX5Ee7FDRFPrh0KfINqbgxxGAZA4vpy1iZAuKk6sEEOSc08R85 ryqg== X-Gm-Message-State: AOJu0YzFsuWvytBeiVIfFgyhj5nwQPbyfggFwQrvS05QN8tFuWOB9Uif mRqGQ9WHKHmWMWGjLWvE1Ci4y/JtzQ6CfITFsQoNlDWNW4aEsLxhp8WSpNIEDWyL4V+DqjF7HCG ep5TUEMKUs55fyxvKcjJpsDngqy4NgE6OiMrlXazlIlgk2GskbTHlP9M7WRXI10+caNI= X-Gm-Gg: ASbGncvrBK6rGiCXogbPMLSqf7pi3YVgs9S2lUdp6d7nG+ZEw1Nt2S8+7I+EWFGavZU rGTM0NSkR9m5e9dzg4O1iqHU8Eg2Mbg0Ts+lylwKSxC4TI7xD/KW2HtwiHEdFRNBnjVdn7Bt2UM FWWdreabkEG4us1UhwyaBuzmZDy2lAV5wAkMhHvMB0XA0pNeG3yHrRKEdejIZsSFA4tR6SET2ol /yxY/clcvryoAvVX84jY1LzydIep0CZ7arJO90QyuZ3rLwXWY1bE5F5iqIDcny6PO6TG+ewolnq bCs7ezjl4C6BI0PQvU61vJUYKDjU+gn5NOop3d5sxK4dRCLLvoG32lSZj+r0vmDoLGXe+A0/TDi SkVQBTk2MU0TPs1u7fsI+gs3zNvFVreOS0A== X-Received: by 2002:ac8:7d4b:0:b0:4ee:1bdb:a547 with SMTP id d75a77b69052e-4ee4b44942amr390379891cf.14.1764176348675; Wed, 26 Nov 2025 08:59:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXP8xwc6R66Df1B5JWgQH4iuh0Ol81d6xkP0icKm57B55Hsx263/Lx3e/3QyuggROGBRbYXQ== X-Received: by 2002:ac8:7d4b:0:b0:4ee:1bdb:a547 with SMTP id d75a77b69052e-4ee4b44942amr390379201cf.14.1764176348111; Wed, 26 Nov 2025 08:59:08 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:07 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:44 +0100 Subject: [PATCH 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-v1-1-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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=10498; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=ksdKQZDZf6PSfDQolGcZw2sgxojAWSKaADH0pEqNoMg=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHR9c8eoy/Zb1bCHwTyc/IxD6/8sMI7RPdLr hFw5PxjURyJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx0QAKCRDBN2bmhouD 13A2D/96aVoQBIWlztNXHma1dMqEyrhOjl/nJwqbU4bYXR9p/7cDyCWHzZCzlJanYbCQdHlRsU3 4XJvLpFKn3SvHvuqFc3piKonZ+WomWUZNApZFb/vIlNP+3qKj/mqckQQ6z3OxM16g9XSWstiWvh tJG/ALTOSWZrASQacFCckdNuYkNn8Evw1Y1r3dCyiVTy5VXph/WNp/5faqtO3pkByfVRHf0ST4L 6z4lQL9qo8fRN8JbfqrIsun9Sf+9/57RGVcaKdiKmUwGhOeXTrfjace7hrhenXayDc705KHjpNl vwisst1JR5vYIHCkcmgU1NbnUkMG4q95FKcOS+BV5KHvtg1fSCm79r5EsUGNUFnFYi2WEnydKCZ V+Ns7/irjxSJWscArOxlj9ckOeosuoQYzN6Xf0WOHh2U2wICuXj2hiZr4keTRVjztY9/tNwYbfA y85fBdV7vcJ6flA96dLqBIQHVKKI9BTXFZD3bC/6EuCidR6FqfZFhvHxGequ2cVyghIkTER/exb 3aOHQKGJTOwONquL25xJ0Vd/v8z00tEH8KZg6ObhWKrqkOTUFldmCRLBBF2Xv7bnP/R0AU1IA3e 0GcwJVD/hzuxG/Mhd90sxi+T27+6432JhJ2TEetTwtr01w5+jmENQ/rRiXUedI67uaVyLR2w+8U pdjV8C1PTk32Ymw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: FlkC8DJoI3YdK-qJ1ZyDDncMOeqqw2KB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfXy7g8DFFHCsJY fdVepeHITr6sQDO0OTLvKvhyLnm90ufvhY0a52CAiIvunQCjTujASv11/nQ/q4IMjfTfwXOapwN qmm4NK9+JiE+WHyhPIKoe/VjPlkZAr89S0d4uoR26x0tYP3hPYtaqG5pB/+YeYuihhNdLTS7dg0 OI94e0BgovdzTYrHIeC4Lg+cA7iPyfXFsAmsi3k6cSby3hh7KJiRL35nFIBq+khiL3kAeyaBJzJ AkTwjC7tZXllnyDdobMxFYqzcQYzNHZce9VkvKL+CgrL9q3dsDT1i9VmXOUMQHaun/4t+Y4uGcl SpL5qEWPyHq0bjzX5OLwtD1Sgl/cBrsD7lzapSaHbDog2RPJAS8byM5b9u0pJDHZn50t163bGFN SSIP63SjrjCJ6LT/RTY25y2W82pW5Q== X-Authority-Analysis: v=2.4 cv=N5Qk1m9B c=1 sm=1 tr=0 ts=692731dd cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=Iax6wTeSMpqzYiZSKl48GQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=SzMjVNougZAxKi99s30A:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-ORIG-GUID: FlkC8DJoI3YdK-qJ1ZyDDncMOeqqw2KB 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 malwarescore=0 lowpriorityscore=0 adultscore=0 spamscore=0 clxscore=1015 bulkscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260138 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 --- 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 +++--- drivers/regulator/pf1550-regulator.c | 24 ++++++++++++------------ 6 files changed, 28 insertions(+), 28 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); diff --git a/drivers/regulator/pf1550-regulator.c b/drivers/regulator/pf155= 0-regulator.c index 904926097738..037b8ec94066 100644 --- a/drivers/regulator/pf1550-regulator.c +++ b/drivers/regulator/pf1550-regulator.c @@ -71,9 +71,9 @@ static int pf1550_set_ramp_delay(struct regulator_dev *rd= ev, int ramp_delay) =20 static int pf1550_set_suspend_enable(struct regulator_dev *rdev) { - const struct pf1550_desc *desc =3D container_of(rdev->desc, - struct pf1550_desc, - desc); + const struct pf1550_desc *desc =3D container_of_const(rdev->desc, + struct pf1550_desc, + desc); unsigned int val =3D desc->stby_enable_mask; =20 return regmap_update_bits(rdev->regmap, desc->stby_enable_reg, @@ -82,9 +82,9 @@ static int pf1550_set_suspend_enable(struct regulator_dev= *rdev) =20 static int pf1550_set_suspend_disable(struct regulator_dev *rdev) { - const struct pf1550_desc *desc =3D container_of(rdev->desc, - struct pf1550_desc, - desc); + const struct pf1550_desc *desc =3D container_of_const(rdev->desc, + struct pf1550_desc, + desc); =20 return regmap_update_bits(rdev->regmap, desc->stby_enable_reg, desc->stby_enable_mask, 0); @@ -93,9 +93,9 @@ static int pf1550_set_suspend_disable(struct regulator_de= v *rdev) static int pf1550_buck_set_table_suspend_voltage(struct regulator_dev *rde= v, int uV) { - const struct pf1550_desc *desc =3D container_of(rdev->desc, - struct pf1550_desc, - desc); + const struct pf1550_desc *desc =3D container_of_const(rdev->desc, + struct pf1550_desc, + desc); int ret; =20 ret =3D regulator_map_voltage_ascend(rdev, uV, uV); @@ -111,9 +111,9 @@ static int pf1550_buck_set_table_suspend_voltage(struct= regulator_dev *rdev, static int pf1550_buck_set_linear_suspend_voltage(struct regulator_dev *rd= ev, int uV) { - const struct pf1550_desc *desc =3D container_of(rdev->desc, - struct pf1550_desc, - desc); + const struct pf1550_desc *desc =3D container_of_const(rdev->desc, + struct pf1550_desc, + desc); int ret; =20 ret =3D regulator_map_voltage_linear(rdev, uV, uV); --=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 9A15733F36E for ; Wed, 26 Nov 2025 16:59:11 +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=1764176353; cv=none; b=CBXVaoUy2p6AQgnwMn4ePCoGH9aJcRlWQBy+9OlszpAnwro4rlgC6mFjn6SXw4+CU0qe9E8/BOCk6msrC0tsUdjHc6nJmalMBoaxNLE/pWSteiN1wpLsisL/inw+QfZ77amBJTvV6oJBv3I6ufV139649RcLKnOlI+3zuO2Yhik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176353; c=relaxed/simple; bh=VUNpL3jXdgc3MZUwnQFvZgDT2ptHwcLxGJcoxf3oJiI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CODTB13gVGCyf7P0OPk1EC5Bh1nNPYSOtTTPCDWCZqpVQOhwgRTp/ohqVn283SGIgs7P3RlLo49asoKKLU+jX0pe/rztMvwQZHzqs2EKmZV2Um6GhhahEpB2CDzBb4oqkrmzNNAUGOV4pfPpkokQyPNXZlywqqomhsaXGNAM+Mk= 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=bJtnp3o5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=SDRW2yEq; 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="bJtnp3o5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="SDRW2yEq" 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 5AQFpBPu1235231 for ; Wed, 26 Nov 2025 16:59:11 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=bJtnp3o5V63hX1tu jYvWzgAiqf9H5wPFkebRqHUZhN5rcKodQfnumZqeRjeC77uV4oPw1GjrlLvHS6dn 7W4ZiVWQ79r50+0pXDWqPA9ao0ZRGxYo5uwixoMiVLCKkvMXPtRk5Yq29VIpy9s/ 4rwAj3JZbNow8hAkTqn72qnLWAzAfZDQAE1XTLRSUGr8oKMUwugjYQjP1cWMygVd Bfe1PENeOnmrKjQXVfI0bZ2nE9EmykSStASroZj36N6HLMbCWtTr0FxnQfRC9jcV FfWgL9Ezqm3CeGTpGztvw4b3O0FgVoYL6+i02b6qLEWNRjMl7liCs040DQARP7U5 0M/7Ug== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anwd41mx0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:10 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4ede679393aso745061cf.1 for ; Wed, 26 Nov 2025 08:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176350; x=1764781150; 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=SDRW2yEqhM91IN6JJahya9lWVI+CELfcW0zt4Ex5QjhhBn7y7gKNmuHteuMT2fLQAh 0RNL5N7DuwatytR/OdzsEC7UOq06bkmJPWKN2WNjGsHIDilJvUDMXTqX3Fh7doQdQFAu KG7VAlgc1eCRXAwghf3abm08Y+fct6PgZkHMIK7KXkR18KlmlnjK3cxo2B9j+VsYl6sU F5/qCAnDmQZOanG1KJIQLnr+niY5XvN54H5Ov469FdB9LusldCpSvGXO+sOVgcV8eDOc x77WkYRAL72+JjddQEStoS7lqHFfqAxRO6xiR8FMhAxoy0l/51VyQl4k1he6J/jDbLUo Mu+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176350; x=1764781150; 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=V6+nupNru2pKmmXp6Wpdb7g13bJmlnOvYQ5nS5OWT0z4MmFoI7WvY3dRfBCJE8UoP1 0XpAPwmH+hk02ECzyZiX2AYYOeSQ0Nz+Udlg/Z+R2YLTd9+yFDkhiCm4EXFUnXSB9EEu PC+C3gtJwIbK9y+QcmRIxaRiSMj9HmMG9842CujnaHx1xYk5ydiwwS+eav9ZmotJUgau E38ieG5BQCSjsx3MFPr2+JS5rxzQ0xgixqC8lvg6pio3WjQ9awxtSdJwYo+lNNH9iWRn 0bU+eHjdZ8G76I42aE0oVir5HKg3ruuTMBOyK/M83dHY/IxOhW9iSwcfxZme8M/0sAV5 SAcg== X-Gm-Message-State: AOJu0YxRkXmsQLhf61pCPJEQPskSPsDFOc5T58n87vVLtqTOptdn9dEu 8uv15zG7IBZPLzdipdjtgS+3SKtl/P9Kcvxe3fIHD68eI8LKppMLdGAfw0XQ+nHPwHpi7KAlKh/ SNjVH7DkGZAhGZ4AjxKZ/CeD02H8o9Jr04FhK2VVjsr9jH2HTE/PyE5394aAdFad9FjI= X-Gm-Gg: ASbGncvdGjFW0NLEG+ZaU6EqEoPe5W8iuLZu/uFh5R2MzWuKffGJ906IJolStmy9E3L KooCxJQ3CA4F3CNPFkkGAKi5LrOpT/dwEsvuIWv/mSpHO3kAjPw5CwZ2YjVRaIPZo5VcJLPZ30T Y02SD1j/LW2pVF7gXc6Gy9tLCigMRaodc5qm60fr1fFGWY37+qtqlw4ovHT7xEqTnrNLdWWw+qI /OCUPqL7Lx4W9KPDCTD0D+WOG6GFQ2Whgpdz12/3cS2AhArJ6O1zXJNOrBVU5kvaTNo4PC/9ero b3EzRBXfT6+rPFhtBzHUDLizmSkzUXhj2zP/1VPVK5fXxp0vGRBcJFdqQBk+a2JUYb4cU6BsK5n NTDQbyzXT5mrMyEz590fKu/WaBj0saOX1GQ== X-Received: by 2002:a05:622a:1650:b0:4ec:eec7:4850 with SMTP id d75a77b69052e-4efbdad0501mr93971351cf.44.1764176349909; Wed, 26 Nov 2025 08:59:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IErBnHpfn744afixM3E2g1It17xfT+FfmSgDWhqDDmm7wcZnjLFgMoXR5FHu4Z0fr4SV0TEWQ== X-Received: by 2002:a05:622a:1650:b0:4ec:eec7:4850 with SMTP id d75a77b69052e-4efbdad0501mr93971011cf.44.1764176349506; Wed, 26 Nov 2025 08:59:09 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:09 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:45 +0100 Subject: [PATCH 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-v1-2-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHSY6WydZE9KNyD+CnPH7zWuDEoWof3fnfdW iIbYj9M3/aJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx0gAKCRDBN2bmhouD 17Q7D/49mEg2t66KhjK0643fF0ogQe7s2j4vBij03DGs/YvbwTJpSNL5Lyi0ASig52sbv+hefZ7 krUNF8gash9QMCaiqpRfStyJ1eN42Hb7AIjy6q89cEWlMHJJRQZEI7aEraOHiAScoELINAe4vZ9 7sWq+IZjsKL7VeGHBxsugUnornYakD7qwV4BWySvwhDIUehdd6ySorDcfRjrecnVnLYoKlSk8ar 7V57tmOXumHlfYAOUH+naOMGHt96AYNe1UImqYgaTLQWPV5ZMKYZQFC/Gnl9JXX+N+56qwBdkKI 8SRJL50VPmtiDRovpCZgirizdrQGjNJpUITVAN4rHcle9zIaZXKfZpKyeeZ90p5Mw97+TkH30eO CsYAXBg7iK/DtVkziBokGv/ltrakEvyhc3M4+P6xDdm7TfKEL0ZVEbTsGMeoY3cI9oKaVh57QYx s7U6r+p708lLqKmCLztNT4XmHQgAJUVgby8vO1yql0TXf/9+2RXqJXp0Un6BqP7pTORGMPXv5zw +wbkt2YXS5SUPKUGhcmr8ACx+Oob1V7rUmG6Hv/EFicchNuU79RyN8HMAIrNa7aoG/eIcWufNIq lotaeJb2ys+gGpA0aAsd266GQuRSuy6OwgOOZqA/qM1kfKsqEwBljv0LYus4/n/Ep38XFB4ILze /Opxx/NrKZtVu4A== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: xGbAt_X_zYOv55mK8GfF05Nuk8cBO_mb X-Authority-Analysis: v=2.4 cv=feqgCkQF c=1 sm=1 tr=0 ts=692731de cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==: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=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-GUID: xGbAt_X_zYOv55mK8GfF05Nuk8cBO_mb X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfX44SXoIRHaedj 0NRtdbJSVwddoTDSDeB3znuWwa4GMkIbnUVeiMwgcsHVR4FjmNIXejGSymD2wPm6E5r5QlJ22yQ MdyRxjxSDf4gJBXBv4Cc/wtnPkmv98f6R7J0OqWTHzCjqPrh6VwPqRaXuQi0uDq4PR+sX1z7AoS 8Cj6zi031CmQb4Y6ev7ICb6Swt4Is+wMHps4lMQfizea6asIi3Yu+28wIPy2iDLijMJwzhw8gY/ LoYKenpd4TH/wdDywUpo6hHG02mKWZVbggMX2YKfTJ/YpoqXwsAh2J0W45oHibpJ9gyZyn14H0J QywKd+5lO6pSWmgabI3R2DtjivsRGim/Wt/cAjtgH1q+tNb7MsPRK6MWMbc4ZpdGugElvqTCqyp OzKRX0LajeZ7QKamjiOphF71Y7rZ+A== 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-2511260138 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/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 2641933F8A7 for ; Wed, 26 Nov 2025 16:59:12 +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=1764176354; cv=none; b=EEUQD01KZmRHBv+FBWOhT5aQxbe5toW2P0CAzvPd+wHTivxNp2XmngeBLdUEejua8GyVpv77tBwuK8PVzZNUBwNE826ROt8tq1tvWzii7vzH/jU9NnMxbEl8w0m6g/p979ZZXyYFe8irWcNWVBDxoMLDiWJCYIs0dpKsVki4ObI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176354; c=relaxed/simple; bh=DUpWNqruSQhmXQP3XRdoDV1aijYo/dZHk2b5HlvKVaY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hbMk8MMS+7bNIA4rY5tOTm2Lul0AcJ3fOD0gkyh/fzNpcHimCwG2xKJbWrQiZ+3v5X2aGG/kVu++CAEWBA1fImag8/6MPW5mCzILjppZ1RC+tP+uUw+l0iVUt7StuE0wOtoIrJWm6rs+8mllibZ2RLxDXrF2sHsUKg1VT6w508Q= 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=X35q5+SR; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RfyV58lb; 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="X35q5+SR"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RfyV58lb" 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 5AQ90rkB4048890 for ; Wed, 26 Nov 2025 16:59:12 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=X35q5+SRUu5nhVNv 1zmNuSiT1HPRpGizSPsrY5NYHWp3ZjBzehGYpR3GBB8ib4KPx+Sy9gEnePuXbmjn 2t4/LaQlF6SZBkv6linOvnrqOCxp278jlgsTIyGfTPCRAav8apErqplMh2Ss0NM9 BGKmSz+a30/OhoR15Z05/Xit/3ZiciiMkco9HzK45GSa1H9yPyZaQrYIzqHy1kuo RKNp05MNN2CCD8C2/DYbF8gnwOd6fo+c1iQgil12EpT0S5tTPifv/HifezvGLICf t3SpS3sZ/wWiMzupwPGOLk1DMw8TKI5LR7BoPg2ezGdGfzWXlvE6Q3AmoW36q3WR Wu9ugQ== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anp2njqcp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:12 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4edaf9e48ecso1394061cf.0 for ; Wed, 26 Nov 2025 08:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176351; x=1764781151; 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=RfyV58lbDuYSpjnVx1uMjpO4EBFQKeSYw8q22r6UwCDDHiQQ5Od0CjbID/MdlAr27t 5M2nAljhV/pi6hesRQcfAy0aS8Bl0lEhCuMI9K2OJIgfxng9Iod8CwNEz+PpRIyNIkBZ qrptP0jdej298YlFqpin8/xGpm8WfKX/gkCkgltvHjkXAt0D4WP32ccmWQ9hxXzLCDZr 8OKtJcuupk/9D82UiRt1N1DvC50V+05HIcrF9UX1NQiuiZD09EVIZIS+PDaHPN/x4rOB aiqNxcwPULhlbVfZjc8u2aiNAiBYsfZRPxJPJ/fK/vs+io+pafWY0WoT8Wwz+pBb2UFU h+Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176351; x=1764781151; 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=Tj1m2IWsIE2Ppf+qGEAeQgyY+KDuqG5Tl4pPz4zdU0/ANZOxK5E/YZo3wCVTot0P8u PFB34uxnPkEmdTwhJilNg9CzqjiUQsiogfM5g81tA+TSwsBBGAVpaX7cGkxAM0/gDr9D 9y1N6MXDoyb4ldGfj7grWE8jSMYTYwnjloO9t7G/+p7Ssq1rHZ5TF4RoqIqO4Y+xftdM AHW+vhUCPI2w5bV259zUSY7vKwLvaQLViN7OJr6fsL00EOdNVDqVpljZrjFsbpG36PVX TcYKqDiWGYPouWODVaEisAjTOdwuJO/TAZtqhKE/+gJ2CorGUhx3ltW2im4T/J5s6qgT 35TA== X-Gm-Message-State: AOJu0YzkFFmDrdRP3hCUxCSHZg5miE5/lCqCigtMk9IKN9reN2//rDpl 0XcHLnuJ0VAvlwAS6yOODntlA1N/T8wyXHOWFFQ6/521SunheWQTYo2XU166vIvZnJqQNPIBs4R Hyqi2gDvZ3SdgMHhlJcgLCfGUn5MX9q0IOz7VOx7md8/MDfeM/C+xciKKPNirKpgKS0c= X-Gm-Gg: ASbGnct+EnORRKPLGyWuLN5m72FzrOBFFeJOcBWa4VWrbBV3kEAkB0cxSoof1jqBrrG F22fxMs7cbO0q1UjszJsPsV4ih6KO92TLwyr+tvLjjZGEEtv1D9S5KMDfDIk0WxXr9epXA629O3 D+TCjOySpKtwpRb2xINAvEm3UVNUEUMxr9NizIVz4hQYRlNlGpQGSZY04gfwb9k7X6WBrSd/ZMj GwqYcp5ENPaQLjU+KpSU+CSqGWBgDizZVcu3gYE6Zpnc72MghkwYEXH8oY8FA0BqJzgW1w3CU89 QUxScwHwvaGEffy+No6zk0OpdLiVLNIePOpnliKrK8RogYOqHJ3BZ3l7/Vzt/mDoDssWjDua3lE 2OW/bL27qiRHgJpfbJYPBMYbbpX8M/Lvsyw== X-Received: by 2002:a05:622a:1308:b0:4ee:26bd:13f3 with SMTP id d75a77b69052e-4ee58a61bf6mr244308541cf.8.1764176351361; Wed, 26 Nov 2025 08:59:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8lB1Rhgrq3S+danGiNjlWNKu0BDiKtqnkZCNEIla7vkB7GqUXjzDmY84VeQKHPci21vEnkQ== X-Received: by 2002:a05:622a:1308:b0:4ee:26bd:13f3 with SMTP id d75a77b69052e-4ee58a61bf6mr244308101cf.8.1764176350933; Wed, 26 Nov 2025 08:59:10 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:10 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:46 +0100 Subject: [PATCH 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-v1-3-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHTv3KzXgz4HC3zgQmbgCAciN3i+x1qbR/Fk TALu82gDxWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx0wAKCRDBN2bmhouD 10yND/9sSVKKn7BpioaP9g6rmdgiz3FBDy/AGVkWcEImTalr/rjDKuV0Je5AgCxMxPjVFcRwASz 6wAKseFTTOZvUmvSnqGfxSkmnSO47RFaMLDR9zkFlXRzYnS/v2G3+oHpe89wllLln5/zl/LB4cn VtTAxyHlNT4gxgvDL18j2VJhWVJh+WovUiB9owuIQygwsCR2QgGkzcy2ghkdYzN3FAei0VyPbTu vpb6A1UDl+ds4r+61ParpSzxpPHjo7kOqadOae4HQ3D66GA/uAPSDwwMNTl0fCuhpJp3jPgldVX Dtf/QCHBgUdkglHn8PXWLf5H6Z7W92+Hl05Bx3CHMBL+OAvqX8gi5OkrQy982RtXkzUDDaZciCp Z4Pj4z6viCaUB/tLBEsOs+MJmxgCBHAeuwRmpEktaxvznMorLi9HAE6nWzrDregCl+GCVPj2eJg iu4cOEYMgSCstrm+DCwNN62z0WUlzTb7cXMnfAHb7xgkINGlFrmRHbkhtXX3yNU0LpRpj3f4bUK RUnhNQVvZWqsa56TnDVJaCKm3BEtFb0YA+bRHTsAuPi2EEIKBxR2umBlIS86vyuf81C9PiShqlX UrKN2zH9SHsgwP2MXK2Qu+50QeIQ7lvhsZHu5NGJ5SmxC/3KrqSmUAmbiLp2yZWDuOHByDn80wL oWJpXWQt9nvGMqQ== 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=692731e0 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==: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=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-GUID: DhpEVlwHZVqmPUAZgSi4L1c798QRfVSL X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfX5v0NzhSlrkUY nxyYL5/ppajPkkGt7nxc9mTk2uG1iNXAfWhDKhhED3pxdhihOXoAIyu3kSo7ToaMZHXZL/OTBiZ 1U0ZgdeG01E7CF21fB/SZUe4TYcMXkWICWt9Hv6TMn03PJ0eO+lZW93vlcBo7h9zrT7Q96GFAnH ioL7WXDgphJDblQoKxe9QkXsMl0m3vA0Q+Dwlfoutht1EwOpJSHYDETq66f0MQ9TRkh6fS5LYTy fPGROPMii0hE4MHz1LAazB+m1SX4GlG+Mbno3zijEBqAS+yTeetsEGmns15GG+MZJtChZ9TX4Az 9zFGEtlo0bUAOoyECOU0GbbghSfPoC09tY9l3t4pNHX3L7Mnbw3b0Usw6RfZapdl5kVX76xGGwX HuTuj3wK4hetqWakHqBPmpboHl8yEA== X-Proofpoint-ORIG-GUID: DhpEVlwHZVqmPUAZgSi4L1c798QRfVSL 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-2511260138 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/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 9C16733FE02 for ; Wed, 26 Nov 2025 16:59:14 +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=1764176356; cv=none; b=p88TTZY7l0i47WGZ04dJGgy4/UVgRJbVOwB+89dljX12Ko7DyuaWz6StR/9yKgtQUhezEJljMxm6fyCZLJW8lC4PBbrUgccNE8VvJfGL+TYIjV41bIMfPmS4SWSdfhxoBaInbZuV3mPx0gBOse0egdekX/FuKpPRdus//wbTFDo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176356; c=relaxed/simple; bh=hS8RVWi3XaF10PpDUVAlrbmypT/xVq1XUUFF7etuthE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qgU3LFyFnX1ow3KVht6/+1RmeHTSv0fi0NlCHy0WLtEuqitQ39WaeDbdypcpuDfI6zmUz6c5CEpJU34vTFvoX/8vChsS1Q4aMZpzPMNPLJvmtEihlsB81zDJSWWjp42RA220C9kgSXXvAFFAHB8kYwd2e1GOgXP/iHy2PciqNPk= 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=UGSUQDDh; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VSDBRxqJ; 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="UGSUQDDh"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VSDBRxqJ" 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 5AQG8YK61234720 for ; Wed, 26 Nov 2025 16:59:13 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=UGSUQDDhRhXxvsL/ CFeaQtpIxFRcb4GXL/po5P2L8zkbuUyQNSzxKCwc4ZfjVBEVNsvKU5uXzXKoh53e qGlMr2qxLNChXMefg9OJvHPGxQ6L5gCR1nhov6+mwUvqKutk5EScifYCDQLkMJ2a 6CWBG63ubTGAfVnFi6OtMhvwgh/GeYF/ulAd+m5g82QWYaDEXtC9C3EjgizOUBD6 8x5P0nRiuekBQljpvlTgIYa48ce4AYBgBv3L1Fv1vZGfUcttnfQ28IMKAG8Xoh2u wuNz7FkGpiJ+tBUgTxZ86kGoSXa4TBka5Xg5g9OZ9m3viNMYjr6syVjxGkIss6ke ij73Rg== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anwd41mx5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:13 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-8805054afa1so154619036d6.0 for ; Wed, 26 Nov 2025 08:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176353; x=1764781153; 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=VSDBRxqJDbhF956rMMIXCHNoOBOrzVAx5ZXZrF9MUQY0Q0XjkS6UKJ6Vif53AzMG06 Fk+PvCrDdHay6ViNFuZJyltgWv4zU/Z6jUhIcsos7eWGZmVM2vulEcrFjzINu6AZFaMf /k1D1X9sS5TgrQ12Q+cUHFHmIKRS7vzKMEGERz+BV+eGViZRq6pYDna5cwit+/utlM05 fSCg6c9EQeIPqZ7woNgNUBMqC60sDTiUvo6+xWIhNKni0Ahf6h/qZ17Hstp9nllfDole ADZ0/V5vl5mY54tzIyeXQ4ccpLBzLyWjazyN4M7jY6lKCj1bIh4LFJUQYhXmwCAA0JU2 IwBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176353; x=1764781153; 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=eb7C0EY6pZDRJX0YH/tM04XIvF/5+QnNFSW/NtqdMtGhBjnGi91OuowhRQnkygwVch KFJeSail6O3JRZL3Ab+07Xu0hns8azGG+E7rtTuq/7nBwZBrAQ1n3MDiAfMD4B0cqLtc 3Lk98Ot+sEsJw5FTCnJL1Yijr+aHNEB+h8xSAgYDuVQZG6UDHyP3YzDjP3NyGHfg8hgv LgohzXSkUeG5pc/rpYuoA8oL6nAzCpjLEqkfarBomeIdEJTVSoWVv4sI8PQwEfHLBUzd Nz/mJ1wvrIw1b9XgeeHP53theID/YWUbY3avH83tjfSI5wNUDPFWh0x2X/Xn8XMtdJYB Tneg== X-Gm-Message-State: AOJu0Yw1acb1U0CN5LMXmnXich3KFdFUwvy5A9aat1NldKwVRljHkc5B 10Z08m+iVdJS0Y2YfhImhIw6cRrIHrRPtZWVGqe/3nD2L5WK3tcZRGuPcUShUZ2UkHnhFLPT8zy hkPWIdDpARDG70wHO00e2r10NpcYgmw3Pku6hNRHtlzqpGLFURR3596JrmjFGd1jtXk4= X-Gm-Gg: ASbGnctWCLgHWTjCiHDRsB9D5sfota2YqzHN4M7q7GiDJM8U/nVC+UGuUvP8PTt1hL1 weqeWhLCIiLlWS2vQN/psA0oQ0KcLVIV4VSpRLRXv73tx/HISgEqEmAUH3YpDgF4P5HEKrFO+0m oLk1IBHC9pa3wYg9Q6oAn1Y48d3fsdAhVW9b90Fno3DqLIcws/hyJRk+ZeppPsHBW2iblCTu0Xu 5yMYCv6B2mMcI4YZTzmA3hafXK9cR4CB+CHtBBTtkE1VLlWBAdPkieNO0Hm8tqiDI+RZ73j74fz bn447hNOcfgB3d6ObR7HS5jh3xflaKb4EBkvWn0hrOBXeAkblixecg5tinITsDYaopB0Dbap7+E 5BOi1+LB6KOLtGn/r9Q79uINMbWtdFD0oRQ== X-Received: by 2002:a05:622a:1a22:b0:4ee:d9a:8877 with SMTP id d75a77b69052e-4ee5894f754mr301719851cf.72.1764176352829; Wed, 26 Nov 2025 08:59:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFFNJfMA5YGMK2a1B1clwXb0TeWG0h5ObbcP6jqY2pgY5UGsCXOEnBRMkFRRZT8Gb+jB2+8g== X-Received: by 2002:a05:622a:1a22:b0:4ee:d9a:8877 with SMTP id d75a77b69052e-4ee5894f754mr301719411cf.72.1764176352359; Wed, 26 Nov 2025 08:59:12 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:11 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:47 +0100 Subject: [PATCH 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-v1-4-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHUTLtRuGEhkFoXFkaki8FZ9a2VF5tTfLOBZ RYcGLx2w4eJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx1AAKCRDBN2bmhouD 17Q3EACROfWHE+jjlQlJ5WoREWxGSbBZfoYvYbjXZLbkFP37lg1HeD5Vkc+nHsWHcb7p2vBadA8 tmuad3RDqYNM8in/+QBkmYtWM2xcSB7xBICZ6QP9j/2bQUOFohJ8K1b4eerzzdWoeIB3mLddLA9 p9wMxec2iqA7SwUTH9QLRh8aRYcSwIldtsJDUqBEHbtta1O9P0cmpl9kSYhEZKJmyIL3B3HHMZR ytWr6UzkcmmoNuQJkPyyG0qx+6hCCu6oK7o1rrwD72oekhi6B7Mb8iGwsXXLy0YVQQBYdITHijD d0Hv29u5Sf6ATxURSfth81Lfx3auxgN5NuHRv3t3lTMTU7D7h9FuleMfHGvMiVUOYdHVZJ1rel8 becxFcHQ2Pzp/sYccUtffpem+pLMHXwdi5W9rF2WT/pjdPlR2CjAl++bsAm8yRIN7lzPwaW6LM8 0uDdOq+GF+L/vHaLTL0S+WgV5Lzy8cf72u0lic1NGKhk1uoMSGcQ/WtgONpBotBfZULKlYdhE6k LG2yrmz/3vYyTUBR39ZgOKdhRceXWOKlVAw/hIQ/RU/lNRkPbBGyXvUgYE31B46QLJBLzpEXrVG SkYC1a5w0HpZnJmoMzVcnwfEklJynTM/RLyZHQcAGA1/RUFkCFK9O7WZXgrxgNjG5UvUmRad9wZ y944thVw+3wXbyg== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: bpoJS0bXNv3La4K3si3y0iwEULE1Bh-J X-Authority-Analysis: v=2.4 cv=feqgCkQF c=1 sm=1 tr=0 ts=692731e1 cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==: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=OIgjcC2v60KrkQgK7BGD:22 X-Proofpoint-GUID: bpoJS0bXNv3La4K3si3y0iwEULE1Bh-J X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfX45vtpgdZentk pUx+ysoMkLwqZ2BMW27lWUwBiMslugii/uTrPkS9bU0S4TrNGQ3h/TxXTpymkNajij/sCTRDbLa bnpypt6mdwhH9Vp03VC/gthf1TSEhIGY3nKUYCeOMXKs8wba1NY1nufZxpQ1XzvpoIzfXTz5U4G pXIx2/yAqp4tpnu8CSHWPFH0BcgiYr8sXnlwD4M7df652DolUxnOvlW3HQoSyykNXcH9HtBsQnN mWkBTI7UAJtJ5i48LFUS3c9HbSIe0m/2O+IvJYjm62GQXIsxFxS7Z4a+9WxP6Kd+yvkQfAIvryo UyrQb/26hGEkwzitEXT/drG7QVOOYTEN8h9PxLUbyTtQtz/vCvvEchzu6IY09pPg6JUd2NNbib4 8TFwbp0KV5fZtdfFx8n5MJwd8VTfBg== 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-2511260138 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/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 E468C340283 for ; Wed, 26 Nov 2025 16:59:15 +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=1764176357; cv=none; b=a1BsIS0A6rQCcWR6x2O082gu+1IJNyBrm7YH5eYKltikhUKznfOyNdh/313x7toLAyEQCzWyQsXxud3vxKjRnDAISGiF14un6ksbYx6Mp0uRYlrr1CQE2zxGyJLhmncBv1Cap9ABiZm73xGm0mIbjJVSnPmc4W4Xv8LZKW2doGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176357; c=relaxed/simple; bh=pvkowGB42YgFOHad3W/lZDavbKmrMX9dgCpdtLR0vaY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XfhRtif+pWZd0XZjz3bQ4knWYhXB1PydhmdSqWhVx2yHM8STK57HNTwJgzZp/vRDHgD3KeQGxtobLZU1ottVBKvWfNFvmdISMCcN5YPJP/Ne1lrPiap6lk5LsgX9/adxwIprEyxstJwqSWuw1ULKBG+h/qr5YbYC+tUxdEF+LjI= 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=CoqpCszP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=SqZdC7pm; 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="CoqpCszP"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="SqZdC7pm" 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 5AQGdijR3666112 for ; Wed, 26 Nov 2025 16:59:15 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=CoqpCszPRTAcr3sl OlMvUkY3svFku9dZ5uh+NMSNr3qyRR43ZEIF2emQX20Bd4t+EegPgMA9/35urcq0 xI5gZ8HQo7G3pLzfiHDN9OeEEOOY/NNj5Xg3IRQ81hsmY0mk8lwQjUvIORCT9/XB jCJH2oamxiusi8tJlpg/2KfvsPFi8N/SwSJx1gK6zrVyDt+5G2BNUTeif+D6D3go TfQ0Fdd9Bs/tjMmV49vs95tzoxERzp/dg5PdmWzlBiySJiVQlHsJULDp2Vy3c6Qh mK3XQ+UreONmtUtDdxzzj9YGZC2nTU2ktCgKXGz39IhmbQ/8bMqysPRJcmd2zaMW 1iIS2A== 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 4anmemtw0t-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:15 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8b51396f3efso54719285a.1 for ; Wed, 26 Nov 2025 08:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176354; x=1764781154; 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=SqZdC7pmZAXRo/zucVmzd+WuYkFrzcK9x3al6efcVeDDQnpHMTxCfs2sIvNaKMhbZn HcW6RXfnD02sQgAMWT3gmKIL3OjMw2VdeuiAugyMmMcYpIHYQ56OnLrqifa2kx6xfDpZ 1ySgjy75cIseLY2ORmhKQhR7GZI7VLbKDUziMfA730WeBJ2JH+vJ2Axu3HfD5LzrfgUb 04pAbf2rM1dRaBBB+jYIOOFCxSfsfbz46oCSmtjRIXfx7r12csY56V95chFvTXWM5Mc+ MPqNVPDm5Y0t8G/xNsvK9acWZszuF5ftraE8ty5bu4TDr488hIqE/r91VevDTfMBnpO/ 0+MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176354; x=1764781154; 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=Q1EO9w3AWFHzqPnwZ1vXHF7ILUA1ff3kKPhVidKfhuZ/27+WZWudVJ038D4C11rj8X VafXI+qeD2vIgi5rgd8yAOWDQZ8Ezys4ibev0SxJ/8noeOipjvxttKR7aNF3um/fvQwW uGG8P8eSkrqP0UAavn3oEGq3kCOEZmSdoJFPqJkX9RIpzGM+tE+YZAsAcy5c/EUBjxfx H2AEDi09XbdFQjHu9Dob6CHSqOz05SZhRDtJ84lrwJ/tNQhMKK+u4yPZs5zenXgDfMKW nOAXOLTowBodSf4Qy4NAWlg21z6Gj5AnlEfEWSzqAP80m1zgIADOeUv2BfeIBjtecUtP RiZA== X-Gm-Message-State: AOJu0YxHIgum2z5WScxv3kHqdRH2CAOEidFQucQsIsN4x3OY+TphefAA Rdtkncw3XNrzNMif9EDROQFeoTNWGgFor2LgQBPJmTFgGwxC5t3QEjbijXTEAJ1nCpjBe1FqRO9 An36of71HmA04WWrCB7J3vD80Lz3HlzcAR+uikP2+bLTKvo+0WyKkBtMNN0ONGqL2QXA= X-Gm-Gg: ASbGncsAurr0SflJkydbvaLZu8ToeG3xVw8a3QyivQUWiWRstmRtmy+TJFLje4xTdyL kUKFH3tpx6YVPC/93NP03uAVrOlce97zEPJYLUacuqaG68AnXiVqCoxMmI2L5wRTxGSU/Z6ryAI YBcz72jdmGOGPH4W1FHU0bouhNfeGXDzUV34UDairhmDDsCHvxNxQWEvidtLLaCC+veGpOuzjX/ azyxJY+YPkWdFcCwig4yXLwsoKk20+kT0be1LqOBgSlcisr2S2Gi6sCh3eMpRUx26a87r3LH5K2 r/bV51te1Dr7YLXcFip3w69HL+XdXyiZdqqFgZKQpNhwH3shJ6836SZrJsZfzp4JWJMQwroZ3ry ncbXF13Jn5xyzpgifUK4ERUFk2X3CxMIPpg== X-Received: by 2002:a05:620a:2910:b0:7e8:46ff:baac with SMTP id af79cd13be357-8b4ebd545e6mr999112485a.1.1764176354324; Wed, 26 Nov 2025 08:59:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGt/gU81JQ70dUpUGO0vKvjPidySNwT0x6iFOY2/04I93A62yvmfMI3LpgRB7BswyFxe8slRQ== X-Received: by 2002:a05:620a:2910:b0:7e8:46ff:baac with SMTP id af79cd13be357-8b4ebd545e6mr999109285a.1.1764176353867; Wed, 26 Nov 2025 08:59:13 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:13 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:48 +0100 Subject: [PATCH 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-v1-5-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHVIqhZwoncq3gm6ksABMOBQ8NNIlA+MDFPt ZnTX/xQZKKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx1QAKCRDBN2bmhouD 1/fmD/49q1UtrUEpI8llXnpgz8NlCQZsADq3DhxYy6vzQ3DmnJjAMMSwn2ZxSngBiSeFykVqx2t Or7fzn0SOXe6dy2Hym49prlpvLm80gwA5xxpGYIjQJCwHknTp3l7THlaK+MLgGM7gzLOcSckQiF dNlLDocsHWTdwKR3CPTq33uBPCGSYNoFxOK9YVnsaWmCkfOLaTF5UV1XvHA+l0TKg2a1D3cXVpV 5+IVrKPQ0bPg/hvw1YEzqc19yxOBtuAq4JIU1u30ZB11auVZD6yHl/6p9U9zZHNxS/K+o4h18NY SmKX1BevRb+FYZWQDN7/amA+ML2cO3zDApzFNABZvhejAJMvF8qGV0q647QsfK+xzvYIrBhGrhg e7kMflI9wdrPkJ1mR5/XuAB48UXSilIxVW1Gmhbd2XMZo5GlyBnAOE0suFflJK7TXQ/ZHVEjKVf G3s04jFC7s+Z2EXPavS4vb5h4KFdD6WAR7mZss9MfdK52RePivImZhQ9dz/gG4/n6kVJdrBjowJ 0w4yV5JZC5ZGc1Gm7HqTFv5QSMOio70JGb1DR+7SjkB5G2FbXJrqC4dum4PHz5oAr/xpppMhBbH 8vU5E/CcBSlUumpc+VMUO5MojM9U0pL0usuxgXv8x3Ea9xNALKw1hoS4O08ZODQePLTxmk1tNkT tHcQn1S8Zoyc41Q== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: b1C2edQSlMOkLfHdA_OOBjbQl1V9uAzZ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfX09rAXgLbX2tU Zw8OEqScBxoTxO6vIs3mSwYWQuLidBtjWe2cQ85Sng1u66YqUgtw2dbc7/2bJRr7wYRKIXufE8h VD8JMZKosLkWzgqUUYD3avOqptwRZQds5OQLg0Se0PIv1HDjYwPjDQPd9QWmIuOKGXtuX6GKCZW eNctpmpqhgiHaJ9twG40CCwIiyIN8RLeVLHin1cyv0jNf8rvH2wjVjbfp37X2XmAqFkKUm9QCsW P6NKP1Eno1c9qz7p0733kOABokhiduB+CDSB8oHJU2ApnQ1l6dDb7iBmVhfeK66mTs4Vt0Oai2D 1JEzMqLJWEFnFpDYgEIpm3/DkwAKbL0aFW+WkG7iIKjo7llnQD4CmuP8Ev+mPXBshmZCobLTXqO y4R5qRSLv9ZR29dZPbh09TbHdxJDHQ== X-Proofpoint-GUID: b1C2edQSlMOkLfHdA_OOBjbQl1V9uAzZ X-Authority-Analysis: v=2.4 cv=bZBmkePB c=1 sm=1 tr=0 ts=692731e3 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-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-2511260138 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/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 mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 9D02F340D9E for ; Wed, 26 Nov 2025 16:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176359; cv=none; b=mOpBRVXmrHmbvAxcTb3Dr+AQlv4oo7ur8KON5Z/iY/h1QpMSpsncYLMZu4pxWQew/FDgxRCUYJOWwbXAcCoCcigOfI9RSPPYb9U13i0UHXeTxxjh1wfry2mgUBhHZxnSTDIyQNNTx8DjhSHvq3cthLo6nGvQrozZJNOmB7mP2yw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176359; 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=qV/PDrwA7pMav+ML/Pdisnc5GtBDbiASWJTZmZUx7On2f2GK7+Y+7yq8MIvjMJbWcmi8fTp3yZFLKfhaweCdPitrMCa5UqS3PQ5q1ElU1Esvw3qLRU9ddWn6GWQ2CLX6QNLJxExoWdfhZGt93VFztrJBXqAVYYBeqxF9JO3cT/w= 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=bE7ZJFbi; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UkyrAGir; arc=none smtp.client-ip=205.220.180.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="bE7ZJFbi"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UkyrAGir" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AQF8Ib93738573 for ; Wed, 26 Nov 2025 16:59:16 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=bE7ZJFbieUXASyQ/ uZbq3dFeXJysBXbv1yZvE+5yJi1LHWQPYNn0rGmzlUxg6xY34f/osbFiYQRcdNhb XvXl9n8X8Cs4yTR8YmOmJFwXb99oAmAf8QJ0rKxtgnrMxLziU7YKILVov4/xEXyw SAzzHVzn74aK4rOAXiTFqjkTMMhwpBgNOJ497bth49kkJc77Y3iU1V7Ao9ocP0oQ jGfimarR6qq4sd/2PpBSjJDQFRPZnJGG82J+AY+tmDQ0n6XJ6/9naHi70MqIuW/h YJ8RU1aKMCDU3wrDtoJ9ge6Q8bX6iJ9f+RFUvmeLuNCW/d+TR94Bb70pfdOlbCv1 8E7qWQ== Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anggykjs1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:16 +0000 (GMT) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-88238449415so277104556d6.2 for ; Wed, 26 Nov 2025 08:59:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176356; x=1764781156; 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=UkyrAGiry3xVhGUjV8Tbu42NcIxk1k611DfgCOMGo6JBbwfx6snIB/75PyE233MzuH CtdDSdLPrgw+zBz5p3JG6bes5MpTK8Fb4zcuWwCXzcsfQHpycfKpiffm7qrnWruq02gZ dHrYSXg9/icHFQ3OPGuG9qOgdikLlIWb9wob+dnWSsUcGFBtv8jXt8cqvMEGs8JlNPMR xjv11ariHkVrj+aNIr/FMzdLiFdLLP1nhNTTX7Q+EJOy444rskskLifYU6HShVjzUZVr FKwe6qe1PfZeQ6R4tmThT2opcM05wSSQSCfS5Blhlyj81fUelTaQ5nyi24BgX5LJmfaa ShFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176356; x=1764781156; 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=RIzHDfiuDbA9IDmTpkVwWBOFqNBDShxs0eD/pgznoTityXDoq1xFwyqY/iO+/uzQuE g76xWPkpL68yFsiKaO2m6T0Z7YwudNcKf3sGjXPq81ujVOMeGl11atekMYg4q50tWBLI 6aUlP0+Z+dsV8XEqNIZfbVFOTJE7+PHk3fL3tXrMqdKHD2ltH/mshkA2ruWOuvH15l5G 4xurKxDlirUsALShWeZ3COpSiSroSKogLX7N8gHf3H9uCNURstrhY9ggJKi0RL45LGvU Xz9JVCnoMPe2KpCIInGD6B9sz9+1/h5hGYShzWjqoGtJ9vHBaMk/ZCKbWMhC+zASjDQj daBw== X-Gm-Message-State: AOJu0YzLH971xa5vBQx2StfkQBS566eJ70rBttLJmrDYeLsRV0GciQ7r QpODXBU2gvcvl3VluZFSAVmwrMRELox1Jz2laoKi9hpHL/crgFMPJwtjGWwsN5zgcObssURg7IP uS0TOMU5/iHrq6do9KkbPkPl7znCRl8EM018ge+MdT4gw1szjMmb05O7Yhcx+NCsBuek= X-Gm-Gg: ASbGncvZ3lx/hR1ITi8G73Tuz1E/QUF7c5goU38MO4NLpmD4VuNs5aWxvIcsCa6rwUQ tnmZgHowgPzZHPbewDT/7wcj73WkQ9hEE9bo+Tmnh6DOfpHonSQxc96krLap66nIaK89Y4Rlzvc FAi+A9vJJSmaEmkKnfWE2qJxTB5k6QYidCpvWaDiy/pKbzZFEedNu7prMZVAWtHwBTRmFxHYfhr /EC53+ch8NFyvwodZuuDrjQ2ByfXEG9rWLuBVtmna8AyIMdgLeSZRcsre/WD8vYgwpla25xMfeM rkzej0T3HK3uPXZs0kYc5uRRHZjpb2YyMk41la461E0VJV13jXNowkMGvHmy0VOm00WG9U2QNYn H7KPz+1GlVLIJ2KxdAzkJIRvRGVt8ZGCjYA== X-Received: by 2002:a05:622a:d5:b0:4ee:19ba:d778 with SMTP id d75a77b69052e-4ee58ad46f4mr280143571cf.48.1764176355725; Wed, 26 Nov 2025 08:59:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbl8mU5pugMLdfQ2QpKnpUut5p5RybtVnYi8n3iBTFPdWBvXLbhyoNwExNjjmB+G67NM+G6A== X-Received: by 2002:a05:622a:d5:b0:4ee:19ba:d778 with SMTP id d75a77b69052e-4ee58ad46f4mr280143281cf.48.1764176355354; Wed, 26 Nov 2025 08:59:15 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:14 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:49 +0100 Subject: [PATCH 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-v1-6-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHWHMmqetzJbHOIwek+/YS2OOoLxtr/oKpGB iWlpMG8/oqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx1gAKCRDBN2bmhouD 19srD/0edvT0P4QY5aFENvleQKhfKFBzcXVW7mxUBamOidpj2W8rqPGlganIzFaJIxpw2amT2jQ oYZbmj1prpf5k0tFTG56IPoA/NM14p8E56OU6+7ySCBjXrhTOFJF8pkr4do4yP/IagOym3WD86a z44teVg/DW8X7ZsY9OPkl8bGjm/TtzwIGVZrJ2K+xcsnjVkgR475lTmuhCM9x/2X+YAZFpCnfqE xz8dSLFLyM46GMVKACPpOmS0u1diRcpMiLMi2ntKgPGD2trF8IsPb3z2g6W+kQf2c73i0ovRGF0 IuIRYDDvVX+INcGMAi0d4bqJFjDwpSi8Vqnx9oIg2P/+xHZNnfRMliYMbkUbAbbMmu9tRLkx8OM w9EjZ9S5Pnxkp0kSXfrvFyl7ARPntdCnO6pPeiQQUbj+zMC9CjEUchoTYSmdNDE1G0bH8dqwWlb nFN0a/zNX8jGppMwl40TkZbd9Wr3sjCbg+yticeWXJnF/Y2tXyd48AoY86dDju/jV4Ce2/j4udj 1xQRzSRPFUW3v4RCZdUjQXAV+Bm0CNBLtUV/MoVGRunG+K0PP3iaKjM/Ac7gT9+psYRAlGpJhDI tKF1tyxj7nD+ONz9HthhboQbSelL6h8ck9qO7zhpeBnt/nWv9ruTiIZPwSlrdXPdgy9K3vm2BAu am4OI+eGYdNuThQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: OKk06rOGOSUni1GsRBGsPK2__qi1A_ul X-Proofpoint-ORIG-GUID: OKk06rOGOSUni1GsRBGsPK2__qi1A_ul X-Authority-Analysis: v=2.4 cv=bNUb4f+Z c=1 sm=1 tr=0 ts=692731e4 cx=c_pps a=oc9J++0uMp73DTRD5QyR2A==: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=iYH6xdkBrDN1Jqds4HTS:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfXxbi8+4rEfXwC qkVgcrNBU2hsLVCg9ZfTgFW7R4lcJD2UEl9JLCHVQk0QFZmoH16Nzj/VDH/RtYEAIPX3ZYpFN/C 3h5gvDboKiWSGHZzkUn237r+YuVFKBzJi+p44kzMDZ2MEUSt0JPQ3t6UkDjFUqCRk8CwDzRcKFs q5mwU76agc7gwKJQReqsrdcusDLoh83m94pURXpz/FlW9Y/9rZTKB8Riwlo6mqLiv5vtW8niyWf +Oe06TvjHdHsEwNJolsFPsJ2VenZekC8q9RzR0f77Mia1CwoRrQ/c6DZn2ZdoWEcaUtwTtM8TC4 m8QA+G1CKcru6kfqY/Tw4u87TQHPzDy5bwaKKclsbyuBZkWCMXlFS0YUDVznYTIqGn7HH+dUijJ zcfJgnb3Z6vOqAwv2/uSX4w9nNYCiQ== 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 priorityscore=1501 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 clxscore=1015 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260138 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/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 12E3B341645 for ; Wed, 26 Nov 2025 16:59:18 +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=1764176360; cv=none; b=o28JcRU5HnKlN2CGlhXx08+LFPp7DWMeO/YPPwWG26+Fqapf4tk5mu3B1uCfotI2sA5aow0c+Zt6zD/FK6xnqDG3qi+AcL/BNmNork+zFrRBmG4G3WCF1EtIm3Y3BaqvvB5ze+ykwgMZfIBNHj+B9uH8UA8h1ehhMsaQjlSfXs4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176360; c=relaxed/simple; bh=QHCV631sE287htt5ntixmRlFJMMXMDvt0ofW7ZLTi8E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NV2k5VET12QDs9HLGynHXhIqGOVUrAtbZBd02fUcA3MpqZLW9E/9l6lodWZJY0wLuldQCwtPKFab1lkWd8NUv5bdxhLWusYpERQYlapVtI1VibItrd8lgMzG9SpimC2J6+TY6WtiSFHrg3bFYg4BrQZ2PdJ8Af4AlaqGmxLRGDw= 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=pRN33DjV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=i+9I4aqv; 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="pRN33DjV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="i+9I4aqv" 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 5AQ92Lgq4047385 for ; Wed, 26 Nov 2025 16:59:18 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=pRN33DjVGMibJ0oK NNVNiQe3jkGzejkIfU6j5WvHrPDh+/50yARQ4OARD/jcWoz9jAZ/gHtIwLxF2ErF HVvNMOl9koEhkPVkBaALd0E839/q5DzuryIoNyCBGYq3sWn1873/XtmyjIsgHDSe N7Dn5UBDdimHAXv+r9Uch27QK10XYxOK0n86v+42PsA2B8m0ttYbZvRszY5xXxog s2Mcs3SucVZkzloGaax2k1sNnfg8rVcs6KA2wvrOSsy40sTUqvdhM36xTS1S1ZB4 1/HqsuOCWcx98XXUdg223RZ0XbKxZnLF+UjfVWGCBGZTvBKvjqvPWbd7jH3DFjs/ JNpjsg== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anp2njqd1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:18 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4ee0995fa85so1114641cf.1 for ; Wed, 26 Nov 2025 08:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176357; x=1764781157; 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=i+9I4aqvZe0pv26wO3D8pw7Xdz27+RfRZUJ2th+um++q43xewOluUl+ms5b9jEk0Oq UZ+E+oJmID8QKn8cUkj8qfq0srZUFn+HZFunzCTJb9ZZf8i4E8YRVkMitRgDTPy/MEhN vBYQluxoKTvLxkZtt6uvCcrY7WnYYs03FhtA/0O6WCZtx0a0nKqfvJJkVhhM1kI+F5Jp U1aHmW9AR6dFnQ0CJAxguDLV93/G1cqQFLfq+HSemu1QACG1X+fRJI6Rkbq7ZgxxsX9A yOQF4onSomGevdS04CnkcnjWOr9tK/5bgM7d3qMpQeyBKp9wpGus/tzKrrEHiXayJBsA UdDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176357; x=1764781157; 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=o4nm65pBCITyFZJv5mSH59O9wbj3yBBFhz08punmv1Kc3nTyIEVeCvKGWWgYozcyng +kKYmGTLoPgHr4t+KebkBLnbsXJZgzbP4/bB9MGSRewLG5mOfVBcbuxMjubF/ME/9Ybn qdh48rM375PqIDa02kFi5FNmnE050Mw07HYb1z49fXsrwQIA1+aN2D7OeNCeoAZFr0ZC 7aSEB3f4QOsYCAkqULitHjKQP5aHWkCKn9NowPjI71baIUb5qBwtdOhA8xwLnY/dCviO LD3WMhPf+aXCQGEWufTuvPOCJqdGNw+/C9Q0X5FP2e4845tgzhjXCMdw7NzmTJrhLsOg 4mFw== X-Gm-Message-State: AOJu0YyXkgYXOUFIDhJotuiF/ljnBIRRFmSstNj6koZ1GDPAlOiEhjmd rZ+mdzvzjB0WKIVljNlk7TMwr8/ioIcs2PGFDBKv/rOs9BPinRrABWWv0pln0xnkaETYbscitT+ aaZkbaCQvB5hbTdFOHmHvhgJEpo0GVmoZHlYdXiFhtpRk1lv5diNIgh9j0u8wbvc5vFQ= X-Gm-Gg: ASbGncsGVmao57M+H/endUyWsdsY0bB+00ydenTh7A5ysVqpdAu2o6ogaHli0S9D5WZ x5oJIb9RQ4/JC+r1F0DWUXGQONSNpambpEIvqDeO3C4lNzMNnQ8Uc2VVesLTqCuXE9ss9GDa9Qj PWd0L+Y+u1M5lLmV9zztzjCtgaliO+jIn7cuC3qXtZZfOElQPyuHWNQFZzr3lKa0g3JGrIq6bxu 9BaQb5tmk1tUrwhK/DsGuzM7QEbP7Ee6w8r9dswBhkkOl+v5/cgJRPYfx6LWLRpG1TwN2a6Sp4g JE71v9oNivr/6ETfDO2yyRCO/znVtKsluTaBLtpsf3edVX73CAIdhO2ZNVZenV+a9XFvVnorPCF wxuODcXBTCp2Domh/PM8SMah0xJSIyi3Mow== X-Received: by 2002:a05:622a:118c:b0:4e8:a8fd:e00 with SMTP id d75a77b69052e-4ee58adff7fmr235322431cf.43.1764176357312; Wed, 26 Nov 2025 08:59:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEf5BR5sc1uyqeochjtqGYLG5XCky6dGNK82Mg1F3Fr/vu1xdHr/JvNRnSKTAPNwurtDJu2hQ== X-Received: by 2002:a05:622a:118c:b0:4e8:a8fd:e00 with SMTP id d75a77b69052e-4ee58adff7fmr235322061cf.43.1764176356792; Wed, 26 Nov 2025 08:59:16 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:16 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:50 +0100 Subject: [PATCH 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-v1-7-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHXm4DjOiibZMtVzMV8QxB+V6eAo/uZvNGVY RbRJZxsbmqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx1wAKCRDBN2bmhouD 1y0iD/sENBu5+81NVSOLl+hncVKxyBQkJnx/yfWVjuDk7tH9b8bB+QeSX9V14AWPM9GEXqQoufX mGXQFaczqBK+ad7yDVb1SIfkbbbG5Z4TEecPDGRfX8npX3PPJo7BPeFtm5RO3+cJgDPqkGDl10+ nIMXIhqwBvR1uuOFHAH257wWbI9hEG+8p/MkHaLVxvGrsSZBvgxL29NHVR1gDObaEUx80O+YsYC 96QheHaZD8oy0cFJe0UdklHBVXZoxL6f4xYCkmxwCIAUkvPRFv+HtBDEkJtCN6Cpc1dnM33Lpe3 u0df7/MYRHHcGAgCTHEk0KhY0dBbxFnRWMw+s0TrJi1bNjia9bSB/AeAQEcnW7nfE/h9JJoIykt 4UhoEfvLTSkN0XxG7zjbaszX7Iaoqhm762ulj+O0lDtk67qlZAOCWWQev0okoh/4CrampvSVon2 MwPNZgXS/Oz7/baWEUAxf1fQRfDNPGyUpKbYLVdJ7m5asudNaBc9nb/Xg1VjgE/94Q6mANZtEHN HoDHVFSzaSWRcJYGODJKtYvi9c09go1x0m4TQfDNkR5ToycI2hwDdXhwQjnk4TST/E6K8HBrFAE LNXJl8vRsx097kljK75rNRDyo3CFX9Elmwv5INgrFvvL05Qwg/QoAKu7sXqMeEgfg22oXZM+rmE fusPHitLthfBQZg== 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=692731e6 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==: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=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-GUID: TyRCh9lMnxdduTFr6HePhCsxP_6xYAn5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfXxyUKwfDa5zSc 8wS+1uK9uhQROjzor003i5+EafMKY9n6Z37RkQt/W8V0/va+s29MPzpnwR4i5X+ETjeu1t93xWl CDnUz6/0iZ7FEygOoGGbHF/Z7fXOxuQseUnQ03T8Jyda/KwpWn848jWiBiFXKgAm7Q1P75yjRH9 VDa54Kd8ilH1jCZqVvP8dzSITHFIEzpDtMhJyVrIHLpDwyxVfuhkMXMqq4lA44nXaXIVepAMip+ lV7MOMCypBNjydMe8T7T0O3ntoKaoXBooEhsOfkVBAKb9MUeGUn9X8RO97fIhOXDlHVUPNdHytt GLfIvfmt08/t9OtPhIG/fKC3TY/YHQSCFVi1Lm8xhTglH0330vb+7Gfo3c89xv1FOEaCnshC2qT JI6tnxMqo2/c6xDUSmhaW9o9x+rsSw== X-Proofpoint-ORIG-GUID: TyRCh9lMnxdduTFr6HePhCsxP_6xYAn5 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-2511260138 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 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 50EEE30EF75 for ; Wed, 26 Nov 2025 16:59:20 +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=1764176363; cv=none; b=hgsgcsYUQ2R72lBOqVedbHiaqbdE/HeGauQoOH09wQM1k2iwUpzV1FjXbMgsGi/l1pdp5GjQYc5rgkJ6yBZhYQl4hsYGIzMNZciR66NN+YFKucV5VQ0xhxgGV0u+isnSgjxc+W6YLF4yZzSN2FvQJmDdwOYNNQAIlFI5RCrD/RY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764176363; c=relaxed/simple; bh=hmZwf+gqSZxGRRmKDKGj7wIJ5dnf5CYeGgO2dqTIhtc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EHNtcLMswoReDbewoBdktwtErSX9nvKsZF7+wTFwVMfDiAXSmJKPXVHxUVsc43BDtqtFx732FR7ARuavmkNlnN4DgxOwOlIwKPPF+oHg4Hi+hRoiyNs6/hoQyMOrsWTzVUn2gy7oWbzGIEigmIsUp+2bJxk9HQrUshmT0QCby6w= 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=NiTDr1F/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PAufIeM1; 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="NiTDr1F/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PAufIeM1" 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 5AQ8lNAG3668388 for ; Wed, 26 Nov 2025 16:59:19 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=NiTDr1F/7VsrM3ga xeDmYRK858JyNr1fY8dbQey34eJhZcxDLWjsahnqZd/ctVMO7+d2608wWkQGg0xo QY8u+OO0fjhuibpI9TFV18miyoVxTjKs1KfpOBeQ4/PjAQxLnWP2u6MHHsal8Sdg 9lwN0R1lAqQQJIWaQwXYANN4180sa+g5w6EOUuagt8i+bSrLHU5X41kHSbd8qLrL 0HVrbzSGY/svR/M5GRTT4tbTxkNJ49HiOl/CGApxZbwqIl8nrMPRkdmyKao5g9ge KHjzfgCEryf+ewWpGvzxWdXRxFX9pYXn166VPVjvmKlkFO6BG6IbnDspk4Gsa8nn rixK5g== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anmemtw10-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 16:59:19 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-4edaf9e48ecso1396311cf.0 for ; Wed, 26 Nov 2025 08:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764176359; x=1764781159; 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=PAufIeM13BvAGm35p2V0gbD0hQgBWgO1/gb2kwL3jV9HJt4wntUgUQO9kAV/dtdrDS 3VVwfv29ZP75XO41U0w/YCRNl3jhH8u0pRLBYSxxoFERAU/dX+r9EqdzCW2bjSQHPo+X 6H9H2sd5uF5X+fXiJC65KC/ItudL9wCY0jkFKg8cKJzT3ucukSQ/S8riQ/Y6WEZUX873 9EE/n8UXuG7r4oEF4lSztTKEKFz9G/gK9LXlCrrKsvOSy2B9k1plf67NQsHwoQYQVjBD BLsvVyEJnGy4AeDrsfhAZTESKU05wOzOnhkHc4yXpf1fNQfSIAhf/q68JPyx+BH6xAoT 12uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764176359; x=1764781159; 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=JObjTaAHPRnf5Gq6O9tvTy+Lg1BiKsr2nP8F4Cr+LxCVtjVruZypPQIi4bPM69IXwt JzMlOj/5EYDk8yZbenow9Jt3GU0hgielkJfj7/1ii12cbGnTxvxwmhNRRO+AYQqcxIam uy3Z1LNQ/IdGX02SOG4TlgCmBymks90xJi2bmgthIm6y28tK0GfGXYRmwLUD/k1rIhCd RFo6dmEOo8Oz5Qpa2WYB1Q08V9gB+iEjVBU/EUrgpdUCM5nj74nDEtR1vOAQEtnAKQnM qPBkeLrkYXnAuNX/SIn8sQNO5NXqDVw6PGNgopNukDb3ns/5UY3xDM5BZ323NueEtWLO WU5A== X-Gm-Message-State: AOJu0YykoyU5rjWIxLqsYAAP0Y6PSxrhd53jJfwL0nctbCjsI+g1mSf1 A8ZFhYzHyB7q/S6ycZzu6OA8QQj9ibNrWRP9V2X445CDYQbmtd767EAZG0X5ZOxdb5pzSbnh3Nc dWpy52suDKNr5+S7uNyq7rE8TL1KuxTTcvtLz6QXwmHZOsfoFGhc5SIdK4lS03DOtTs0= X-Gm-Gg: ASbGnctfjYfKLy+rdZ2WwPgLWM8X8EK/GyehEBKRPXtkDcvTrlERKW1CoeBMYIWLhjI Cmorze17+h9kprI8MCK/H14KcJrX2XvaaR+EuuM0vl6YIF+s6CwBUkD2LFDGdy5pxZC1983a4JE djcuOfkMbAYLeqBpMrvUGtaEeh2CPAtROJaJ3KnaGmYPM6hgsxjcRfHnGgiCseYF2koQViHkPey szWEPb5wTgya4Kae3LjN/HC5W8Emi1s2faEVeDONHGOgoWCze3jwFP/igNUO68N0mhZBm9OY4Re sXpnSe0h3bfoM9YodB7d5q1nFQuqiRbdGN6Er0B/FsyoNMdgb60MyDYDRpaQNJHzPvWoy9qIIbX rGcw+MijW1YvuRi9B8n99ZS7G0l+1UPYYrw== X-Received: by 2002:a05:622a:83:b0:4ed:b82b:199b with SMTP id d75a77b69052e-4ee58a7fcfdmr280745961cf.25.1764176358697; Wed, 26 Nov 2025 08:59:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9Nz5Yp1BIM1KY7e49OaHY0IEhF5wMZdOUEypF18c/ESGrBdCJhh92JCRgAgFt++hNUAfGrg== X-Received: by 2002:a05:622a:83:b0:4ed:b82b:199b with SMTP id d75a77b69052e-4ee58a7fcfdmr280745601cf.25.1764176358309; Wed, 26 Nov 2025 08:59:18 -0800 (PST) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm42398811f8f.26.2025.11.26.08.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 08:59:17 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 26 Nov 2025 17:58:51 +0100 Subject: [PATCH 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-v1-8-eeec378144d4@oss.qualcomm.com> References: <20251126-container-of-const-regulator-v1-0-eeec378144d4@oss.qualcomm.com> In-Reply-To: <20251126-container-of-const-regulator-v1-0-eeec378144d4@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/ZANAwAKAcE3ZuaGi4PXAcsmYgBpJzHYXmo0mXPdOVlHCVazTBqn0/qr5MvMIY7+v uTv0NxK5R6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaScx2AAKCRDBN2bmhouD 116PD/96Qy81QJpXLgEUygAsiYq1Y0UUEImHwCVulXcY0S2IN6/DD0T46awe8VLEeh3nEsA53Vi C4f00fwrMbwLzzRP7YERqcUGtgksB5Vj7wgs5LZU/6ktN8YsSwtisDnhl9nzRJkbCKsh0bc4hBT AomTnNlxw1HK3lhus33gTYomSuh9zHXQIJ1NKn7NQu8DXrUxReXklh7puUf5p5/f5MQ15nzX14a 0OjZzzfTNr74KKjeuJMwZ0L6y5XELVDhmVQQhwZKAJWMTuE5A320J39yUQuug6pplw7E+zsqM1P rY5fG4PX1JSsScLfpo76Ih/CuYRjzkaO/4dtNt2bReX6eDfAbsbhZk1aP4vugPf/Ug3pG3Xk9TQ mqAqu6oKRggIcVSHlS+qd8DoOXQduIhqtxWDcL0A+a949atcum4QUcg3uRYalbTz+JZeD9nJJI7 9kn1Vs6QrEDmDu+CUQxDd1hDIazOLRLeXmTYL83SLRFWGsIoL6GtFrP49pgWigVqH88Sz3sYQmL bkY5KUf3AehEJrUCYaRHFtNS2KkNWCHdhd4GXzCqvmob91i47C2S+rs2AfpVx/Co/9S1jy2nChJ Ub1MlfbhoxOeWOUgSvcY0rPkyogfegn8D148yhBPxi/TRtsTm1gdwsnVWay6+OqrP0vDscnk+h3 6I7ZwKcG4Lg1B+g== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: 8i9iwtRUopJ-L8WypFfRmw-kEqHGdk7Q X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDEzOCBTYWx0ZWRfX9XgeEZ/K6wF8 YasZDWjAhAtIZ0hXDH8mJIKGZtMgDK+WlvcjxPa3rnd5goewjMGjvJD8njni4zmi/TYMi/CbgcD 7RitNK1MltrPy9CSMmKiKHkKbikmnz2PwkDkw06HUv4nueAdJtXl8I6HEc9FcK+IZXKUPZ6LGbt GdgJToGRadrU9kVAy5L80bj0UeWQGEYGlWNpAuYS2aGZY1GFNSw4qFND+iWFoZJXEwptfEoPlPd OEiHm8FTSyPXVzhEklO4jooIBvFIyBWBRABGDmwSsJ3+uPf+u5HOp0/ymGqpgByzY/ftVctuOrQ N+ySdOSD0+YUnGrLaIzIkPpUJa+Bt0fe9WHto8v0cR2pUgmcPLD4EFQyKwFtKOVKNdXOwAn5voC toL54JdIwnc02B6pEolxnctlPc2HWg== X-Proofpoint-GUID: 8i9iwtRUopJ-L8WypFfRmw-kEqHGdk7Q X-Authority-Analysis: v=2.4 cv=bZBmkePB c=1 sm=1 tr=0 ts=692731e7 cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==: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=dawVfQjAaf238kedN5IG: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-2511260138 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/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