aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-07-11 04:01:03 -0400
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-07-13 10:00:50 -0400
commiteb1e39f784e83321353314da1b2e8cbb2fceaba9 (patch)
tree23606417be682075066a1a15520ec87d5785490f /drivers/pci
parent0ae7383e83c6b1cea1e31173e362765dc24068c7 (diff)
PCI: pcie-cadence-ep: Remove redundant variable mmc
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/pcie-cadence-ep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-cadence-ep.c b/drivers/pci/controller/pcie-cadence-ep.c
index 3eabd99a1233..04fe76c3d59d 100644
--- a/drivers/pci/controller/pcie-cadence-ep.c
+++ b/drivers/pci/controller/pcie-cadence-ep.c
@@ -238,7 +238,7 @@ static int cdns_pcie_ep_get_msi(struct pci_epc *epc, u8 fn)
238 struct cdns_pcie_ep *ep = epc_get_drvdata(epc); 238 struct cdns_pcie_ep *ep = epc_get_drvdata(epc);
239 struct cdns_pcie *pcie = &ep->pcie; 239 struct cdns_pcie *pcie = &ep->pcie;
240 u32 cap = CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET; 240 u32 cap = CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET;
241 u16 flags, mmc, mme; 241 u16 flags, mme;
242 242
243 /* Validate that the MSI feature is actually enabled. */ 243 /* Validate that the MSI feature is actually enabled. */
244 flags = cdns_pcie_ep_fn_readw(pcie, fn, cap + PCI_MSI_FLAGS); 244 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)
249 * Get the Multiple Message Enable bitfield from the Message Control 249 * Get the Multiple Message Enable bitfield from the Message Control
250 * register. 250 * register.
251 */ 251 */
252 mmc = (flags & PCI_MSI_FLAGS_QMASK) >> 1;
253 mme = (flags & PCI_MSI_FLAGS_QSIZE) >> 4; 252 mme = (flags & PCI_MSI_FLAGS_QSIZE) >> 4;
254 253
255 return mme; 254 return mme;