All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: ville.syrjala@linux.intel.com, dri-devel@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH 4/4] drm: make encoder/connector/crtc helper_private a const pointer
Date: Tue, 10 Mar 2015 17:15:02 +0200	[thread overview]
Message-ID: <8a5e7686e17587d6167f025c417948ce966775b3.1426000252.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1426000252.git.jani.nikula@intel.com>
In-Reply-To: <cover.1426000252.git.jani.nikula@intel.com>

They're only used to store const pointers anyway. This helps to keep
Ville and the compiler happy.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 include/drm/drm_crtc.h        | 6 +++---
 include/drm/drm_crtc_helper.h | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index adc9ea5acf02..d5fda475cfcd 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -467,7 +467,7 @@ struct drm_crtc {
 	int framedur_ns, linedur_ns, pixeldur_ns;
 
 	/* if you are using the helper */
-	void *helper_private;
+	const void *helper_private;
 
 	struct drm_object_properties properties;
 
@@ -597,7 +597,7 @@ struct drm_encoder {
 	struct drm_crtc *crtc;
 	struct drm_bridge *bridge;
 	const struct drm_encoder_funcs *funcs;
-	void *helper_private;
+	const void *helper_private;
 };
 
 /* should we poll this connector for connects and disconnects */
@@ -701,7 +701,7 @@ struct drm_connector {
 	/* requested DPMS state */
 	int dpms;
 
-	void *helper_private;
+	const void *helper_private;
 
 	/* forced on connector */
 	struct drm_cmdline_mode cmdline_mode;
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 92d5135b55d2..c8fc187061de 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -197,19 +197,19 @@ extern void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
 static inline void drm_crtc_helper_add(struct drm_crtc *crtc,
 				       const struct drm_crtc_helper_funcs *funcs)
 {
-	crtc->helper_private = (void *)funcs;
+	crtc->helper_private = funcs;
 }
 
 static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
 					  const struct drm_encoder_helper_funcs *funcs)
 {
-	encoder->helper_private = (void *)funcs;
+	encoder->helper_private = funcs;
 }
 
 static inline void drm_connector_helper_add(struct drm_connector *connector,
 					    const struct drm_connector_helper_funcs *funcs)
 {
-	connector->helper_private = (void *)funcs;
+	connector->helper_private = funcs;
 }
 
 extern void drm_helper_resume_force_mode(struct drm_device *dev);
-- 
2.1.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-03-10 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 12:35 [PATCH] drm/atomic: Constify a bunch of functions pointer structs ville.syrjala
2015-03-10 15:14 ` [PATCH 0/4] drm: constify all helper_private/func pointers Jani Nikula
2015-03-10 15:14   ` [PATCH 1/4] drm: constify all struct drm_encoder_helper_funcs pointers Jani Nikula
2015-03-10 15:19     ` Jani Nikula
2015-03-10 15:15   ` [PATCH 2/4] drm: constify all struct drm_connector_helper_funcs pointers Jani Nikula
2015-03-10 15:15   ` [PATCH 3/4] drm: constify all struct drm_crtc_helper_funcs pointers Jani Nikula
2015-03-10 15:15   ` Jani Nikula [this message]
2015-03-10 15:34   ` [PATCH 0/4] drm: constify all helper_private/func pointers Ville Syrjälä
2015-03-11  7:33     ` Daniel Vetter

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=8a5e7686e17587d6167f025c417948ce966775b3.1426000252.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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.