Skip to contentSkip to conversation

drm/exynos: fix g2d_open/close helper function definitions

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 17, 2023 – Apr 25, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/exynos: fix g2d_open/close helper function definitions

From: Arnd Bergmann <[email protected]>

The empty stub functions are defined as global functions, which causes a warning because of missing prototypes:

drivers/gpu/drm/exynos/exynos_drm_g2d.h:37:5: error: no previous prototype for 'g2d_open' drivers/gpu/drm/exynos/exynos_drm_g2d.h:42:5: error: no previous prototype for 'g2d_close'

Mark them as 'static inline' to avoid the warning and to make them behave as intended.

Fixes eb4d9796fa34 ("drm/exynos: g2d: Convert to driver component API")
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_g2d.h +2 -2
index 74ea3c26dead..1a5ae781b56c 100644
@@ -34,11 +34,11 @@ static inline int exynos_g2d_exec_ioctl(struct drm_device *dev, void *data,
 	return -ENODEV;
 }
 
-int g2d_open(struct drm_device *drm_dev, struct drm_file *file)
+static inline int g2d_open(struct drm_device *drm_dev, struct drm_file *file)
 {
 	return 0;
 }
 
-void g2d_close(struct drm_device *drm_dev, struct drm_file *file)
+static inline void g2d_close(struct drm_device *drm_dev, struct drm_file *file)
 { }
 #endif
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The empty stub functions are defined as global functions, which causes a warning because of missing prototypes:

Quoted 8 lines

drivers/gpu/drm/exynos/exynos_drm_g2d.h:37:5: error: no previous prototype for 'g2d_open' drivers/gpu/drm/exynos/exynos_drm_g2d.h:42:5: error: no previous prototype for 'g2d_close'

Mark them as 'static inline' to avoid the warning and to make them behave as intended.

Fixes eb4d9796fa34 ("drm/exynos: g2d: Convert to driver component API")
Cc <[email protected]> # v4.19+

Thanks,
Andi