Samsung / TizenRT

TizenRT is a lightweight RTOS-based platform to support low-end IoT devices
Apache License 2.0
566 stars 571 forks source link

os/board/rtl8730e: BSP cleanup #6210

Closed edwakuwaku closed 4 months ago

sunghan-chang commented 4 months ago

@edwakuwaku Thank you for cleaning up. But there are many build warnings in RTK BSP. Could you check them with your team?

sunghan-chang commented 4 months ago

@edwakuwaku It could have a potential issue.

sunghan-chang commented 4 months ago

@edwakuwaku Could you rebase this PR? Then we can check the build test.

edwakuwaku commented 4 months ago

@edwakuwaku Thank you for cleaning up. But there are many build warnings in RTK BSP. Could you check them with your team?

Hi @sunghan-chang , as I have checked, I don't see many warning logs which is directly pointing to RTK BSP. It seems some are from armv7-a arch layer, and some are coming from newly added pm driver and kernel mm module. Please help to check those as well.

sunghan-chang commented 4 months ago

Yes, not much, 3 warnings are remain.

make[2]: Entering directory '/*******/os/board/rtl8730e/src'
Makefile:215: target 'rtk_bt_le_gap.o' given more than once in the same rule
CC:  component/soc/amebad2/fwlib/ram_common/ameba_flash_ram.c
component/soc/amebad2/fwlib/ram_common/ameba_flash_ram.c: In function 'FLASH_Write_Lock':
component/soc/amebad2/fwlib/ram_common/ameba_flash_ram.c:87:1: warning: label 'retry_gating' defined but not used [-Wunused-label]
 retry_gating:
 ^~~~~~~~~~~~
CC:  component/wifi/inic/inic_ipc_host_trx.c
In file included from component/wifi/inic/inic_ipc_host_trx.c:24:0:
/*******/os/net/netmgr/netdev_mgr_internal.h:59:48: warning: 'struct ifaddrs' declared inside parameter list will not be visible outside of this definition or declaration
  int (*get_ifaddrs)(struct netdev *dev, struct ifaddrs **addrs);
                                                ^~~~~~~

Let us check below first

CC:  component/os_dep/osdep_service_critical.c
component/os_dep/osdep_service_critical.c: In function 'rtw_spinlock_init':
component/os_dep/osdep_service_critical.c:94:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(*plock);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_critical.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_list.c
CC:  component/os_dep/osdep_service_memory.c
component/os_dep/osdep_service_memory.c: In function 'rtw_vmalloc':
component/os_dep/osdep_service_memory.c:22:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_zvmalloc':
component/os_dep/osdep_service_memory.c:38:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_malloc':
component/os_dep/osdep_service_memory.c:60:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_zmalloc':
component/os_dep/osdep_service_memory.c:77:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_calloc':
component/os_dep/osdep_service_memory.c:93:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_misc.c
CC:  component/os_dep/osdep_service_mutex.c
component/os_dep/osdep_service_mutex.c: In function 'rtw_mutex_init':
component/os_dep/osdep_service_mutex.c:123:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(*pmutex);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_mutex.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_queue.c
CC:  component/os_dep/osdep_service_sem.c
component/os_dep/osdep_service_sem.c: In function 'rtw_init_sema':
component/os_dep/osdep_service_sem.c:19:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(*sema);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_sem.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_task.c
CC:  component/os_dep/osdep_service_time.c
CC:  component/os_dep/osdep_service_timer.c
component/os_dep/osdep_service_timer.c: In function 'rtw_timerCreate':
component/os_dep/osdep_service_timer.c:30:2: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
  DEBUG_SET_CALLER_ADDR(timer);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_timer.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_timer.c:39:2: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
  DEBUG_SET_CALLER_ADDR(timer->work_hdl);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_timer.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_timer.c:63:2: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
  DEBUG_SET_CALLER_ADDR(timer_entry);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_timer.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
edwakuwaku commented 4 months ago

Yes, not much, 3 warnings are remain.

