OSDN Git Service

PCI: pcie-cadence-ep: Remove redundant variable mmc
authorColin Ian King <colin.king@canonical.com>
Wed, 11 Jul 2018 08:01:03 +0000 (09:01 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 13 Jul 2018 14:00:50 +0000 (15:00 +0100)
Variable mmc is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'mmc' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
[lorenzo.pieralisi@arm.com: reworked commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Alan Douglas <adouglas@cadence.com>
drivers/pci/controller/pcie-cadence-ep.c

index 3eabd99..04fe76c 100644 (file)
@@ -238,7 +238,7 @@ static int cdns_pcie_ep_get_msi(struct pci_epc *epc, u8 fn)
        struct cdns_pcie_ep *ep = epc_get_drvdata(epc);
        struct cdns_pcie *pcie = &ep->pcie;
        u32 cap = CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET;
-       u16 flags, mmc, mme;
+       u16 flags, mme;
 
        /* Validate that the MSI feature is actually enabled. */
        flags = cdns_pcie_ep_fn_readw(pcie, fn, cap + PCI_MSI_FLAGS);
@@ -249,7 +249,6 @@ static int cdns_pcie_ep_get_msi(struct pci_epc *epc, u8 fn)
         * Get the Multiple Message Enable bitfield from the Message Control
         * register.
         */
-       mmc = (flags & PCI_MSI_FLAGS_QMASK) >> 1;
        mme = (flags & PCI_MSI_FLAGS_QSIZE) >> 4;
 
        return mme;