|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH] hw/pci-host: Use register definitions from PCI standard |
Date: | Thu, 5 Jan 2023 17:34:14 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
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!
[Prev in Thread] | Current Thread | [Next in Thread] |