make[2]: Entering directory '/*******/os/board/rtl8730e/src'
Makefile:215: target 'rtk_bt_le_gap.o' given more than once in the same rule
CC:  component/soc/amebad2/fwlib/ram_common/ameba_flash_ram.c
component/soc/amebad2/fwlib/ram_common/ameba_flash_ram.c: In function 'FLASH_Write_Lock':
component/soc/amebad2/fwlib/ram_common/ameba_flash_ram.c:87:1: warning: label 'retry_gating' defined but not used [-Wunused-label]
 retry_gating:
 ^~~~~~~~~~~~
CC:  component/wifi/inic/inic_ipc_host_trx.c
In file included from component/wifi/inic/inic_ipc_host_trx.c:24:0:
/*******/os/net/netmgr/netdev_mgr_internal.h:59:48: warning: 'struct ifaddrs' declared inside parameter list will not be visible outside of this definition or declaration
  int (*get_ifaddrs)(struct netdev *dev, struct ifaddrs **addrs);
                                                ^~~~~~~

Let us check below first

CC:  component/os_dep/osdep_service_critical.c
component/os_dep/osdep_service_critical.c: In function 'rtw_spinlock_init':
component/os_dep/osdep_service_critical.c:94:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(*plock);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_critical.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_list.c
CC:  component/os_dep/osdep_service_memory.c
component/os_dep/osdep_service_memory.c: In function 'rtw_vmalloc':
component/os_dep/osdep_service_memory.c:22:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_zvmalloc':
component/os_dep/osdep_service_memory.c:38:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_malloc':
component/os_dep/osdep_service_memory.c:60:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_zmalloc':
component/os_dep/osdep_service_memory.c:77:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_memory.c: In function 'rtw_calloc':
component/os_dep/osdep_service_memory.c:93:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(pbuf);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_memory.c:6:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_misc.c
CC:  component/os_dep/osdep_service_mutex.c
component/os_dep/osdep_service_mutex.c: In function 'rtw_mutex_init':
component/os_dep/osdep_service_mutex.c:123:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(*pmutex);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_mutex.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_queue.c
CC:  component/os_dep/osdep_service_sem.c
component/os_dep/osdep_service_sem.c: In function 'rtw_init_sema':
component/os_dep/osdep_service_sem.c:19:3: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
   DEBUG_SET_CALLER_ADDR(*sema);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_sem.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
CC:  component/os_dep/osdep_service_task.c
CC:  component/os_dep/osdep_service_time.c
CC:  component/os_dep/osdep_service_timer.c
component/os_dep/osdep_service_timer.c: In function 'rtw_timerCreate':
component/os_dep/osdep_service_timer.c:30:2: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
  DEBUG_SET_CALLER_ADDR(timer);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_timer.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_timer.c:39:2: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
  DEBUG_SET_CALLER_ADDR(timer->work_hdl);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_timer.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~
component/os_dep/osdep_service_timer.c:63:2: warning: passing argument 2 of 'heapinfo_set_caller_addr' makes integer from pointer without a cast [-Wint-conversion]
  DEBUG_SET_CALLER_ADDR(timer_entry);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /*******/os/include/tinyara/kmalloc.h:65:0,
                 from /*******/os/board/rtl8730e/src/component/os_dep/osdep_service.h:62,
                 from component/os_dep/osdep_service_timer.c:7:
/*******/os/include/tinyara/mm/mm.h:713:6: note: expected 'mmaddress_t {aka unsigned int}' but argument is of type 'void *'
 void heapinfo_set_caller_addr(void *address, mmaddress_t caller_retaddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~

Thanks for pointing the first warning, as I enabled PM and SMP. It is not appearing as a warning, thus I missed that. For 2, we included the Tizen Lite netmgr header file, and the warning comes from there, so I don't think that belongs to rtk error. For 3, I saw a PR from Eunwoo revising that, please update us regarding this as well.

sunghan-chang commented 4 months ago

@edwakuwaku Below is still remain. Could you check it?

make[2]: Entering directory '/*******/os/board/rtl8730e/src'
Makefile:214: target 'rtk_bt_le_gap.o' given more than once in the same rule
edwakuwaku commented 4 months ago

@edwakuwaku Below is still remain. Could you check it?

make[2]: Entering directory '/*******/os/board/rtl8730e/src'
Makefile:214: target 'rtk_bt_le_gap.o' given more than once in the same rule

Sorry I misunderstood your comment above, there was a duplicated file being added in the make.defs, it has been removed.