* [PATCH] drm: Constify drm_color_lut_check() @ 2019-01-29 17:06 Ville Syrjala 2019-01-29 17:52 ` Sam Ravnborg 2019-01-29 19:24 ` Brian Starkey 0 siblings, 2 replies; 6+ messages in thread From: Ville Syrjala @ 2019-01-29 17:06 UTC (permalink / raw) To: dri-devel; +Cc: intel-gfx From: Ville Syrjälä <ville.syrjala@linux.intel.com> drm_color_lut_check() doens't modify the passed in blob so let's make it const. Also s/uint32_y/u32/ while at it. Cc: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/drm_color_mgmt.c | 6 +++--- include/drm/drm_color_mgmt.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c index 968ca7c91ad8..3c8826a91a03 100644 --- a/drivers/gpu/drm/drm_color_mgmt.c +++ b/drivers/gpu/drm/drm_color_mgmt.c @@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties); * * Returns 0 on success, -EINVAL on failure. */ -int drm_color_lut_check(struct drm_property_blob *lut, - uint32_t tests) +int drm_color_lut_check(const struct drm_property_blob *lut, + u32 tests) { - struct drm_color_lut *entry; + const struct drm_color_lut *entry; int i; if (!lut || !tests) diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h index 6affbda6d9cb..58d4b20b5b97 100644 --- a/include/drm/drm_color_mgmt.h +++ b/include/drm/drm_color_mgmt.h @@ -96,6 +96,6 @@ enum drm_color_lut_tests { DRM_COLOR_LUT_NON_DECREASING = BIT(1), }; -int drm_color_lut_check(struct drm_property_blob *lut, - uint32_t tests); +int drm_color_lut_check(const struct drm_property_blob *lut, + u32 tests); #endif -- 2.19.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: Constify drm_color_lut_check() 2019-01-29 17:06 [PATCH] drm: Constify drm_color_lut_check() Ville Syrjala @ 2019-01-29 17:52 ` Sam Ravnborg 2019-01-29 17:58 ` Ville Syrjälä 2019-01-29 19:24 ` Brian Starkey 1 sibling, 1 reply; 6+ messages in thread From: Sam Ravnborg @ 2019-01-29 17:52 UTC (permalink / raw) To: Ville Syrjala; +Cc: intel-gfx, dri-devel Hi Ville. On Tue, Jan 29, 2019 at 07:06:09PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > drm_color_lut_check() doens't modify the passed in blob so > let's make it const. > > Also s/uint32_y/u32/ while at it. > > Cc: Matt Roper <matthew.d.roper@intel.com> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/drm_color_mgmt.c | 6 +++--- > include/drm/drm_color_mgmt.h | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c > index 968ca7c91ad8..3c8826a91a03 100644 > --- a/drivers/gpu/drm/drm_color_mgmt.c > +++ b/drivers/gpu/drm/drm_color_mgmt.c > @@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties); > * > * Returns 0 on success, -EINVAL on failure. > */ > -int drm_color_lut_check(struct drm_property_blob *lut, > - uint32_t tests) > +int drm_color_lut_check(const struct drm_property_blob *lut, > + u32 tests) No need to linewrap this line. > { > - struct drm_color_lut *entry; > + const struct drm_color_lut *entry; > int i; > > if (!lut || !tests) > diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h > index 6affbda6d9cb..58d4b20b5b97 100644 > --- a/include/drm/drm_color_mgmt.h > +++ b/include/drm/drm_color_mgmt.h > @@ -96,6 +96,6 @@ enum drm_color_lut_tests { > DRM_COLOR_LUT_NON_DECREASING = BIT(1), > }; > > -int drm_color_lut_check(struct drm_property_blob *lut, > - uint32_t tests); > +int drm_color_lut_check(const struct drm_property_blob *lut, > + u32 tests); Likewise. With the linewrap fixed: Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Note: does not apply to my drm-misc tree. Anything I miss here? Sam _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: Constify drm_color_lut_check() 2019-01-29 17:52 ` Sam Ravnborg @ 2019-01-29 17:58 ` Ville Syrjälä 2019-01-29 19:04 ` [Intel-gfx] " Daniel Vetter 0 siblings, 1 reply; 6+ messages in thread From: Ville Syrjälä @ 2019-01-29 17:58 UTC (permalink / raw) To: Sam Ravnborg; +Cc: intel-gfx, dri-devel On Tue, Jan 29, 2019 at 06:52:51PM +0100, Sam Ravnborg wrote: > Hi Ville. > > On Tue, Jan 29, 2019 at 07:06:09PM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > drm_color_lut_check() doens't modify the passed in blob so > > let's make it const. > > > > Also s/uint32_y/u32/ while at it. > > > > Cc: Matt Roper <matthew.d.roper@intel.com> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > --- > > drivers/gpu/drm/drm_color_mgmt.c | 6 +++--- > > include/drm/drm_color_mgmt.h | 4 ++-- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c > > index 968ca7c91ad8..3c8826a91a03 100644 > > --- a/drivers/gpu/drm/drm_color_mgmt.c > > +++ b/drivers/gpu/drm/drm_color_mgmt.c > > @@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties); > > * > > * Returns 0 on success, -EINVAL on failure. > > */ > > -int drm_color_lut_check(struct drm_property_blob *lut, > > - uint32_t tests) > > +int drm_color_lut_check(const struct drm_property_blob *lut, > > + u32 tests) > > No need to linewrap this line. > > { > > - struct drm_color_lut *entry; > > + const struct drm_color_lut *entry; > > int i; > > > > if (!lut || !tests) > > diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h > > index 6affbda6d9cb..58d4b20b5b97 100644 > > --- a/include/drm/drm_color_mgmt.h > > +++ b/include/drm/drm_color_mgmt.h > > @@ -96,6 +96,6 @@ enum drm_color_lut_tests { > > DRM_COLOR_LUT_NON_DECREASING = BIT(1), > > }; > > > > -int drm_color_lut_check(struct drm_property_blob *lut, > > - uint32_t tests); > > +int drm_color_lut_check(const struct drm_property_blob *lut, > > + u32 tests); > Likewise. > > With the linewrap fixed: > Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Thanks. > > Note: does not apply to my drm-misc tree. Anything I miss here? I think it was merged via drm-intel. -- Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm: Constify drm_color_lut_check() 2019-01-29 17:58 ` Ville Syrjälä @ 2019-01-29 19:04 ` Daniel Vetter 2019-01-29 21:33 ` Ville Syrjälä 0 siblings, 1 reply; 6+ messages in thread From: Daniel Vetter @ 2019-01-29 19:04 UTC (permalink / raw) To: Ville Syrjälä; +Cc: intel-gfx, Sam Ravnborg, dri-devel On Tue, Jan 29, 2019 at 07:58:56PM +0200, Ville Syrjälä wrote: > On Tue, Jan 29, 2019 at 06:52:51PM +0100, Sam Ravnborg wrote: > > Hi Ville. > > > > On Tue, Jan 29, 2019 at 07:06:09PM +0200, Ville Syrjala wrote: > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > > drm_color_lut_check() doens't modify the passed in blob so > > > let's make it const. > > > > > > Also s/uint32_y/u32/ while at it. > > > > > > Cc: Matt Roper <matthew.d.roper@intel.com> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > --- > > > drivers/gpu/drm/drm_color_mgmt.c | 6 +++--- > > > include/drm/drm_color_mgmt.h | 4 ++-- > > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c > > > index 968ca7c91ad8..3c8826a91a03 100644 > > > --- a/drivers/gpu/drm/drm_color_mgmt.c > > > +++ b/drivers/gpu/drm/drm_color_mgmt.c > > > @@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties); > > > * > > > * Returns 0 on success, -EINVAL on failure. > > > */ > > > -int drm_color_lut_check(struct drm_property_blob *lut, > > > - uint32_t tests) > > > +int drm_color_lut_check(const struct drm_property_blob *lut, > > > + u32 tests) > > > > No need to linewrap this line. > > > { > > > - struct drm_color_lut *entry; > > > + const struct drm_color_lut *entry; > > > int i; > > > > > > if (!lut || !tests) > > > diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h > > > index 6affbda6d9cb..58d4b20b5b97 100644 > > > --- a/include/drm/drm_color_mgmt.h > > > +++ b/include/drm/drm_color_mgmt.h > > > @@ -96,6 +96,6 @@ enum drm_color_lut_tests { > > > DRM_COLOR_LUT_NON_DECREASING = BIT(1), > > > }; > > > > > > -int drm_color_lut_check(struct drm_property_blob *lut, > > > - uint32_t tests); > > > +int drm_color_lut_check(const struct drm_property_blob *lut, > > > + u32 tests); > > Likewise. > > > > With the linewrap fixed: > > Reviewed-by: Sam Ravnborg <sam@ravnborg.org> > > Thanks. > > > > > Note: does not apply to my drm-misc tree. Anything I miss here? > > I think it was merged via drm-intel. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> for merging through drm-intel then (assuming it goes in before the merge cutoff), with Sam's suggestions ofc. -Daniel > > -- > Ville Syrjälä > Intel > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- 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] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm: Constify drm_color_lut_check() 2019-01-29 19:04 ` [Intel-gfx] " Daniel Vetter @ 2019-01-29 21:33 ` Ville Syrjälä 0 siblings, 0 replies; 6+ messages in thread From: Ville Syrjälä @ 2019-01-29 21:33 UTC (permalink / raw) To: Daniel Vetter; +Cc: intel-gfx, Sam Ravnborg, dri-devel On Tue, Jan 29, 2019 at 08:04:18PM +0100, Daniel Vetter wrote: > On Tue, Jan 29, 2019 at 07:58:56PM +0200, Ville Syrjälä wrote: > > On Tue, Jan 29, 2019 at 06:52:51PM +0100, Sam Ravnborg wrote: > > > Hi Ville. > > > > > > On Tue, Jan 29, 2019 at 07:06:09PM +0200, Ville Syrjala wrote: > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > > > > drm_color_lut_check() doens't modify the passed in blob so > > > > let's make it const. > > > > > > > > Also s/uint32_y/u32/ while at it. > > > > > > > > Cc: Matt Roper <matthew.d.roper@intel.com> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > --- > > > > drivers/gpu/drm/drm_color_mgmt.c | 6 +++--- > > > > include/drm/drm_color_mgmt.h | 4 ++-- > > > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c > > > > index 968ca7c91ad8..3c8826a91a03 100644 > > > > --- a/drivers/gpu/drm/drm_color_mgmt.c > > > > +++ b/drivers/gpu/drm/drm_color_mgmt.c > > > > @@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties); > > > > * > > > > * Returns 0 on success, -EINVAL on failure. > > > > */ > > > > -int drm_color_lut_check(struct drm_property_blob *lut, > > > > - uint32_t tests) > > > > +int drm_color_lut_check(const struct drm_property_blob *lut, > > > > + u32 tests) > > > > > > No need to linewrap this line. > > > > { > > > > - struct drm_color_lut *entry; > > > > + const struct drm_color_lut *entry; > > > > int i; > > > > > > > > if (!lut || !tests) > > > > diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h > > > > index 6affbda6d9cb..58d4b20b5b97 100644 > > > > --- a/include/drm/drm_color_mgmt.h > > > > +++ b/include/drm/drm_color_mgmt.h > > > > @@ -96,6 +96,6 @@ enum drm_color_lut_tests { > > > > DRM_COLOR_LUT_NON_DECREASING = BIT(1), > > > > }; > > > > > > > > -int drm_color_lut_check(struct drm_property_blob *lut, > > > > - uint32_t tests); > > > > +int drm_color_lut_check(const struct drm_property_blob *lut, > > > > + u32 tests); > > > Likewise. > > > > > > With the linewrap fixed: > > > Reviewed-by: Sam Ravnborg <sam@ravnborg.org> > > > > Thanks. > > > > > > > > Note: does not apply to my drm-misc tree. Anything I miss here? > > > > I think it was merged via drm-intel. > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > for merging through drm-intel then (assuming it goes in before the merge > cutoff), with Sam's suggestions ofc. Fixed up and pushed to dinq. Thanks for the review. -- Ville Syrjälä Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: Constify drm_color_lut_check() 2019-01-29 17:06 [PATCH] drm: Constify drm_color_lut_check() Ville Syrjala 2019-01-29 17:52 ` Sam Ravnborg @ 2019-01-29 19:24 ` Brian Starkey 1 sibling, 0 replies; 6+ messages in thread From: Brian Starkey @ 2019-01-29 19:24 UTC (permalink / raw) To: Ville Syrjala Cc: intel-gfx@lists.freedesktop.org, nd, dri-devel@lists.freedesktop.org On Tue, Jan 29, 2019 at 07:06:09PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > drm_color_lut_check() doens't modify the passed in blob so s/doens't/doesn't/ Otherwise, LGTM. Reviewed-by: <brian.starkey@arm.com> > let's make it const. > > Also s/uint32_y/u32/ while at it. > > Cc: Matt Roper <matthew.d.roper@intel.com> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/drm_color_mgmt.c | 6 +++--- > include/drm/drm_color_mgmt.h | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c > index 968ca7c91ad8..3c8826a91a03 100644 > --- a/drivers/gpu/drm/drm_color_mgmt.c > +++ b/drivers/gpu/drm/drm_color_mgmt.c > @@ -474,10 +474,10 @@ EXPORT_SYMBOL(drm_plane_create_color_properties); > * > * Returns 0 on success, -EINVAL on failure. > */ > -int drm_color_lut_check(struct drm_property_blob *lut, > - uint32_t tests) > +int drm_color_lut_check(const struct drm_property_blob *lut, > + u32 tests) > { > - struct drm_color_lut *entry; > + const struct drm_color_lut *entry; > int i; > > if (!lut || !tests) > diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h > index 6affbda6d9cb..58d4b20b5b97 100644 > --- a/include/drm/drm_color_mgmt.h > +++ b/include/drm/drm_color_mgmt.h > @@ -96,6 +96,6 @@ enum drm_color_lut_tests { > DRM_COLOR_LUT_NON_DECREASING = BIT(1), > }; > > -int drm_color_lut_check(struct drm_property_blob *lut, > - uint32_t tests); > +int drm_color_lut_check(const struct drm_property_blob *lut, > + u32 tests); > #endif > -- > 2.19.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-29 21:33 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-29 17:06 [PATCH] drm: Constify drm_color_lut_check() Ville Syrjala 2019-01-29 17:52 ` Sam Ravnborg 2019-01-29 17:58 ` Ville Syrjälä 2019-01-29 19:04 ` [Intel-gfx] " Daniel Vetter 2019-01-29 21:33 ` Ville Syrjälä 2019-01-29 19:24 ` Brian Starkey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox