From nobody Mon Dec 1 23:02:29 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