Hi Luc,

On 2/10/25 09:34, Luc Michel wrote:

This series addresses the memory leaks caused by the register API. The
first patches fix the API itself while the last ones take care of the
CANFD model.


Luc Michel (7):
   hw/core/register: remove the REGISTER device type
   hw/core/register: add the REGISTER_ARRAY type
   hw/core/register: remove the calls to `register_finalize_block'
   hw/core/register: remove the `register_finalize_block' function
   hw/net/can/xlnx-versal-canfd: remove unused include directives
   hw/net/can/xlnx-versal-canfd: refactor the banked registers logic
   hw/net/can/xlnx-versal-canfd: remove register API usage for banked
     regs

I had few issues with your series:

../../hw/net/can/xlnx-versal-canfd.c:1917:30: error: unused variable 'canfd_regs_ops' [-Werror,-Wunused-const-variable]
 1917 | static const MemoryRegionOps canfd_regs_ops = {
      |                              ^~~~~~~~~~~~~~

../../hw/net/can/xlnx-versal-canfd.c:1871:42: error: use of undeclared identifier 'TYPE_REGISTER'
 1871 |         object_initialize(r, sizeof(*r), TYPE_REGISTER);
      |                                          ^

../../hw/net/can/xlnx-versal-canfd.c:1700:48: error: incompatible pointer types passing 'hwaddr *' (aka 'unsigned long long *') to parameter of type 'size_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
 1700 |     if (!canfd_decode_addr(s, addr, &bank_idx, &reg_offset)) {
      |                                                ^~~~~~~~~~~
../../hw/net/can/xlnx-versal-canfd.c:1651:52: note: passing argument to parameter 'offset' here
 1651 |                               size_t *idx, size_t *offset)
      |                                                    ^
../../hw/net/can/xlnx-versal-canfd.c:1722:48: error: incompatible pointer types passing 'hwaddr *' (aka 'unsigned long long *') to parameter of type 'size_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
 1722 |     if (!canfd_decode_addr(s, addr, &bank_idx, &reg_offset)) {
      |                                                ^~~~~~~~~~~
../../hw/net/can/xlnx-versal-canfd.c:1651:52: note: passing argument to parameter 'offset' here
 1651 |                               size_t *idx, size_t *offset)
      |                                                    ^

I fixed them by re-ordering the xlnx-versal-canfd patches first,
having canfd_decode_FOO() taking a 'hwaddr *offset' and using a
temporary __attribute__ ((unused)) for canfd_regs_ops[].

I'm queuing this series as fixed, except if you disagree.

Regards,

Phil.

Reply via email to