dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm: prefer inline over __inline__
@ 2018-03-27 20:47 Jani Nikula
  2018-03-27 20:47 ` [PATCH 2/3] drm: remove old documentation comment cruft from drmP.h Jani Nikula
  2018-03-27 20:47 ` [PATCH 3/3] drm: make drm_core_check_feature() bool that it is Jani Nikula
  0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2018-03-27 20:47 UTC (permalink / raw)
  To: dri-devel; +Cc: Jani Nikula, intel-gfx

Remove last users of __inline__.

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

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index c6666cd09347..4bbef061c9c0 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -123,8 +123,7 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
 #define DRM_SWITCH_POWER_CHANGING 2
 #define DRM_SWITCH_POWER_DYNAMIC_OFF 3
 
-static __inline__ int drm_core_check_feature(struct drm_device *dev,
-					     int feature)
+static inline int drm_core_check_feature(struct drm_device *dev, int feature)
 {
 	return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
@@ -143,7 +142,7 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
 /*@}*/
 
 /* returns true if currently okay to sleep */
-static __inline__ bool drm_can_sleep(void)
+static inline bool drm_can_sleep(void)
 {
 	if (in_atomic() || in_dbg_master() || irqs_disabled())
 		return false;
diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
index cf0e7d89bcdf..8fad66f88e4f 100644
--- a/include/drm/drm_legacy.h
+++ b/include/drm/drm_legacy.h
@@ -194,8 +194,8 @@ void drm_legacy_ioremap(struct drm_local_map *map, struct drm_device *dev);
 void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev);
 void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev);
 
-static __inline__ struct drm_local_map *drm_legacy_findmap(struct drm_device *dev,
-							   unsigned int token)
+static inline struct drm_local_map *drm_legacy_findmap(struct drm_device *dev,
+						       unsigned int token)
 {
 	struct drm_map_list *_entry;
 	list_for_each_entry(_entry, &dev->maplist, head)
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] drm: remove old documentation comment cruft from drmP.h
  2018-03-27 20:47 [PATCH 1/3] drm: prefer inline over __inline__ Jani Nikula
@ 2018-03-27 20:47 ` Jani Nikula
  2018-03-27 20:47 ` [PATCH 3/3] drm: make drm_core_check_feature() bool that it is Jani Nikula
  1 sibling, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2018-03-27 20:47 UTC (permalink / raw)
  To: dri-devel; +Cc: Jani Nikula, intel-gfx

Throw out the leftovers.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 include/drm/drmP.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 4bbef061c9c0..b5d52a3d7d19 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -95,14 +95,6 @@ struct dma_buf_attachment;
 struct pci_dev;
 struct pci_controller;
 
-/***********************************************************************/
-/** \name DRM template customization defaults */
-/*@{*/
-
-/***********************************************************************/
-/** \name Internal types and structures */
-/*@{*/
-
 #define DRM_IF_VERSION(maj, min) (maj << 16 | min)
 
 /**
@@ -128,19 +120,6 @@ static inline int drm_core_check_feature(struct drm_device *dev, int feature)
 	return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
 
-/******************************************************************/
-/** \name Internal function definitions */
-/*@{*/
-
-				/* Driver support (drm_drv.h) */
-
-/*
- * These are exported to drivers so that they can implement fencing using
- * DMA quiscent + idle. DMA quiescent usually requires the hardware lock.
- */
-
-/*@}*/
-
 /* returns true if currently okay to sleep */
 static inline bool drm_can_sleep(void)
 {
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] drm: make drm_core_check_feature() bool that it is
  2018-03-27 20:47 [PATCH 1/3] drm: prefer inline over __inline__ Jani Nikula
  2018-03-27 20:47 ` [PATCH 2/3] drm: remove old documentation comment cruft from drmP.h Jani Nikula
@ 2018-03-27 20:47 ` Jani Nikula
  2018-03-27 20:59   ` Chris Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2018-03-27 20:47 UTC (permalink / raw)
  To: dri-devel; +Cc: Jani Nikula, intel-gfx

Bool is the more appropriate return type here, use it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 include/drm/drmP.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index b5d52a3d7d19..f5099c12c6a6 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -115,9 +115,9 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
 #define DRM_SWITCH_POWER_CHANGING 2
 #define DRM_SWITCH_POWER_DYNAMIC_OFF 3
 
-static inline int drm_core_check_feature(struct drm_device *dev, int feature)
+static inline bool drm_core_check_feature(struct drm_device *dev, int feature)
 {
-	return ((dev->driver->driver_features & feature) ? 1 : 0);
+	return dev->driver->driver_features & feature;
 }
 
 /* returns true if currently okay to sleep */
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] drm: make drm_core_check_feature() bool that it is
  2018-03-27 20:47 ` [PATCH 3/3] drm: make drm_core_check_feature() bool that it is Jani Nikula
@ 2018-03-27 20:59   ` Chris Wilson
  2018-03-28  6:36     ` Jani Nikula
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-03-27 20:59 UTC (permalink / raw)
  To: dri-devel; +Cc: Jani Nikula, intel-gfx

Quoting Jani Nikula (2018-03-27 21:47:22)
> Bool is the more appropriate return type here, use it.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

All 3,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] drm: make drm_core_check_feature() bool that it is
  2018-03-27 20:59   ` Chris Wilson
@ 2018-03-28  6:36     ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2018-03-28  6:36 UTC (permalink / raw)
  To: Chris Wilson, dri-devel; +Cc: intel-gfx

On Tue, 27 Mar 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-03-27 21:47:22)
>> Bool is the more appropriate return type here, use it.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> All 3,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks, all pushed to drm-misc-next.

BR,
Jani.


-- 
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] 5+ messages in thread

end of thread, other threads:[~2018-03-28  6:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 20:47 [PATCH 1/3] drm: prefer inline over __inline__ Jani Nikula
2018-03-27 20:47 ` [PATCH 2/3] drm: remove old documentation comment cruft from drmP.h Jani Nikula
2018-03-27 20:47 ` [PATCH 3/3] drm: make drm_core_check_feature() bool that it is Jani Nikula
2018-03-27 20:59   ` Chris Wilson
2018-03-28  6:36     ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox