From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 B41DF3F0755 for ; Thu, 7 May 2026 11:53:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154840; cv=none; b=pI0WYHxOCWYVOB+gFZ1XRxMQH5b7YX3nXBb9HP1BhYSb/VOsG76guzBu6Wuf1u3fsOtrvqW7xm3GLZ/vTyeOMj3jnZoGxBOv79zo1aVcWoVnAsFN6UW6fMQ/78CdSa7jD9fUKyS/ruquPcnHslHDwsK3OGz6tZXq6bMgrCVCE8E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154840; c=relaxed/simple; bh=NyPU5Jyr7qYKLrnlxqRHJQCdjHevA3vSn9eS4E//z44=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SV/T+d1INk8GsaoIveU68yA24UBfvNkq8etE/jny6xjSQbNQbdcjk6tfid+6G+O9sCQ0NdwxRBlzG6rxlhIQ0yBA++7EvGbPvO1bVkHa+KKk9mkBPofsHvexNZtyjNACBlMFMVSfrNdHd3aOACeTw84/6LTi/oyFSn7uZE73lj4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SnnGguEi; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SnnGguEi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3GsJmkqThUnt2brR26qwGZz8nLewh8d7g9i4bVblI9s=; b=SnnGguEiuVvwFmhOWZGzdAf0wPzgkvLh8TSX+VuzTez/xxuQh0D5ecVWNy5HWgknS+zL4U PqlY/yZ3oiQ+FKUd1Ohv1oyZwFkhOxQJJAqJ+Q9+Zm3DlIFaioq0sjAc2acodLyexu4Lp7 OCxa79FznZs+mIY3XTK0Aggqan7dbKo= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-D4PP_y0hNjSp49tgXQo6Tw-1; Thu, 07 May 2026 07:53:53 -0400 X-MC-Unique: D4PP_y0hNjSp49tgXQo6Tw-1 X-Mimecast-MFC-AGG-ID: D4PP_y0hNjSp49tgXQo6Tw_1778154831 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CF37E19560AE; Thu, 7 May 2026 11:53:51 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 722F81953947; Thu, 7 May 2026 11:53:48 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:08 +0200 Subject: [PATCH 10/10] drm/panel: Make drm_panel_init() static 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: 7bit Message-Id: <20260507-drm_panel_init_rm-v1-10-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778154793; l=3300; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=NyPU5Jyr7qYKLrnlxqRHJQCdjHevA3vSn9eS4E//z44=; b=hDmsOdt+AL9ztiUPAR8EaGgiY0RhwtPsxPkX10H/DSptpCKU7+QUolnEU/TRNCX9NPV8OuRzu mBrhnVXudEZDY0dVDkql64SG5q5vs+If3OMle0AR7dPoEnFyICBAkR6 X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Now that all panel drivers use devm_drm_panel_alloc(), there are no external callers of drm_panel_init(). Make it static to prevent new users from bypassing the refcounted allocation path. Remove stale references to drm_panel_init() in kdocs. Signed-off-by: Albert Esteve --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- drivers/gpu/drm/drm_panel.c | 8 ++++---- include/drm/drm_panel.h | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index a697cc227e289..380ebf0fad2be 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -4626,7 +4626,7 @@ static const struct backlight_ops dp_aux_bl_ops = { * Backlight will then be handled transparently without requiring * any intervention from the driver. * - * drm_panel_dp_aux_backlight() must be called after the call to drm_panel_init(). + * drm_panel_dp_aux_backlight() must be called after devm_drm_panel_alloc(). * * Return: 0 on success or a negative error code on failure. */ diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index d1e6598ea3bc0..e3e1c5ceb8ff8 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -56,8 +56,9 @@ static LIST_HEAD(panel_list); * Initialize the panel structure for subsequent registration with * drm_panel_add(). */ -void drm_panel_init(struct drm_panel *panel, struct device *dev, - const struct drm_panel_funcs *funcs, int connector_type) +static void drm_panel_init(struct drm_panel *panel, struct device *dev, + const struct drm_panel_funcs *funcs, + int connector_type) { if (connector_type == DRM_MODE_CONNECTOR_Unknown) DRM_WARN("%s: %s: a valid connector type is required!\n", __func__, dev_name(dev)); @@ -69,7 +70,6 @@ void drm_panel_init(struct drm_panel *panel, struct device *dev, panel->funcs = funcs; panel->connector_type = connector_type; } -EXPORT_SYMBOL(drm_panel_init); /** * drm_panel_add - add a panel to the global registry @@ -708,7 +708,7 @@ EXPORT_SYMBOL(devm_drm_panel_add_follower); * A typical implementation for a panel driver supporting device tree * will call this function at probe time. Backlight will then be handled * transparently without requiring any intervention from the driver. - * drm_panel_of_backlight() must be called after the call to drm_panel_init(). + * drm_panel_of_backlight() must be called after devm_drm_panel_alloc(). * * Return: 0 on success or a negative error code on failure. */ diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 2407bfa60236f..55cbc51512240 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -320,10 +320,6 @@ void *__devm_drm_panel_alloc(struct device *dev, size_t size, size_t offset, offsetof(type, member), funcs, \ connector_type)) -void drm_panel_init(struct drm_panel *panel, struct device *dev, - const struct drm_panel_funcs *funcs, - int connector_type); - struct drm_panel *drm_panel_get(struct drm_panel *panel); void drm_panel_put(struct drm_panel *panel); -- 2.53.0