From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>,
Fan Ni <fan.ni@samsung.com>,
linuxarm@huawei.com
Subject: Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs
Date: Tue, 3 Oct 2023 09:28:41 -0400 [thread overview]
Message-ID: <20231003092820-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230925152258.5444-1-Jonathan.Cameron@huawei.com>
On Mon, Sep 25, 2023 at 04:22:58PM +0100, Jonathan Cameron wrote:
> Rename the version not burried in the macro to cap_h.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
pls merge with the rest of local shadowing things.
> I had another instance of this in a series I'll post later today.
> Cleaned that up the same way.
>
> hw/cxl/cxl-device-utils.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/cxl/cxl-device-utils.c b/hw/cxl/cxl-device-utils.c
> index 517f06d869..bd68328032 100644
> --- a/hw/cxl/cxl-device-utils.c
> +++ b/hw/cxl/cxl-device-utils.c
> @@ -283,13 +283,13 @@ static void memdev_reg_init_common(CXLDeviceState *cxl_dstate) { }
>
> void cxl_device_register_init_common(CXLDeviceState *cxl_dstate)
> {
> - uint64_t *cap_hdrs = cxl_dstate->caps_reg_state64;
> + uint64_t *cap_h = cxl_dstate->caps_reg_state64;
> const int cap_count = 3;
>
> /* CXL Device Capabilities Array Register */
> - ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_ID, 0);
> - ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1);
> - ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count);
> + ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_ID, 0);
> + ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1);
> + ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count);
>
> cxl_device_cap_init(cxl_dstate, DEVICE_STATUS, 1, 2);
> device_reg_init_common(cxl_dstate);
> --
> 2.39.2
next prev parent reply other threads:[~2023-10-03 13:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230925152310uscas1p1b621d173ac0c0ce2163e4f2c788e4fdf@uscas1p1.samsung.com>
2023-09-25 15:22 ` [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs Jonathan Cameron via
2023-09-27 19:13 ` Fan Ni
2023-09-28 12:22 ` Jonathan Cameron via
2023-09-29 7:50 ` Markus Armbruster
2023-10-03 17:20 ` Fan Ni
2023-10-03 13:28 ` Michael S. Tsirkin [this message]
2023-10-03 17:21 ` Fan Ni
2023-10-04 10:32 ` Markus Armbruster
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=20231003092820-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=armbru@redhat.com \
--cc=fan.ni@samsung.com \
--cc=linuxarm@huawei.com \
--cc=qemu-devel@nongnu.org \
/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).