From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 731D12FFDF4; Mon, 19 Jan 2026 16:18:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768839532; cv=none; b=k3yyHuEh6utjrOtYbiQ7KQQv4kAKWYtF5DnHV5ETf24e/3EKc61u5HwP9qVcpCFquWUHpwZLxwWgKAgC3dbLdauk1D6x4RJXV1i/245+5X2fbGGdO1n8ooFG0YMW3a9jdgaO6nETV8vdltrICPNa5C0guDP4QOk/Yp2BbHSxxD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768839532; c=relaxed/simple; bh=jyMZSl/pz+/Y/5Zw2mKUdp5jMPp9YfQaPG4GQk8Hw00=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=EO21pPQsm0GlyAk664jUYdbxCpCpkErz5WBjavwHi424vq+ayWqlgUwg2Pa5X6RJms+wi9YWAepnTvHIl2b6pXpAu6Fi1yswjl3Yvw9r8HAGJ/qEnObRe1AQf8A8MH+XN/NYZlP9YrOd+7+nUPKjpAcfhmzQoa6kO1hH0PQzKU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=pUPvqtSe; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="pUPvqtSe" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 00C671A297C; Mon, 19 Jan 2026 16:18:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C872B60731; Mon, 19 Jan 2026 16:18:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4DE0810B6B16B; Mon, 19 Jan 2026 17:18:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768839515; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=6IzZqITfxZfsqLMD97cOvLx/oTz7z6A1f/3WBHICk0E=; b=pUPvqtSehbxN1xcBr3URpoIUzPLIdZF4ymZLMVtPVq6B+npB/nl1peqzjW3p39QZBEKAE2 ZTWfkjRz630zT7QEuHuWw2cfvECsBSs9Pj/ZV2ugWXo+B6s+yGT7iPREPZsY2MnbKOgp53 n2jtpnm8kiqsDutFGsV/2AGTFsIHYaDnCPmV0NIqYzWsJZ4JXmZgpaUEPPSnbnbLl04XXD MQlO0OsfnbeuYn5h4REjHALwDvQFmhBbnccS1LSclOWP2Wtiv0B/Mk9BU3+DdNc/SOVaDM ia8XbpAeNL3OQd4VA64W43PEkX+DE7zbyYinOHy4P4oJkFNgwmB+Y05Q1YW4Dw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 19 Jan 2026 17:18:31 +0100 Message-Id: Subject: Re: [PATCH v4 16/25] drm/tilcdc: Modernize driver initialization and cleanup paths Cc: "Markus Schneider-Pargmann" , "Bajjuri Praneeth" , "Louis Chauvet" , "Thomas Petazzoni" , "Miguel Gazquez" , "Herve Codina" , , , , , To: "Kory Maincent (TI.com)" , "Jyri Sarha" , "Tomi Valkeinen" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Russell King" , "Bartosz Golaszewski" , "Tony Lindgren" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20260116-feature_tilcdc-v4-0-2c1c22143087@bootlin.com> <20260116-feature_tilcdc-v4-16-2c1c22143087@bootlin.com> In-Reply-To: <20260116-feature_tilcdc-v4-16-2c1c22143087@bootlin.com> X-Last-TLS-Session-Version: TLSv1.3 On Fri Jan 16, 2026 at 6:02 PM CET, Kory Maincent (TI.com) wrote: > Refactor the driver initialization to use modern DRM managed resource > APIs, simplifying the code. > > The tilcdc_init and tilcdc_fini wrapper functions are removed since they > served no purpose after the component framework was eliminated. Their > logic is integrated directly into probe and remove. > > Key changes: > - Use devm_drm_dev_alloc() instead of drm_dev_alloc(). > - Use drmm_mode_config_init() instead of drm_mode_config_init(). > - Align the remove path with the probe error path to ensure consistent > cleanup ordering in both success and failure cases. > - Adjust platform_set_drvdata() to store the private structure instead > of the drm_device, matching the new allocation pattern. > > These changes reduce error-prone code while maintaining the same > functional behavior. > > Signed-off-by: Kory Maincent (TI.com) Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com