aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDan Williams <[email protected]>2025-02-04 04:24:35 +0000
committerDave Jiang <[email protected]>2025-02-04 20:48:19 +0000
commit58d60bbe0a99539afb1f29d03c28f06747f94531 (patch)
treee524b3db139bb8b7446cbec5084b5c12356aaede /net/unix/af_unix.c
parentcxl: Kill enum cxl_decoder_mode (diff)
downloadkernel-58d60bbe0a99539afb1f29d03c28f06747f94531.tar.gz
kernel-58d60bbe0a99539afb1f29d03c28f06747f94531.zip
cxl: Cleanup partition size and perf helpers
Now that the 'struct cxl_dpa_partition' array contains both size and performance information, all paths that iterate over that information can use a loop rather than hard-code 'ram' and 'pmem' lookups. Remove, or reduce the scope of the temporary helpers that bridged the pre-'struct cxl_dpa_partition' state of the code to the post-'struct cxl_dpa_partition' state. - to_{ram,pmem}_perf(): scope reduced to just sysfs_emit + is_visible() helpers - to_{ram,pmem}_res(): fold into their only users cxl_{ram,pmem}_size() - cxl_ram_size(): scope reduced to ram_size_show() (Note, cxl_pmem_size() also used to gate nvdimm registration) In short, memdev sysfs ABI already made the promise that 0-sized partitions will show for memdevs, but that can be avoided for future partitions by using dynamic sysfs group visibility (new relative to when the partition ABI first shipped upstream). Cc: Dave Jiang <[email protected]> Cc: Alejandro Lucero <[email protected]> Cc: Ira Weiny <[email protected]> Signed-off-by: Dan Williams <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Tested-by: Alejandro Lucero <[email protected]> Link: https://patch.msgid.link/173864307519.668823.10800104022426067621.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dave Jiang <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions