diff options
author | John Snow <jsnow@redhat.com> | 2015-01-19 15:15:56 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-02-16 14:40:55 +0000 |
commit | 6100ddb0f9776555b581455be4707f2077eee42f (patch) | |
tree | a8004df8fffcc639ba45590a6726c77aa33c3850 /disas.c | |
parent | 90e5add6f2fa0b0bd9a4c1d5a4de2304b5f3e466 (diff) | |
download | qemu-6100ddb0f9776555b581455be4707f2077eee42f.tar.gz qemu-6100ddb0f9776555b581455be4707f2077eee42f.tar.bz2 qemu-6100ddb0f9776555b581455be4707f2077eee42f.zip |
qtest/ahci: Store hba_base in AHCIQState
Store the HBA memory base address in the new state object, to simplify
function prototypes and encourage a more functional testing style.
This causes a lot of churn, but this patch is as "simplified" as I could
get it to be. This patch is therefore fairly mechanical and straightforward:
Any case where we pass "hba_base" has been consolidated into the AHCIQState
object and we pass the one unified parameter.
Any case where we reference "ahci" and "hba_state" have been modified to use
"ahci->dev" for the PCIDevice and "ahci->hba_state" to get at the base memory
address, accordingly.
Notes:
- A needless return is removed from start_ahci_device.
- For ease of reviewing, this patch can be reproduced (mostly) by:
# Replace (ahci, hba_base) prototypes with unified parameter
's/(QPCIDevice \*ahci, void \*\?\*hba_base/(AHCIQState *ahci/'
# Replace (ahci->dev, hba_base) calls with unified parameter
's/(ahci->dev, &\?hba_base)/(ahci)/'
# Replace calls to PCI config space using "ahci" with "ahci->dev"
's/qpci_config_\(read\|write\)\(.\)(ahci,/qpci_config_\1\2(ahci->dev,/'
After these, the remaining differences are easy to review by hand.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1421698563-6977-9-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'disas.c')
0 files changed, 0 insertions, 0 deletions