[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/55] pci: Remove unused pci_get_*_by_mask() functions
From: |
Michael S. Tsirkin |
Subject: |
[PULL 36/55] pci: Remove unused pci_get_*_by_mask() functions |
Date: |
Mon, 10 Oct 2022 13:31:19 -0400 |
From: Peter Maydell <peter.maydell@linaro.org>
The helper functions pci_get_{byte,word,long,quad}_by_mask()
were added in 2012 in commit c9f50cea70a1596. In the decade
since we have never added a single use of them.
The helpers clearly aren't that helpful, so drop them
rather than carrying around dead code.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220818135421.2515257-2-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/pci/pci.h | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index b54b6ef88f..c79144bc5e 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -692,13 +692,6 @@ pci_set_byte_by_mask(uint8_t *config, uint8_t mask,
uint8_t reg)
pci_set_byte(config, (~mask & val) | (mask & rval));
}
-static inline uint8_t
-pci_get_byte_by_mask(uint8_t *config, uint8_t mask)
-{
- uint8_t val = pci_get_byte(config);
- return (val & mask) >> ctz32(mask);
-}
-
static inline void
pci_set_word_by_mask(uint8_t *config, uint16_t mask, uint16_t reg)
{
@@ -707,13 +700,6 @@ pci_set_word_by_mask(uint8_t *config, uint16_t mask,
uint16_t reg)
pci_set_word(config, (~mask & val) | (mask & rval));
}
-static inline uint16_t
-pci_get_word_by_mask(uint8_t *config, uint16_t mask)
-{
- uint16_t val = pci_get_word(config);
- return (val & mask) >> ctz32(mask);
-}
-
static inline void
pci_set_long_by_mask(uint8_t *config, uint32_t mask, uint32_t reg)
{
@@ -722,13 +708,6 @@ pci_set_long_by_mask(uint8_t *config, uint32_t mask,
uint32_t reg)
pci_set_long(config, (~mask & val) | (mask & rval));
}
-static inline uint32_t
-pci_get_long_by_mask(uint8_t *config, uint32_t mask)
-{
- uint32_t val = pci_get_long(config);
- return (val & mask) >> ctz32(mask);
-}
-
static inline void
pci_set_quad_by_mask(uint8_t *config, uint64_t mask, uint64_t reg)
{
@@ -737,13 +716,6 @@ pci_set_quad_by_mask(uint8_t *config, uint64_t mask,
uint64_t reg)
pci_set_quad(config, (~mask & val) | (mask & rval));
}
-static inline uint64_t
-pci_get_quad_by_mask(uint8_t *config, uint64_t mask)
-{
- uint64_t val = pci_get_quad(config);
- return (val & mask) >> ctz32(mask);
-}
-
PCIDevice *pci_new_multifunction(int devfn, bool multifunction,
const char *name);
PCIDevice *pci_new(int devfn, const char *name);
--
MST
- Re: [PULL 29/55] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks", (continued)
[PULL 31/55] qmp: add QMP command x-query-virtio-status, Michael S. Tsirkin, 2022/10/10
[PULL 30/55] qmp: add QMP command x-query-virtio, Michael S. Tsirkin, 2022/10/10
[PULL 33/55] qmp: add QMP commands for virtio/vhost queue-status, Michael S. Tsirkin, 2022/10/10
[PULL 32/55] qmp: decode feature & status bits in virtio-status, Michael S. Tsirkin, 2022/10/10
[PULL 34/55] qmp: add QMP command x-query-virtio-queue-element, Michael S. Tsirkin, 2022/10/10
[PULL 35/55] hmp: add virtio commands, Michael S. Tsirkin, 2022/10/10
[PULL 36/55] pci: Remove unused pci_get_*_by_mask() functions,
Michael S. Tsirkin <=
[PULL 37/55] pci: Sanity check mask argument to pci_set_*_by_mask(), Michael S. Tsirkin, 2022/10/10
[PULL 38/55] hw/smbios: support for type 8 (port connector), Michael S. Tsirkin, 2022/10/10
[PULL 39/55] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move, Michael S. Tsirkin, 2022/10/10
[PULL 40/55] acpi: x86: deduplicate HPET AML building, Michael S. Tsirkin, 2022/10/10
[PULL 41/55] tests: acpi: update expected blobs after HPET move, Michael S. Tsirkin, 2022/10/10
[PULL 43/55] acpi: x86: refactor PDSM method to reduce nesting, Michael S. Tsirkin, 2022/10/10
[PULL 42/55] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move, Michael S. Tsirkin, 2022/10/10
[PULL 44/55] x86: acpi: _DSM: use Package to pass parameters, Michael S. Tsirkin, 2022/10/10
[PULL 45/55] tests: acpi: update expected blobs, Michael S. Tsirkin, 2022/10/10
[PULL 46/55] tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN, Michael S. Tsirkin, 2022/10/10