From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 D87543446B1 for ; Wed, 17 Dec 2025 14:26:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765981569; cv=none; b=W9Gf1AmT3br/fHPoKhtpZjOWPDeDKyaaSJC54ezPq1UStr1LhLYYKYOXgUlTm0ym07Kp7QL78x26yapOaypqLUDO1aHxt6czNvzzJVP+tQZw3ASNGjgNSh8jK+kArhUl1prHtHEH7FFvYXdiEDWrL0b9SLH51+C105gf2eOXJaE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765981569; c=relaxed/simple; bh=GC7FhgVqTCdnIirF+/0jzCgbAur9R9JmftUA2ub8nLQ=; h=Mime-Version:Content-Type:Date:Message-Id:To:From:Subject:Cc: References:In-Reply-To; b=Gv0pifQHdDPmmxpNu7SHf5GVwgGTq9bj1z++HyVxBLo/K23+Gie8Osu8dnWy9mslTkzrcXBOXJ5OBJllVAw9V3sVOE39NvbLnBXVVrPTBAJf3AbA9oM8XUK9ZbFx53+qRfvyg0MxS9q0kLAQD3tqSOsIEEXrJGxG7TQF0Q462TQ= 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=F0CiiNN/; arc=none smtp.client-ip=185.246.85.4 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="F0CiiNN/" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 427BE4E41C61; Wed, 17 Dec 2025 14:26:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 16AD96072F; Wed, 17 Dec 2025 14:26:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E1866102F0AE0; Wed, 17 Dec 2025 15:25:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765981561; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=to5iMxlqbo+pcsR8bNTm6k5Dmpabhv622hhzqTz8TTc=; b=F0CiiNN/SEpf0zrbWcF6F4oxhc5QhsKITa3SgfDtBpPHN99SuY6z9+SldYbyV/KgdhnT5t 3G6MeSyxnuBvDGtFcZk5Iywy6lQVOisnkSRA2vWS66aGC3FaeRF67vWBXmeLtncwtrrZpU o9CfFQgk3RpuxmpchCS4j/9wf1zLZ/gV4M/KxRLMt7R2YS+PJwpShaCZkxWmsNjzvhJakB 3L2izt1hNmLP07szLly4Hll48At7/XO3cj9yBeFhbuFbMIBlvzvBBvxrIHJ8o9yiZNUFRC F7rOvJCaEIhIbPqBxmpx5J5XLpl9CGddpfReLroTamMk9jFFo9+IcpOC4tXa/A== 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: Wed, 17 Dec 2025 15:25:57 +0100 Message-Id: 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" Subject: Re: [PATCH v2 14/20] drm/tilcdc: Modernize driver initialization and cleanup paths Cc: "Markus Schneider-Pargmann" , "Bajjuri Praneeth" , "Louis Chauvet" , "Thomas Petazzoni" , "Miguel Gazquez" , , , , , X-Mailer: aerc 0.20.1 References: <20251211-feature_tilcdc-v2-0-f48bac3cd33e@bootlin.com> <20251211-feature_tilcdc-v2-14-f48bac3cd33e@bootlin.com> In-Reply-To: <20251211-feature_tilcdc-v2-14-f48bac3cd33e@bootlin.com> X-Last-TLS-Session-Version: TLSv1.3 On Thu Dec 11, 2025 at 5:38 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) Overall looks good: Reviewed-by: Luca Ceresoli However the diff is not very readable dues to the code moved around. I suspect this could have been split in multiple patches: some just moving code around and no functional changes, others doing the actual work but without moving around code so the diff is more readable. -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com