* [PATCH] drm/crtc: constify drm_crtc_mask parameter
@ 2016-10-13 8:38 Maarten Lankhorst
2016-10-13 12:17 ` Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Maarten Lankhorst @ 2016-10-13 8:38 UTC (permalink / raw)
To: dri-devel@lists.freedesktop.org, Daniel Vetter
Now that drm_crtc_index takes a const, the same can be done for drm_crtc_mask.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 0aa292526567..98ec40713921 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1354,7 +1354,7 @@ static inline unsigned int drm_crtc_index(const struct drm_crtc *crtc)
* Given a registered CRTC, return the mask bit of that CRTC for an
* encoder's possible_crtcs field.
*/
-static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc)
+static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
{
return 1 << drm_crtc_index(crtc);
}
diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h
index 387e33a4d6ee..c7438ff0d609 100644
--- a/include/drm/drm_encoder.h
+++ b/include/drm/drm_encoder.h
@@ -189,7 +189,7 @@ static inline unsigned int drm_encoder_index(struct drm_encoder *encoder)
}
/* FIXME: We have an include file mess still, drm_crtc.h needs untangling. */
-static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc);
+static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc);
/**
* drm_encoder_crtc_ok - can a given crtc drive a given encoder?
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/crtc: constify drm_crtc_mask parameter
2016-10-13 8:38 [PATCH] drm/crtc: constify drm_crtc_mask parameter Maarten Lankhorst
@ 2016-10-13 12:17 ` Jani Nikula
2016-10-17 6:12 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2016-10-13 12:17 UTC (permalink / raw)
To: Maarten Lankhorst, dri-devel@lists.freedesktop.org, Daniel Vetter
On Thu, 13 Oct 2016, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
> Now that drm_crtc_index takes a const, the same can be done for drm_crtc_mask.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 0aa292526567..98ec40713921 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -1354,7 +1354,7 @@ static inline unsigned int drm_crtc_index(const struct drm_crtc *crtc)
> * Given a registered CRTC, return the mask bit of that CRTC for an
> * encoder's possible_crtcs field.
> */
> -static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc)
> +static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
> {
> return 1 << drm_crtc_index(crtc);
> }
> diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h
> index 387e33a4d6ee..c7438ff0d609 100644
> --- a/include/drm/drm_encoder.h
> +++ b/include/drm/drm_encoder.h
> @@ -189,7 +189,7 @@ static inline unsigned int drm_encoder_index(struct drm_encoder *encoder)
> }
>
> /* FIXME: We have an include file mess still, drm_crtc.h needs untangling. */
> -static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc);
> +static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc);
>
> /**
> * drm_encoder_crtc_ok - can a given crtc drive a given encoder?
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/crtc: constify drm_crtc_mask parameter
2016-10-13 12:17 ` Jani Nikula
@ 2016-10-17 6:12 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-10-17 6:12 UTC (permalink / raw)
To: Jani Nikula; +Cc: dri-devel@lists.freedesktop.org
On Thu, Oct 13, 2016 at 03:17:34PM +0300, Jani Nikula wrote:
> On Thu, 13 Oct 2016, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
> > Now that drm_crtc_index takes a const, the same can be done for drm_crtc_mask.
> >
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Applied to drm-misc, thanks.
-Daniel
>
>
> > ---
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index 0aa292526567..98ec40713921 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -1354,7 +1354,7 @@ static inline unsigned int drm_crtc_index(const struct drm_crtc *crtc)
> > * Given a registered CRTC, return the mask bit of that CRTC for an
> > * encoder's possible_crtcs field.
> > */
> > -static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc)
> > +static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
> > {
> > return 1 << drm_crtc_index(crtc);
> > }
> > diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h
> > index 387e33a4d6ee..c7438ff0d609 100644
> > --- a/include/drm/drm_encoder.h
> > +++ b/include/drm/drm_encoder.h
> > @@ -189,7 +189,7 @@ static inline unsigned int drm_encoder_index(struct drm_encoder *encoder)
> > }
> >
> > /* FIXME: We have an include file mess still, drm_crtc.h needs untangling. */
> > -static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc);
> > +static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc);
> >
> > /**
> > * drm_encoder_crtc_ok - can a given crtc drive a given encoder?
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-17 6:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 8:38 [PATCH] drm/crtc: constify drm_crtc_mask parameter Maarten Lankhorst
2016-10-13 12:17 ` Jani Nikula
2016-10-17 6:12 ` Daniel Vetter
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.