Skip to content

Commit f623d50

Browse files
committed
Merge branch 'pci/controller/dwc'
- Simplify debugfs 'return' statements (Hans Zhang) - Make dw_pcie_ptm_ops static (Manivannan Sadhasivam) * pci/controller/dwc: PCI: dwc: Make dw_pcie_ptm_ops static PCI: dwc: Simplify the return value of PTM debugfs functions returning bool
2 parents 4441df6 + c1dc61a commit f623d50

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/pci/controller/dwc/pcie-designware-debugfs.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -814,14 +814,14 @@ static bool dw_pcie_ptm_context_update_visible(void *drvdata)
814814
{
815815
struct dw_pcie *pci = drvdata;
816816

817-
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
817+
return pci->mode == DW_PCIE_EP_TYPE;
818818
}
819819

820820
static bool dw_pcie_ptm_context_valid_visible(void *drvdata)
821821
{
822822
struct dw_pcie *pci = drvdata;
823823

824-
return (pci->mode == DW_PCIE_RC_TYPE) ? true : false;
824+
return pci->mode == DW_PCIE_RC_TYPE;
825825
}
826826

827827
static bool dw_pcie_ptm_local_clock_visible(void *drvdata)
@@ -834,38 +834,38 @@ static bool dw_pcie_ptm_master_clock_visible(void *drvdata)
834834
{
835835
struct dw_pcie *pci = drvdata;
836836

837-
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
837+
return pci->mode == DW_PCIE_EP_TYPE;
838838
}
839839

840840
static bool dw_pcie_ptm_t1_visible(void *drvdata)
841841
{
842842
struct dw_pcie *pci = drvdata;
843843

844-
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
844+
return pci->mode == DW_PCIE_EP_TYPE;
845845
}
846846

847847
static bool dw_pcie_ptm_t2_visible(void *drvdata)
848848
{
849849
struct dw_pcie *pci = drvdata;
850850

851-
return (pci->mode == DW_PCIE_RC_TYPE) ? true : false;
851+
return pci->mode == DW_PCIE_RC_TYPE;
852852
}
853853

854854
static bool dw_pcie_ptm_t3_visible(void *drvdata)
855855
{
856856
struct dw_pcie *pci = drvdata;
857857

858-
return (pci->mode == DW_PCIE_RC_TYPE) ? true : false;
858+
return pci->mode == DW_PCIE_RC_TYPE;
859859
}
860860

861861
static bool dw_pcie_ptm_t4_visible(void *drvdata)
862862
{
863863
struct dw_pcie *pci = drvdata;
864864

865-
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
865+
return pci->mode == DW_PCIE_EP_TYPE;
866866
}
867867

868-
const struct pcie_ptm_ops dw_pcie_ptm_ops = {
868+
static const struct pcie_ptm_ops dw_pcie_ptm_ops = {
869869
.check_capability = dw_pcie_ptm_check_capability,
870870
.context_update_write = dw_pcie_ptm_context_update_write,
871871
.context_update_read = dw_pcie_ptm_context_update_read,

0 commit comments

Comments
 (0)