cxl/pci: Make more use of cxl_register_map
authorBen Widawsky <ben.widawsky@intel.com>
Wed, 13 Oct 2021 23:53:29 +0000 (16:53 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 29 Oct 2021 18:53:51 +0000 (11:53 -0700)
commit7dc7a64de2bb3daf613f4c2e809e49678c579148
tree3739a399212828754ce44f680043a47916d32587
parent84e36a9d1bbd2c41481e7160e0553480781b008b
cxl/pci: Make more use of cxl_register_map

The structure exists to pass around information about register mapping.
Use it for passing @barno and @block_offset, and eliminate duplicate
local variables.

The helpers that use @map do not care about @cxlm, so just pass them a
pdev instead.

[djbw: reorder before cxl_pci_setup_regs() refactor to improver readability]

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
[djbw: separate @base conversion]
Link: https://lore.kernel.org/r/163416901172.806743.10056306321247850914.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/pci.c