From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04928C43458 for ; Mon, 6 Jul 2026 15:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3XwyWTIrA/V6J7edt1EVqOvQjuCfvvAm71aap9OvOCI=; b=tZQL7QrbtHYCnDVzSuf77RMOAb 80XpKMt2T2Emo7ewyV4asBaHmsas2+mOIf/TlVSDVG4xgLulctAa0O4CdGdQO3oB+4B1JuxFAvFqQ nJgMPklyuXBNSIVtZz7WldR1WOWZN5RugrsJsilTc8ixhPJAeOU81lcUCmtQsFXu5KYp3bN6hQNr8 +JUFrkLAdMXsy95rSHGQlaRUBleRgMY3VJrQb/sLaVm5WkOBHU9X1srMh1H7LEjIL47SRd0iUuXAd S3v8JQJvYM0Yw9PIh9EMC0dLt5oEXIiX1gJslO48JdzCU/1Npoiusae1CSlldP+gpLfyLDclNA796 h/ezkMow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wgkqV-0000000CpUX-3cte; Mon, 06 Jul 2026 15:02:55 +0000 Received: from sender4-op-o11.zoho.com ([136.143.188.11]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wgkqQ-0000000CpTB-1VZG; Mon, 06 Jul 2026 15:02:51 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1783350034; cv=none; d=zohomail.com; s=zohoarc; b=ShBwgIB9Tp0j2ieVFNXD2nNlBvkYSrZX6KL3AeDB+tfLOnE+7CHZu5rN/HP3/wiA65AfS2awNfBnLG6v3KttLERp5k37uX5cTjLkGlHu1epQC0tpKbiWTjw2bmWO4R3cJ9Bceq/UN4MGpiO+12hQk2boeKqRMVN9X9phSckbKF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783350034; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=3XwyWTIrA/V6J7edt1EVqOvQjuCfvvAm71aap9OvOCI=; b=aUIQNdoKYFXhqBqNhsY+F02CkGve6EXcuTScFbe5OHL/WHUKXk+LgtUumBUdfOodPJNOea5bCjHJ9ycCR0cPvohjbCewZV5P129fWS7uy+uA2tTiwdLdX3wI3zpXyvb7h2kq1Re2lQrUV6CFisZwObNuwW+4qzyVdb787O027/g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=dmitry.osipenko@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1783350034; s=zohomail; d=collabora.com; i=dmitry.osipenko@collabora.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=3XwyWTIrA/V6J7edt1EVqOvQjuCfvvAm71aap9OvOCI=; b=ImgA1Hj80B9JHQg2Jp0iR3Hfkzuv+c1ZmjHHLY5vXEEHJlu3rx/mY5cc4HVAWJDf QREjGnw/uNA5JcHG0nEUz0PUvTE/0uKgXtwmj8p0wIRVC2fcF+pZOIvPjdNL8NnCNrh RgJCMxLw7XsRX8tO1eirdxvjf97IRGDZQzh4oCj8= Received: by mx.zohomail.com with SMTPS id 1783350031182921.1240379629376; Mon, 6 Jul 2026 08:00:31 -0700 (PDT) Message-ID: <3541fb84-81ce-4415-8027-38aa611834ae@collabora.com> Date: Mon, 6 Jul 2026 18:00:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 06/42] media: synopsys: hdmirx: Use devm_of_reserved_mem_device_init() To: Mukesh Ojha , Bjorn Andersson , Konrad Dybcio , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Joel Stanley , Andrew Jeffery , Paul Cercueil , Anitha Chrisanthus , Paul Kocialkowski , Linus Walleij , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Alexey Brodkin , Laurent Pinchart , Tomi Valkeinen , Michal Simek , Daniel Scally , Jacopo Mondi , Mauro Carvalho Chehab , Eddie James , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Matthias Brugger , AngeloGioacchino Del Regno , Joseph Liu , Marvin Lin , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Srinivas Kandagatla , Arnd Bergmann , Greg Kroah-Hartman , Ge Gordon , Adrian Hunter , Ulf Hansson , Rob Herring , Saravana Kannan , Mathieu Poirier , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Frank Li , Sascha Hauer , Peter Ujfalusi , Bard Liao , Daniel Baluta , Orson Zhai , Baolin Wang , Peter Chen , Fugang Duan Cc: Ekansh Gupta , BST Linux Kernel Upstream Group , Fabio Estevam , Nicolin Chen , Pengutronix Kernel Team , Kai Vehmanen , Pierre-Louis Bossart , Vijendar Mukunda , Chunyan Zhang , CIX Linux Kernel Upstream Group , 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 References: <20260703193855.110619-1-mukesh.ojha@oss.qualcomm.com> <20260703193855.110619-7-mukesh.ojha@oss.qualcomm.com> From: Dmitry Osipenko Content-Language: en-US In-Reply-To: <20260703193855.110619-7-mukesh.ojha@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260706_080250_426953_3DE3A836 X-CRM114-Status: GOOD ( 18.10 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 7/3/26 22:38, Mukesh Ojha wrote: > Replace the hand-rolled devm_hdmirx_of_reserved_mem_device_release() > devres action with devm_of_reserved_mem_device_init(), which handles the > cleanup automatically. This removes both the wrapper function and the > devm_add_action_or_reset() call. > > Signed-off-by: Mukesh Ojha > --- > .../media/platform/synopsys/hdmirx/snps_hdmirx.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c > index 25f8ca0d6d94..7c6acc6d7e88 100644 > --- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c > +++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c > @@ -2265,11 +2265,6 @@ static const struct hdmirx_cec_ops hdmirx_cec_ops = { > .read = hdmirx_readl, > }; > > -static void devm_hdmirx_of_reserved_mem_device_release(void *dev) > -{ > - of_reserved_mem_device_release(dev); > -} > - > static int hdmirx_parse_dt(struct snps_hdmirx_dev *hdmirx_dev) > { > struct device *dev = hdmirx_dev->dev; > @@ -2316,16 +2311,9 @@ static int hdmirx_parse_dt(struct snps_hdmirx_dev *hdmirx_dev) > if (!device_property_read_bool(dev, "hpd-is-active-low")) > hdmirx_dev->hpd_trigger_level_high = true; > > - ret = of_reserved_mem_device_init(dev); > - if (ret) { > + ret = devm_of_reserved_mem_device_init(dev); > + if (ret) > dev_warn(dev, "no reserved memory for HDMIRX, use default CMA\n"); > - } else { > - ret = devm_add_action_or_reset(dev, > - devm_hdmirx_of_reserved_mem_device_release, > - dev); > - if (ret) > - return ret; > - } > > return 0; > } Reviewed-by: Dmitry Osipenko -- Best regards, Dmitry