mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
PCI: dwc: Simplify the return value of PTM debugfs functions returning bool
Replace redundant ternary conditional expressions with direct boolean
returns in PTM debugfs functions. Specifically change this pattern:
return (condition) ? true : false;
to the simpler:
return condition;
Signed-off-by: Hans Zhang <18255117159@163.com>
[mani: subject rewording]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20250612161226.950937-1-18255117159@163.com
This commit is contained in:
parent
19272b37aa
commit
032f05be51
|
|
@ -814,14 +814,14 @@ static bool dw_pcie_ptm_context_update_visible(void *drvdata)
|
|||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_EP_TYPE;
|
||||
}
|
||||
|
||||
static bool dw_pcie_ptm_context_valid_visible(void *drvdata)
|
||||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_RC_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_RC_TYPE;
|
||||
}
|
||||
|
||||
static bool dw_pcie_ptm_local_clock_visible(void *drvdata)
|
||||
|
|
@ -834,35 +834,35 @@ static bool dw_pcie_ptm_master_clock_visible(void *drvdata)
|
|||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_EP_TYPE;
|
||||
}
|
||||
|
||||
static bool dw_pcie_ptm_t1_visible(void *drvdata)
|
||||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_EP_TYPE;
|
||||
}
|
||||
|
||||
static bool dw_pcie_ptm_t2_visible(void *drvdata)
|
||||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_RC_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_RC_TYPE;
|
||||
}
|
||||
|
||||
static bool dw_pcie_ptm_t3_visible(void *drvdata)
|
||||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_RC_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_RC_TYPE;
|
||||
}
|
||||
|
||||
static bool dw_pcie_ptm_t4_visible(void *drvdata)
|
||||
{
|
||||
struct dw_pcie *pci = drvdata;
|
||||
|
||||
return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
|
||||
return pci->mode == DW_PCIE_EP_TYPE;
|
||||
}
|
||||
|
||||
const struct pcie_ptm_ops dw_pcie_ptm_ops = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user