From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Luc Michel <luc.michel@amd.com>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Francisco Iglesias <francisco.iglesias@amd.com>,
"Edgar E . Iglesias" <edgar.iglesias@amd.com>,
Alistair Francis <alistair@alistair23.me>,
Vikram Garhwal <vikram.garhwal@bytedance.com>
Subject: Re: [PATCH v2 0/7] Register API leaks fixes
Date: Thu, 9 Oct 2025 08:23:25 +0200 [thread overview]
Message-ID: <64f40ff8-3694-4c9a-80b6-0f58f01d7995@linaro.org> (raw)
In-Reply-To: <20251002073418.109375-1-luc.michel@amd.com>
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, ®_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, ®_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.
next prev parent reply other threads:[~2025-10-09 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 7:34 [PATCH v2 0/7] Register API leaks fixes Luc Michel
2025-10-02 7:34 ` [PATCH v2 1/7] hw/core/register: remove the REGISTER device type Luc Michel
2025-10-02 7:34 ` [PATCH v2 2/7] hw/core/register: add the REGISTER_ARRAY type Luc Michel
2025-10-02 7:34 ` [PATCH v2 3/7] hw/core/register: remove the calls to `register_finalize_block' Luc Michel
2025-10-02 7:34 ` [PATCH v2 4/7] hw/core/register: remove the `register_finalize_block' function Luc Michel
2025-10-02 7:34 ` [PATCH v2 5/7] hw/net/can/xlnx-versal-canfd: remove unused include directives Luc Michel
2025-10-02 7:34 ` [PATCH v2 6/7] hw/net/can/xlnx-versal-canfd: refactor the banked registers logic Luc Michel
2025-10-02 7:34 ` [PATCH v2 7/7] hw/net/can/xlnx-versal-canfd: remove register API usage for banked regs Luc Michel
2025-10-09 6:23 ` Philippe Mathieu-Daudé [this message]
2025-10-09 6:33 ` [PATCH v2 0/7] Register API leaks fixes Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64f40ff8-3694-4c9a-80b6-0f58f01d7995@linaro.org \
--to=philmd@linaro.org \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@amd.com \
--cc=francisco.iglesias@amd.com \
--cc=luc.michel@amd.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vikram.garhwal@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).