Skip to content
Snippets Groups Projects
Commit cb6443f6 authored by yuan.tian's avatar yuan.tian Committed by Gianfranco Mariotti
Browse files

MGS-6835 [#ccc] fix build error of incompatible-pointer-types


Fix build error when use imx_v6_v7 defconfig or enable CONFIG_PROVE_LOCKING.

drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c: In function ‘gckKERNEL_Construct’:
./drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_mutex.h:74:73: error: passing argument 3 of ‘gckOS_Allocate’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   74 |     gceSTATUS _status = gckOS_Allocate(Os, gcmSIZEOF(struct key_mutex), &key_mut); \
      |                                                                         ^~~~~~~~
      |                                                                         |
      |                                                                         struct key_mutex **
./drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h:4427:18: note: in definition of macro ‘_gcmkONERROR’
 4427 |         status = func; \
      |                  ^~~~
drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c:584:9: note: in expansion of macro ‘gcmkONERROR’
  584 |         gcmkONERROR(gckOS_CreateMutex(Os, &kernel->db->dbMutex));
      |         ^~~~~~~~~~~
drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c:584:21: note: in expansion of macro ‘gckOS_CreateMutex’
  584 |         gcmkONERROR(gckOS_CreateMutex(Os, &kernel->db->dbMutex));
      |                     ^~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h:59,
                 from drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c:56:
./drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h:293:22: note: expected ‘void **’ but argument is of type ‘struct key_mutex **’
  293 |     OUT gctPOINTER * Memory
      |         ~~~~~~~~~~~~~^~~~~~

Signed-off-by: default avataryuan.tian <yuan.tian@nxp.com>
parent a8673c6b
No related branches found
No related tags found
1 merge request!156Draft: [i.MX] mxc: gpu-viv: apply patches
......@@ -71,9 +71,9 @@ struct key_mutex {
({ \
/* Allocate the mutex structure. */ \
struct key_mutex *key_mut; \
gceSTATUS _status = gckOS_Allocate(Os, gcmSIZEOF(struct key_mutex), &key_mut); \
gceSTATUS _status = gckOS_Allocate(Os, gcmSIZEOF(struct key_mutex), (gctPOINTER *)&key_mut); \
\
if (gcmIS_SUCCESS(_status)) { \
if (gcmIS_SUCCESS(_status)) { \
/* Initialize the mutex. */ \
lockdep_register_key(&key_mut->key); \
__mutex_init((&key_mut->mut), #Mutex, (&key_mut->key)); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment