From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>
Subject: Re: [PATCH] hw/pci-host: Use register definitions from PCI standard
Date: Thu, 5 Jan 2023 17:34:14 +0100 [thread overview]
Message-ID: <741765df-a46a-6020-35b7-239117534e69@linaro.org> (raw)
In-Reply-To: <2489f6ef-997a-0cf5-fbdc-c05e4fb7c7fd@eik.bme.hu>
On 5/1/23 17:02, BALATON Zoltan wrote:
> On Thu, 5 Jan 2023, Philippe Mathieu-Daudé wrote:
>> No need to document magic values when the definition names
>> from "standard-headers/linux/pci_regs.h" are self-explicit.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/pci-host/grackle.c | 2 +-
>> hw/pci-host/raven.c | 6 +++---
>> hw/pci-host/uninorth.c | 30 +++++++++++-------------------
>> 3 files changed, 15 insertions(+), 23 deletions(-)
>> diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
>> index 8396c91d59..342baff12a 100644
>> --- a/hw/pci-host/uninorth.c
>> +++ b/hw/pci-host/uninorth.c
>> @@ -277,11 +277,11 @@ static void pci_unin_internal_init(Object *obj)
>> static void unin_main_pci_host_realize(PCIDevice *d, Error **errp)
>> {
>> /* cache_line_size */
>> - d->config[0x0C] = 0x08;
>> + d->config[PCI_CACHE_LINE_SIZE] = 0x08;
>> /* latency_timer */
>> - d->config[0x0D] = 0x10;
>> + d->config[PCI_LATENCY_TIMER] = 0x10;
>> /* capabilities_pointer */
>> - d->config[0x34] = 0x00;
>> + d->config[PCI_CAPABILITY_LIST] = 0x00;
>
> Did you mean to remove the comments here as well?
Good point, thanks!
next prev parent reply other threads:[~2023-01-05 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 14:41 [PATCH] hw/pci-host: Use register definitions from PCI standard Philippe Mathieu-Daudé
2023-01-05 16:02 ` BALATON Zoltan
2023-01-05 16:34 ` Philippe Mathieu-Daudé [this message]
2023-01-05 16:37 ` Bernhard Beschow
2023-01-07 23:58 ` Mark Cave-Ayland
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=741765df-a46a-6020-35b7-239117534e69@linaro.org \
--to=philmd@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=hpoussin@reactos.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).