linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: "Daniel Vetter" <daniel@ffwll.ch>,
	"David Airlie" <airlied@linux.ie>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Sean Paul" <sean@poorly.run>,
	"David Lechner" <david@lechnology.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 05/12] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
Date: Wed, 9 Jan 2019 22:54:43 +0100	[thread overview]
Message-ID: <20190109215443.GA21184@phenom.ffwll.local> (raw)
In-Reply-To: <20190108192939.15255-6-sam@ravnborg.org>

On Tue, Jan 08, 2019 at 08:29:32PM +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.
> 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>

Skipping this one for now, since it doesn't apply cleanly without patch 4.
Seems like none of the later patches requires it.
-Daniel

> ---
>  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 8fda5777471c..cd1e4be1dfb3 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)
> +#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
> -- 
> 2.12.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2019-01-09 21:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 19:29 [PATCH v3 0/12] drm: minimize drmP.h dependencies Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 01/12] drm: drm_device.h: update comments to kernel-doc style Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 02/12] drm: move DRM_SWITCH_POWER defines to drm_device.h Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 03/12] drm: make drm_framebuffer.h self contained Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 04/12] drm: move drm_can_sleep() to drm_util.h Sam Ravnborg
2019-01-09 21:20   ` Daniel Vetter
2019-01-08 19:29 ` [PATCH v3 05/12] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY " Sam Ravnborg
2019-01-09 21:54   ` Daniel Vetter [this message]
2019-01-08 19:29 ` [PATCH v3 06/12] drm: remove include of drmP.h from bridge/dw_hdmi.h Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 07/12] drm: remove include of drmP.h from drm_encoder_slave.h Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 08/12] drm: remove include of drmP.h from drm_modeset_helper.h Sam Ravnborg
2019-01-09 21:53   ` Daniel Vetter
2019-01-11 15:56     ` Daniel Vetter
2019-01-08 19:29 ` [PATCH v3 09/12] drm/arc: do not reply on drmP.h from drm_gem_cma_helper.h Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 10/12] drm/stm: " Sam Ravnborg
2019-01-09  8:21   ` Benjamin Gaignard
2019-01-09  9:42     ` Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 11/12] drm/tinydrm: " Sam Ravnborg
2019-01-08 19:29 ` [PATCH v3 12/12] drm: remove " Sam Ravnborg
2019-01-09 22:24   ` Daniel Vetter
2019-01-09 23:06     ` Sam Ravnborg

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=20190109215443.GA21184@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=david@lechnology.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=noralf@tronnes.org \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).