[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190118152128.GE5275@pendragon.ideasonboard.com>
Date: Fri, 18 Jan 2019 17:21:28 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Sam Ravnborg <sam@...nborg.org>
Cc: Alex Deucher <alexander.deucher@....com>,
Alexey Brodkin <abrodkin@...opsys.com>,
Andrzej Hajda <a.hajda@...sung.com>,
Benjamin Gaignard <benjamin.gaignard@...aro.org>,
Chen Feng <puck.chen@...ilicon.com>,
Christian Konig <christian.koenig@....com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
David Zhou <David1.Zhou@....com>,
Eric Anholt <eric@...olt.net>,
Gerd Hoffmann <kraxel@...hat.com>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <maxime.ripard@...tlin.com>,
Philippe Cornu <philippe.cornu@...com>,
Rob Clark <robdclark@...il.com>,
Rongrong Zou <zourongrong@...il.com>,
Sean Paul <sean@...rly.run>,
Tomi Valkeinen <tomi.valkeinen@...com>,
Vincent Abriou <vincent.abriou@...com>,
Xinliang Liu <z.liuxinliang@...ilicon.com>,
Xinwei Kong <kong.kongxinwei@...ilicon.com>,
Yannick Fertre <yannick.fertre@...com>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v4 2/8] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to
drm_util.h
Hi Sam,
Thank you for the patch.
On Sat, Jan 12, 2019 at 08:32:45PM +0100, Sam Ravnborg wrote:
> In the quest to get rid of drmP.h move the newly
> added EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h.
Would it make sense to move it to drm_internal.h as it's really for
internal use of the DRM core ?
> Fix the single user.
>
> Add a note to drmP.h to avoid further use of it.
>
> Signed-off-by: Sam Ravnborg <sam@...nborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@...tlin.com>
> Cc: Sean Paul <sean@...rly.run>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Daniel Vetter <daniel@...ll.ch>
> ---
> drivers/gpu/drm/drm_framebuffer.c | 1 +
> include/drm/drmP.h | 11 ++++++-----
> include/drm/drm_util.h | 10 ++++++++++
> 3 files changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
> index fcaea8f50513..7abcb265a108 100644
> --- a/drivers/gpu/drm/drm_framebuffer.c
> +++ b/drivers/gpu/drm/drm_framebuffer.c
> @@ -27,6 +27,7 @@
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_uapi.h>
> #include <drm/drm_print.h>
> +#include <drm/drm_util.h>
>
> #include "drm_internal.h"
> #include "drm_crtc_internal.h"
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index bc4cb3732407..3f5c577c9dbd 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -94,10 +94,11 @@ struct dma_buf_attachment;
> struct pci_dev;
> struct pci_controller;
>
> -#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE)
> -#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
> -#else
> -#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
> -#endif
> +/*
> + * NOTE: drmP.h is obsolete - do NOT add anything to this file
> + *
> + * Do not include drmP.h in new files.
> + * Work is ongoing to remove drmP.h includes from existing files
> + */
>
> #endif
> diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h
> index f776a55e5508..0500da65b1d1 100644
> --- a/include/drm/drm_util.h
> +++ b/include/drm/drm_util.h
> @@ -37,6 +37,16 @@
> #include <linux/kgdb.h>
> #include <linux/smp.h>
>
> +/*
> + * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall
> + * only be visible for drmselftests.
> + */
> +#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE)
> +#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
I'd make this EXPORT_SYMBOL_GPL given the internal use, but that change
should be part of a separate patch.
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> +#else
> +#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
> +#endif
> +
> /**
> * for_each_if - helper for handling conditionals in various for_each macros
> * @condition: The condition to check
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists