diff mbox series

drm/exynos: fix g2d_open/close helper function definitions

Message ID 20230417210423.2517593-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit 2ef0785b30bd6549ddbc124979f1b6596e065ae2
Headers show
Series drm/exynos: fix g2d_open/close helper function definitions | expand

Commit Message

Arnd Bergmann April 17, 2023, 9:04 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andi Shyti April 25, 2023, 4:56 p.m. UTC | #1
Hi Arnd,

On Mon, Apr 17, 2023 at 11:04:11PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Cc: <stable@vger.kernel.org> # v4.19+

Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.h b/drivers/gpu/drm/exynos/exynos_drm_g2d.h
index 74ea3c26dead..1a5ae781b56c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.h
@@ -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