summaryrefslogtreecommitdiffstats
path: root/hw/s390x/s390-pci-inst.c
diff options
context:
space:
mode:
authorYi Min Zhao2015-12-14 09:52:28 +0100
committerCornelia Huck2016-01-13 10:53:42 +0100
commitde37b0b87f9aee78a7181d9ca603e013e08b3f11 (patch)
tree49ccf59baf9d086e330937f8bcdef083cd2ef3b4 /hw/s390x/s390-pci-inst.c
parents390x/pci: reject some operations to disabled PCI function (diff)
downloadqemu-de37b0b87f9aee78a7181d9ca603e013e08b3f11.tar.gz
qemu-de37b0b87f9aee78a7181d9ca603e013e08b3f11.tar.xz
qemu-de37b0b87f9aee78a7181d9ca603e013e08b3f11.zip
s390x/pci: code cleanup
Make use of the new FH_ENABLED define in existing code. Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-pci-inst.c')
-rw-r--r--hw/s390x/s390-pci-inst.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index df57a7dfbf..d521b2b389 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -208,12 +208,12 @@ int clp_service_call(S390CPU *cpu, uint8_t r2)
switch (reqsetpci->oc) {
case CLP_SET_ENABLE_PCI_FN:
- pbdev->fh = pbdev->fh | 1 << ENABLE_BIT_OFFSET;
+ pbdev->fh = pbdev->fh | FH_ENABLED;
stl_p(&ressetpci->fh, pbdev->fh);
stw_p(&ressetpci->hdr.rsp, CLP_RC_OK);
break;
case CLP_SET_DISABLE_PCI_FN:
- pbdev->fh = pbdev->fh & ~(1 << ENABLE_BIT_OFFSET);
+ pbdev->fh = pbdev->fh & ~FH_ENABLED;
pbdev->error_state = false;
pbdev->lgstg_blocked = false;
stl_p(&ressetpci->fh, pbdev->fh);
@@ -818,7 +818,7 @@ int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
((uint32_t)pbdev->sum << 7) | pbdev->routes.adapter.summary_offset;
stl_p(&fib.data, data);
- if (pbdev->fh >> ENABLE_BIT_OFFSET) {
+ if (pbdev->fh & FH_ENABLED) {
fib.fc |= 0x80;
}