All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Alexey Brodkin <abrodkin@synopsys.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Chen Feng <puck.chen@hisilicon.com>,
	Christian Konig <christian.koenig@amd.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	David Zhou <David1.Zhou@amd.com>, Eric Anholt <eric@anholt.net>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Philippe Cornu <philippe.cornu@st.com>,
	Rob Clark <robdclark@gmail.com>,
	Rongrong Zou <zourongrong@gmail.com>, Sean Paul <sean@poorly.run>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Vincent Abriou <vincent.abriou@st.com>,
	Xinliang Liu <z.liuxinliang@hisilicon.com>,
	Xinwei Kong <kong.kongxinwei@hisilicon.com>,
	Yannick Fertre <yannick.fertre@st.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 2/8] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
Date: Fri, 18 Jan 2019 17:21:28 +0200	[thread overview]
Message-ID: <20190118152128.GE5275@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190112193251.20450-3-sam@ravnborg.org>

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@ravnborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.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@ideasonboard.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

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Alexey Brodkin <abrodkin@synopsys.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Chen Feng <puck.chen@hisilicon.com>,
	Christian Konig <christian.koenig@amd.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	David Zhou <David1.Zhou@amd.com>, Eric Anholt <eric@anholt.net>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Philippe Cornu <philippe.cornu@st.com>,
	Rob Clark <robdclark@gmail.com>,
	Rongrong Zou <zourongrong@gmail.com>, Sean Paul <sean@poorly.run>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: Re: [PATCH v4 2/8] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
Date: Fri, 18 Jan 2019 17:21:28 +0200	[thread overview]
Message-ID: <20190118152128.GE5275@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190112193251.20450-3-sam@ravnborg.org>

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@ravnborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.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@ideasonboard.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

  reply	other threads:[~2019-01-18 15:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12 19:32 [PATCH v4 0/8] drm: minimize drmP.h dependencies Sam Ravnborg
2019-01-12 19:32 ` Sam Ravnborg
2019-01-12 19:32 ` [PATCH v4 1/8] drm: move drm_can_sleep() to drm_util.h Sam Ravnborg
2019-01-12 19:32   ` Sam Ravnborg
2019-01-18 15:15   ` Laurent Pinchart
2019-01-18 15:15     ` Laurent Pinchart
2019-01-12 19:32 ` [PATCH v4 2/8] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY " Sam Ravnborg
2019-01-12 19:32   ` Sam Ravnborg
2019-01-18 15:21   ` Laurent Pinchart [this message]
2019-01-18 15:21     ` Laurent Pinchart
2019-01-12 19:32 ` [PATCH v4 3/8] drm/stm: prepare for drmP.h removal from drm_modeset_helper.h Sam Ravnborg
2019-01-12 19:32   ` Sam Ravnborg
2019-01-14  9:59   ` Benjamin Gaignard
2019-01-14  9:59     ` Benjamin Gaignard
2019-01-12 19:32 ` [PATCH v4 4/8] drm/hisilicon/kirin: " Sam Ravnborg
2019-01-12 19:32   ` Sam Ravnborg
2019-01-12 19:32 ` [PATCH v4 5/8] drm/arcpgu: " Sam Ravnborg
2019-01-12 19:32   ` Sam Ravnborg
2019-01-14 13:48   ` Alexey Brodkin
2019-01-14 13:48     ` Alexey Brodkin
2019-01-12 19:32 ` [PATCH v4 6/8] drm/bridge: cdns: " Sam Ravnborg
2019-01-12 19:32   ` Sam Ravnborg
2019-01-12 19:32 ` [PATCH v4 7/8] drmi/rcar-du: " Sam Ravnborg
2019-01-12 19:32 ` Sam Ravnborg
2019-01-18 15:24   ` Laurent Pinchart
2019-01-18 15:24     ` Laurent Pinchart
2019-01-12 19:32 ` [PATCH v4 8/8] drm: remove drmP.h " Sam Ravnborg
2019-01-12 19:32 ` Sam Ravnborg
2019-01-14 10:03   ` Daniel Vetter
2019-01-14 10:03     ` Daniel Vetter
2019-01-18 15:25   ` Laurent Pinchart
2019-01-18 15:25     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190118152128.GE5275@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=David1.Zhou@amd.com \
    --cc=a.hajda@samsung.com \
    --cc=abrodkin@synopsys.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=benjamin.gaignard@linaro.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=philippe.cornu@st.com \
    --cc=puck.chen@hisilicon.com \
    --cc=robdclark@gmail.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=tomi.valkeinen@ti.com \
    --cc=vincent.abriou@st.com \
    --cc=yannick.fertre@st.com \
    --cc=z.liuxinliang@hisilicon.com \
    --cc=zourongrong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.