diff mbox series

[2/3] drm: annotate drm_core_check_feature() dev arg. as const

Message ID 20181219192247.29880-3-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm: tweak permission handling | expand

Commit Message

Emil Velikov Dec. 19, 2018, 7:22 p.m. UTC
From: Emil Velikov <emil.velikov@collabora.com>

This static inline function doesn't modify any state.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 include/drm/drm_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter Dec. 19, 2018, 8:35 p.m. UTC | #1
On Wed, Dec 19, 2018 at 07:22:46PM +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> This static inline function doesn't modify any state.
> 
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  include/drm/drm_drv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 35af23f5fa0d..eca73330ffaf 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -666,7 +666,7 @@ static inline bool drm_dev_is_unplugged(struct drm_device *dev)
>   *
>   * Returns true if the @feature is supported, false otherwise.
>   */
> -static inline bool drm_core_check_feature(struct drm_device *dev, u32 feature)
> +static inline bool drm_core_check_feature(const struct drm_device *dev, u32 feature)
>  {
>  	return dev->driver->driver_features & dev->driver_features & feature;
>  }
> -- 
> 2.19.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 35af23f5fa0d..eca73330ffaf 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -666,7 +666,7 @@  static inline bool drm_dev_is_unplugged(struct drm_device *dev)
  *
  * Returns true if the @feature is supported, false otherwise.
  */
-static inline bool drm_core_check_feature(struct drm_device *dev, u32 feature)
+static inline bool drm_core_check_feature(const struct drm_device *dev, u32 feature)
 {
 	return dev->driver->driver_features & dev->driver_features & feature;
 }