| Message ID | 20260703193855.110619-1-mukesh.ojha@oss.qualcomm.com (mailing list archive) |
|---|---|
| Headers |
Return-Path: <linux-sunxi+bounces-24117-sunxi=pue.re@lists.linux.dev>
X-Original-To: noreply@patchwork.local
Delivered-To: noreply@patchwork.local
Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mxe881.netcup.net (Postfix) with ESMTPS id EDAC81C0790
for <noreply@patchwork.local>; Fri, 3 Jul 2026 21:40:01 +0200 (CEST)
Authentication-Results: mxe881;
dkim=pass header.d=qualcomm.com;
dkim=pass header.d=oss.qualcomm.com;
spf=pass (sender IP is 172.234.253.10)
smtp.mailfrom=linux-sunxi+bounces-24117-noreply=patchwork.local@lists.linux.dev
smtp.helo=sea.lore.kernel.org
Received-SPF: pass (mxe881: domain of lists.linux.dev designates
172.234.253.10 as permitted sender) client-ip=172.234.253.10;
envelope-from=linux-sunxi+bounces-24117-noreply=patchwork.local@lists.linux.dev;
helo=sea.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 3F8BD302D5D8
for <noreply@patchwork.local>; Fri, 3 Jul 2026 19:39:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4DF0C331207;
Fri, 3 Jul 2026 19:39:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com
header.b="YEMeysY1";
dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com
header.b="T3CX7G24"
X-Original-To: linux-sunxi@lists.linux.dev
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 C8217331209
for <linux-sunxi@lists.linux.dev>; Fri, 3 Jul 2026 19:39:28 +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=1783107571; cv=none;
b=M0no3Jqxi/qlSinZwDPDp99BoxxLZY5PhmUgjVYAPUMSJ3xRKkW9K2qxgrt/fWrKJFY2Yu+VFJX92gUVWFlGNUpjB/z72z7i+0VowUONzZRugiE8sjwb5AA2P9IfkL93BgPqCKW8ajuQkSWDO8X3olqr1QY8Hnue5AOgIaeOY2U=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1783107571; c=relaxed/simple;
bh=gf0y849jqsWicWT8x2zXtY5gzlbXBv3ZHwVF2zzNRiU=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;
b=V2TrmR84+Y5eXPFBRTK/y+A4pRhtWsun2J2HV/w67HTB/qWrSxLU87xaEg8oBHzrKkppS4wAaN/fbmM82W4fhmtmwQJQsekVZfdHAM1AZmaTUrVWGCoOY1Pn08dWDF2Xq9QRQ+KuMlXxZuXHVa0ltp0aA1/CURAdZZRziJnUy7k=
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=YEMeysY1;
dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com
header.b=T3CX7G24; 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
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
663HjSVD677600
for <linux-sunxi@lists.linux.dev>; Fri, 3 Jul 2026 19:39:27 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=qcppdkim1; bh=yuDgKoAlw/JRHunDNfGXYB
YzhSRLVnjx2xmNmMEK1vs=; b=YEMeysY1/myhDao0i74e7TNlV74ktXTCfMwdq9
CR3QbS5AITeviE8hf9EJ30WAllVldtcYL4AMMm0/LzjQKzr0t0eqDF0S43incuSV
MyApeWy7M1IbpM60LNShiFzTpmwg+/W0PKTj+Lp+cXYVgARiHsuxhXD426SvD7cT
GGZrPR1QcL7iICOr24d23aBH8a/MPY5danZVa1/zTiMmF2fSUTDZMyH3oHPCfVAv
4nbvlJJiytEOZCVzenusm2J4e5XUbEHMVWQY64oswPjfiGG059bwY0hXxdENEoJ/
sJbKqjoPigEwtHk2s+fe6Ba9Tfz1f/tpFlGt1x1q0Mz2ipmQ==
Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com
[209.85.215.197])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f6dkkh8ks-1
(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)
for <linux-sunxi@lists.linux.dev>; Fri, 03 Jul 2026 19:39:27 +0000 (GMT)
Received: by mail-pg1-f197.google.com with SMTP id
41be03b00d2f7-c891ed872ddso1481029a12.2
for <linux-sunxi@lists.linux.dev>;
Fri, 03 Jul 2026 12:39:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oss.qualcomm.com; s=google; t=1783107566; x=1783712366;
darn=lists.linux.dev;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=yuDgKoAlw/JRHunDNfGXYBYzhSRLVnjx2xmNmMEK1vs=;
b=T3CX7G24pTJlbOcv20xZiaBzoybz8ziVqSSnCAIklI2GOLlBpXJVwwAdwo1dD2dHmb
x1KilBE0G/Be0zynoeup1XyI2dTiyqc+OqilscIFQU2c4KouRQFC4DK3l4mlJl0e+q5O
5a4E5wvBBgsDtjnZyKjMwNO5oM0epET/PcjieHXGOq002o5C2/C+djitE6K/R2h6TZ6B
SqmOEsf6HRD+0tMpofhE8Oyh134LAl5Z0NS3lFdP2SqC8DqUC+SRqSZjNCKSbsOI9fZ6
brA+28zz3HHqpgPApgcPGbKKLl8h6UlpLRFl/WFDMHHugUmroJAyChJKSNBnvC/VNSOD
XagA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1783107566; x=1783712366;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=yuDgKoAlw/JRHunDNfGXYBYzhSRLVnjx2xmNmMEK1vs=;
b=TV+Ey1Xt0+GleC3o9MBEldH35RhYqveE4Zvlq31xhQbjbCbpeMvgC0TIIlSgfCu5cW
wysutq9vE7uuGZEafnsN7t7SfF8CRmZ78c1EI1bVnCUsRtECcFsgvrMaufed0hKP0kC4
svMCY07pMi6FxF2+o7PNDYVVjB69MQHG21dB5JVUh24isWY/ZkncmjBWskkclzahiR/q
joBeIl1F2Q2xSaju00e8LAEa5o0WJkpB5zOevDsDk7DRV+Dql0fZU+F6oZDjDU84uh+F
YP7Ut13auHG0m39Wy6HMooVoS7sjVcnTwzFkxP8+XxmrpaMCBVlb8oNo2ZLWfLfcCA94
1YhQ==
X-Forwarded-Encrypted: i=1;
AFNElJ9kjEgTHlyE/Z1vyNDvXU5C9fz10nzca8L55eoll6PwPsu0gESDcvPPdoOkpDXd7eX50mVA28ogw5yrKg==@lists.linux.dev
X-Gm-Message-State: AOJu0YyUNKYsmhBZ9SdKV9BDA7+emBw69xgNDh1+HFeMeWDYBrzvwdii
rr6TqQ1jCL+NBEUIHmJlvVwq4rBf20A0Fki8umMCFYiqTjzD920V58NhN1aqb+5U8fLELGpmekj
/n87oK2ST4eujntQFIpXCdcCheqbTfUcjcuzq1wjbc7TYejyRx1IKfD9unnUqds3ENg==
X-Gm-Gg: AfdE7cmCgDFgIsjsYeESkwUp3E1kyNAciuCer/TtHMy8wb7fPaPx4U7/iLD3kdbJ7jV
nHggP6DXAJb0AfIKLNXoGwx5jh2IzDqcQbL0Ov+FGczGpup3U8Muwlu4ddWaTgvx7Ofwh00l94s
g8KzkeVrxQFqd8N+xZYc+P7DuLXL9TMO2QMbLsv8EJJ3Qx5x7256iG2djy43/iJCZ6VaKo/wbte
nSJ1iw+4+OwW49LimQsKtI9jVUWCstoq+B5v4SR9yy0I/OCr36r3pgQiPmwymSWpjH4C5pprGPG
qp1V2uyVVRLc5GzpXe4qVctGaFczZ2wCYLH12NdcPrDfp50eEF+bpLJoePLf4W73x47L8aBDBUC
AI9HgZmuYUhE/S7mXK8RVee8lpHgUONYx2BSKjQ==
X-Received: by 2002:a05:6a21:4c81:b0:3bf:e291:496c with SMTP id
adf61e73a8af0-3c03e298475mr701974637.17.1783107565975;
Fri, 03 Jul 2026 12:39:25 -0700 (PDT)
X-Received: by 2002:a05:6a21:4c81:b0:3bf:e291:496c with SMTP id
adf61e73a8af0-3c03e298475mr701865637.17.1783107565344;
Fri, 03 Jul 2026 12:39:25 -0700 (PDT)
Received: from hu-mojha-hyd.qualcomm.com ([202.46.23.25])
by smtp.gmail.com with ESMTPSA id
5a478bee46e88-30f290b6bc2sm10065845eec.27.2026.07.03.12.39.01
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 03 Jul 2026 12:39:24 -0700 (PDT)
From: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Liviu Dudau <liviu.dudau@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>,
Paul Cercueil <paul@crapouillou.net>,
Anitha Chrisanthus <anitha.chrisanthus@intel.com>,
Paul Kocialkowski <paulk@sys-base.io>,
Linus Walleij <linusw@kernel.org>, Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Alexey Brodkin <abrodkin@synopsys.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Michal Simek <michal.simek@amd.com>,
Daniel Scally <dan.scally@ideasonboard.com>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Eddie James <eajames@linux.ibm.com>,
Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
Minghsiu Tsai <minghsiu.tsai@mediatek.com>,
Houlong Wei <houlong.wei@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>,
Joseph Liu <kwliu@nuvoton.com>, Marvin Lin <kflin@nuvoton.com>,
Dmitry Osipenko <dmitry.osipenko@collabora.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Srinivas Kandagatla <srini@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ge Gordon <gordon.ge@bst.ai>, Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulfh@kernel.org>, Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Shengjiu Wang <shengjiu.wang@gmail.com>,
Xiubo Li <Xiubo.Lee@gmail.com>, Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Peter Chen <peter.chen@cixtech.com>,
Fugang Duan <fugang.duan@cixtech.com>
Cc: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
BST Linux Kernel Upstream Group <bst-upstream@bstai.top>,
Fabio Estevam <festevam@gmail.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
CIX Linux Kernel Upstream Group <cix-kernel-upstream@cixtech.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-media@vger.kernel.org,
openbmc@lists.ozlabs.org, linux-mediatek@lists.infradead.org,
kernel@collabora.com, linux-tegra@vger.kernel.org,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-remoteproc@vger.kernel.org, linux-staging@lists.linux.dev,
linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
imx@lists.linux.dev, sound-open-firmware@alsa-project.org,
Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Subject: [PATCH 00/42] of: reserved_mem: Introduce devres helpers and convert
drivers
Date: Sat, 4 Jul 2026 01:08:13 +0530
Message-ID: <20260703193855.110619-1-mukesh.ojha@oss.qualcomm.com>
X-Mailer: git-send-email 2.53.0
Precedence: bulk
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAzMDE5OCBTYWx0ZWRfX7BwJq2h2nUCF
ina39AdAPbtLONWnjwxFYz17DRHUaG8zfGDlSIH4d1SQytrtGj3dda60pZgvbfisSThopkC3YEi
sOGsa7Mai1z5ZAoCwFiVGmBbgG5X6Qc58+hMSLxnN3St4SRSu8DC/FudfWd0YQ4IrNzHSVWv41x
9pg2XZM2qbWCx3IG/Ns4q89gdv0ThOGkUpNfCVMxLhwnm1bEKhIIX3/e1FOf1UiNLF96YZmyt1n
ofGUI56ISeZhSbd9YTdhpyvqFRhG3AyvWAoxgpCavQyuIeyJN9QqQDrRrhp8a07jtz+076Ced+I
wfb44ewjqWjTVjUhSqlowccDHgpeeITxFMMPyC43PKiMoHUdF5dnn+UBxq74Lquq2p6boB1/RX0
n76AKMtwOhLggj5BiGKoBGTeho9nmlhOpm3rKAErx5Q/KYjQOKeL9dgdfEuFQG+2IpLgbMJx4oH
RVaUXrL+AXf7aE5qBNA==
X-Authority-Analysis: v=2.4 cv=LeUMLDfi c=1 sm=1 tr=0 ts=6a480fef cx=c_pps
a=rz3CxIlbcmazkYymdCej/Q==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17
a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10
a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22
a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=c_1ikP4J58vCyc_cPHMA:9 a=3ZKOabzyN94A:10
a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22
X-Proofpoint-ORIG-GUID: BdYWqLF_XgN3tF83rOJd9vCoAUajj45i
X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAzMDE5OCBTYWx0ZWRfX3d2FsisLmQ/l
cRATz0b1D/7IKPLl211IRhXM1zUt63kB6yqMMdHIe20w+Xqg9FL5OsW6FzzTxaYuItvcocTKnwL
Y9EFwIkY0hH73zF/ACLqAqu8I7zexNU=
X-Proofpoint-GUID: BdYWqLF_XgN3tF83rOJd9vCoAUajj45i
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49
definitions=2026-07-03_03,2026-07-03_01,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
spamscore=0 phishscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0
suspectscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 clxscore=1011
classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0
reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607030198
X-MORS-Enabled: yes
X-MORS-DOMAIN: patchwork.local
X-MORS-HOSTING: hosting172546
X-MORS-USER: hosting172546
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
|
| Series |
of: reserved_mem: Introduce devres helpers and convert drivers
|
|
Message
Mukesh Ojha
July 3, 2026, 7:38 p.m. UTC
Drivers using of_reserved_mem_device_init() and its variants must manually call of_reserved_mem_device_release() in their remove and error-unwind paths. This is repetitive boilerplate that is easy to get wrong, and several drivers have open-coded the teardown inconsistently or skipped it entirely, leading to dangling reserved memory references. This series introduces devres-managed wrappers — devm_of_reserved_mem_device_init(), devm_of_reserved_mem_device_init_by_idx(), and devm_of_reserved_mem_device_init_by_name() — that tie the reserved memory region lifetime to the device, releasing it automatically on unbind. The remaining 40 patches convert drivers across the drm, media, ASoC, remoteproc, firmware, mmc, memory and misc subsystems to use these helpers, yielding a net reduction of ~90 lines of boilerplate. This series depends on https://lore.kernel.org/lkml/20260703164457.4040457-1-mukesh.ojha@oss.qualcomm.com/ Konrad Dybcio (1): of: reserved_mem: Introduce devres-managed initialization functions Mukesh Ojha (41): of: reserved_mem: Add devm_of_reserved_mem_device_init_by_name() firmware: qcom: scm: Use devm_of_reserved_mem_device_init() remoteproc: da8xx: Use devm_of_reserved_mem_device_init() remoteproc: keystone: Use devm_of_reserved_mem_device_init() media: synopsys: hdmirx: Use devm_of_reserved_mem_device_init() remoteproc: omap: Use devm_of_reserved_mem_device_init() drm: logicvc: Use devm_of_reserved_mem_device_init() drm: hdlcd: Use devm_of_reserved_mem_device_init() drm: pl111: Use devm_of_reserved_mem_device_init() remoteproc: mtk_scp: Use devm_of_reserved_mem_device_init() media: aspeed: Use devm_of_reserved_mem_device_init() media: nuvoton: npcm-video: Use devm_of_reserved_mem_device_init() memory: tegra210-emc: Use devm_of_reserved_mem_device_init_by_name() drm: komeda: Use devm_of_reserved_mem_device_init() drm: malidp: Use devm_of_reserved_mem_device_init() drm: ingenic: Use devm_of_reserved_mem_device_init() drm: kmb: Use devm_of_reserved_mem_device_init() drm: sun4i: Use devm_of_reserved_mem_device_init() drm: xlnx: zynqmp_dpsub: Use devm_of_reserved_mem_device_init() media: arm: mali-c55: Use devm_of_reserved_mem_device_init() media: mediatek: vpu: Use devm_of_reserved_mem_device_init() mmc: sdhci-of-bst: Use devm_of_reserved_mem_device_init_by_idx() remoteproc: ti_k3: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8192: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8196: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8183: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8189: Use devm_of_reserved_mem_device_init() ASoC: SOF: imx: Use devm_of_reserved_mem_device_init_by_name() staging: media: cedrus: Use devm_of_reserved_mem_device_init() ASoC: cix-ipbloq: Use devm_of_reserved_mem_device_init() drm: aspeed: Use devm_of_reserved_mem_device_init() drm: arcpgu: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8173: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8186: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8188: Use devm_of_reserved_mem_device_init() ASoC: mediatek: mt8195: Use devm_of_reserved_mem_device_init() ASoC: SOF: mediatek: mt8186: Use devm_of_reserved_mem_device_init() ASoC: SOF: mediatek: mt8195: Use devm_of_reserved_mem_device_init() misc: fastrpc: Use devm_of_reserved_mem_device_init() ASoC: fsl: imx-rpmsg: Use devm_of_reserved_mem_device_init_by_idx() ASoC: sprd: Use devm_of_reserved_mem_device_init() drivers/firmware/qcom/qcom_scm.c | 22 +++------ .../gpu/drm/arm/display/komeda/komeda_dev.c | 4 +- drivers/gpu/drm/arm/hdlcd_drv.c | 6 +-- drivers/gpu/drm/arm/malidp_drv.c | 4 +- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 13 +----- drivers/gpu/drm/kmb/kmb_drv.c | 12 +---- drivers/gpu/drm/logicvc/logicvc_drm.c | 21 ++++----- drivers/gpu/drm/pl111/pl111_drv.c | 4 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 4 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +- .../platform/arm/mali-c55/mali-c55-core.c | 12 ++--- drivers/media/platform/aspeed/aspeed-video.c | 12 ++--- drivers/media/platform/mediatek/vpu/mtk_vpu.c | 3 +- drivers/media/platform/nuvoton/npcm-video.c | 9 +--- .../platform/synopsys/hdmirx/snps_hdmirx.c | 16 +------ drivers/memory/tegra/tegra210-emc-core.c | 21 ++++----- drivers/misc/fastrpc.c | 2 +- drivers/mmc/host/sdhci-of-bst.c | 7 +-- drivers/of/of_reserved_mem.c | 41 +++++++++++++++++ drivers/remoteproc/da8xx_remoteproc.c | 10 +--- drivers/remoteproc/keystone_remoteproc.c | 16 +------ drivers/remoteproc/mtk_scp.c | 3 +- drivers/remoteproc/omap_remoteproc.c | 13 +----- drivers/remoteproc/ti_k3_common.c | 13 +----- drivers/remoteproc/ti_k3_common.h | 1 - .../staging/media/sunxi/cedrus/cedrus_hw.c | 6 +-- include/linux/of_reserved_mem.h | 46 +++++++++++++++++++ sound/hda/controllers/cix-ipbloq.c | 2 +- sound/soc/fsl/imx-rpmsg.c | 2 +- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 13 +----- sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 2 +- sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 2 +- sound/soc/mediatek/mt8189/mt8189-afe-pcm.c | 16 +------ sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 11 +---- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 2 +- sound/soc/mediatek/mt8196/mt8196-afe-pcm.c | 14 +----- sound/soc/sof/imx/imx-common.c | 9 ++-- sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- sound/soc/sprd/sprd-pcm-dma.c | 3 +- 43 files changed, 162 insertions(+), 249 deletions(-)
Comments
On Sat, Jul 04, 2026 at 01:08:13AM +0530, Mukesh Ojha wrote: > Drivers using of_reserved_mem_device_init() and its variants must > manually call of_reserved_mem_device_release() in their remove and > error-unwind paths. This is repetitive boilerplate that is easy to > get wrong, and several drivers have open-coded the teardown > inconsistently or skipped it entirely, leading to dangling reserved > memory references. Just as a general thing, rather than sending a huge cross subsystem series for something like this it's probably better to just send a couple of examples, then once the new API is introduced and either has a pullable tag or has made it to mainline go and do the conversion. This avoids clogging everyone's inbox with very big serieses.
On Mon, Jul 06, 2026 at 01:14:13PM +0100, Mark Brown wrote: > On Sat, Jul 04, 2026 at 01:08:13AM +0530, Mukesh Ojha wrote: > > Drivers using of_reserved_mem_device_init() and its variants must > > manually call of_reserved_mem_device_release() in their remove and > > error-unwind paths. This is repetitive boilerplate that is easy to > > get wrong, and several drivers have open-coded the teardown > > inconsistently or skipped it entirely, leading to dangling reserved > > memory references. > > Just as a general thing, rather than sending a huge cross subsystem > series for something like this it's probably better to just send a > couple of examples, then once the new API is introduced and either has a > pullable tag or has made it to mainline go and do the conversion. This > avoids clogging everyone's inbox with very big serieses. Apologies for this; this is my first series touching these many subsystems, and I also learned the hard way when the entire series was not sent in one shot due to the daily sending limit via git send-email[1], and I had to cut many cc lists for patches 33/42 to 42/42. [1] 4.5.3 Your message has too many recipients. For more information regarding 4.5.3 Google's sending limits, go to 4.5.3 https://support.google.com/mail/?p=TooManyRecipientsError 5a478bee46e88-30f0bbd2362sm49597158eec.20 - gsmtp Thanks for the suggestion; point noted.
On Sat, Jul 04, 2026 at 01:08:13AM +0530, Mukesh Ojha wrote: > Drivers using of_reserved_mem_device_init() and its variants must > manually call of_reserved_mem_device_release() in their remove and > error-unwind paths. This is repetitive boilerplate that is easy to > get wrong, and several drivers have open-coded the teardown > inconsistently or skipped it entirely, leading to dangling reserved > memory references. > > This series introduces devres-managed wrappers — > devm_of_reserved_mem_device_init(), devm_of_reserved_mem_device_init_by_idx(), > and devm_of_reserved_mem_device_init_by_name() — that tie the reserved > memory region lifetime to the device, releasing it automatically on > unbind. The remaining 40 patches convert drivers across the drm, media, > ASoC, remoteproc, firmware, mmc, memory and misc subsystems to use these > helpers, yielding a net reduction of ~90 lines of boilerplate. > > This series depends on https://lore.kernel.org/lkml/20260703164457.4040457-1-mukesh.ojha@oss.qualcomm.com/ > > Konrad Dybcio (1): > of: reserved_mem: Introduce devres-managed initialization functions > > Mukesh Ojha (41): > of: reserved_mem: Add devm_of_reserved_mem_device_init_by_name() > firmware: qcom: scm: Use devm_of_reserved_mem_device_init() > remoteproc: da8xx: Use devm_of_reserved_mem_device_init() > remoteproc: keystone: Use devm_of_reserved_mem_device_init() > media: synopsys: hdmirx: Use devm_of_reserved_mem_device_init() > remoteproc: omap: Use devm_of_reserved_mem_device_init() > drm: logicvc: Use devm_of_reserved_mem_device_init() > drm: hdlcd: Use devm_of_reserved_mem_device_init() > drm: pl111: Use devm_of_reserved_mem_device_init() > remoteproc: mtk_scp: Use devm_of_reserved_mem_device_init() > media: aspeed: Use devm_of_reserved_mem_device_init() > media: nuvoton: npcm-video: Use devm_of_reserved_mem_device_init() > memory: tegra210-emc: Use devm_of_reserved_mem_device_init_by_name() > drm: komeda: Use devm_of_reserved_mem_device_init() > drm: malidp: Use devm_of_reserved_mem_device_init() For the hdlcd, komeda and malidp drivers: Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Best regards, Liviu > drm: ingenic: Use devm_of_reserved_mem_device_init() > drm: kmb: Use devm_of_reserved_mem_device_init() > drm: sun4i: Use devm_of_reserved_mem_device_init() > drm: xlnx: zynqmp_dpsub: Use devm_of_reserved_mem_device_init() > media: arm: mali-c55: Use devm_of_reserved_mem_device_init() > media: mediatek: vpu: Use devm_of_reserved_mem_device_init() > mmc: sdhci-of-bst: Use devm_of_reserved_mem_device_init_by_idx() > remoteproc: ti_k3: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8192: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8196: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8183: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8189: Use devm_of_reserved_mem_device_init() > ASoC: SOF: imx: Use devm_of_reserved_mem_device_init_by_name() > staging: media: cedrus: Use devm_of_reserved_mem_device_init() > ASoC: cix-ipbloq: Use devm_of_reserved_mem_device_init() > drm: aspeed: Use devm_of_reserved_mem_device_init() > drm: arcpgu: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8173: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8186: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8188: Use devm_of_reserved_mem_device_init() > ASoC: mediatek: mt8195: Use devm_of_reserved_mem_device_init() > ASoC: SOF: mediatek: mt8186: Use devm_of_reserved_mem_device_init() > ASoC: SOF: mediatek: mt8195: Use devm_of_reserved_mem_device_init() > misc: fastrpc: Use devm_of_reserved_mem_device_init() > ASoC: fsl: imx-rpmsg: Use devm_of_reserved_mem_device_init_by_idx() > ASoC: sprd: Use devm_of_reserved_mem_device_init() > > drivers/firmware/qcom/qcom_scm.c | 22 +++------ > .../gpu/drm/arm/display/komeda/komeda_dev.c | 4 +- > drivers/gpu/drm/arm/hdlcd_drv.c | 6 +-- > drivers/gpu/drm/arm/malidp_drv.c | 4 +- > drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- > drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 13 +----- > drivers/gpu/drm/kmb/kmb_drv.c | 12 +---- > drivers/gpu/drm/logicvc/logicvc_drm.c | 21 ++++----- > drivers/gpu/drm/pl111/pl111_drv.c | 4 +- > drivers/gpu/drm/sun4i/sun4i_drv.c | 4 +- > drivers/gpu/drm/tiny/arcpgu.c | 2 +- > drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +- > .../platform/arm/mali-c55/mali-c55-core.c | 12 ++--- > drivers/media/platform/aspeed/aspeed-video.c | 12 ++--- > drivers/media/platform/mediatek/vpu/mtk_vpu.c | 3 +- > drivers/media/platform/nuvoton/npcm-video.c | 9 +--- > .../platform/synopsys/hdmirx/snps_hdmirx.c | 16 +------ > drivers/memory/tegra/tegra210-emc-core.c | 21 ++++----- > drivers/misc/fastrpc.c | 2 +- > drivers/mmc/host/sdhci-of-bst.c | 7 +-- > drivers/of/of_reserved_mem.c | 41 +++++++++++++++++ > drivers/remoteproc/da8xx_remoteproc.c | 10 +--- > drivers/remoteproc/keystone_remoteproc.c | 16 +------ > drivers/remoteproc/mtk_scp.c | 3 +- > drivers/remoteproc/omap_remoteproc.c | 13 +----- > drivers/remoteproc/ti_k3_common.c | 13 +----- > drivers/remoteproc/ti_k3_common.h | 1 - > .../staging/media/sunxi/cedrus/cedrus_hw.c | 6 +-- > include/linux/of_reserved_mem.h | 46 +++++++++++++++++++ > sound/hda/controllers/cix-ipbloq.c | 2 +- > sound/soc/fsl/imx-rpmsg.c | 2 +- > sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +- > sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 13 +----- > sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 2 +- > sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 2 +- > sound/soc/mediatek/mt8189/mt8189-afe-pcm.c | 16 +------ > sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 11 +---- > sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 2 +- > sound/soc/mediatek/mt8196/mt8196-afe-pcm.c | 14 +----- > sound/soc/sof/imx/imx-common.c | 9 ++-- > sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- > sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- > sound/soc/sprd/sprd-pcm-dma.c | 3 +- > 43 files changed, 162 insertions(+), 249 deletions(-) > > -- > 2.53.0 >