aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc/pcie-qcom-common.c
diff options
context:
space:
mode:
authorHuaisheng Ye <[email protected]>2025-01-15 15:26:00 +0000
committerDave Jiang <[email protected]>2025-01-22 15:55:21 +0000
commit448a60e85ae2afe2cb760f5d2ed2c8a49d2bd1b4 (patch)
tree21c14cb2353802d23042b2cf46fe367e9e58bf28 /drivers/pci/controller/dwc/pcie-qcom-common.c
parentcxl/test: Update test code for event records to CXL spec rev 3.1 (diff)
downloadkernel-448a60e85ae2afe2cb760f5d2ed2c8a49d2bd1b4.tar.gz
kernel-448a60e85ae2afe2cb760f5d2ed2c8a49d2bd1b4.zip
cxl/core/regs: Refactor out functions to count regblocks of given type
cxl_find_regblock_instance() counts the number of instances of a register block as a side effect of searching through all available register blocks. cxl_count_regblock() throws away that work and recounts all the register blocks by asking cxl_find_regblock_instance() to redo work it has already done until it finally returns an error, that is needlessly wasteful. Let cxl_count_regblock() leverage the counting that cxl_find_regblock_instance() already does by passing in a sentinel value (CXL_INSTANCES_COUNT) that triggers the count to be returned. [ davej: Updated to more concise commit log supplied by djbw ] [ davej: Fix up checkpatch formatting warnings ] Signed-off-by: Huaisheng Ye <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dan Williams <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Dave Jiang <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-common.c')
0 files changed, 0 insertions, 0 deletions