aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/lib/kdoc/kdoc_re.py
diff options
context:
space:
mode:
authorLi Ming <ming.li@zohomail.com>2025-02-21 09:24:51 +0800
committerDave Jiang <dave.jiang@intel.com>2025-03-14 14:45:04 -0700
commita81ebe7d19b6fdc6de0159878fbed9945120813e (patch)
tree4df2864731898d9bf91c720ce8460944e4065c46 /scripts/lib/kdoc/kdoc_re.py
parentcxl/core: Use guard() to drop the goto pattern of cxl_dpa_free() (diff)
downloadwireguard-linux-a81ebe7d19b6fdc6de0159878fbed9945120813e.tar.xz
wireguard-linux-a81ebe7d19b6fdc6de0159878fbed9945120813e.zip
cxl/core: Use guard() to drop goto pattern of cxl_dpa_alloc()
In cxl_dpa_alloc(), some checking and operations need to be protected by a rwsem called cxl_dpa_rwsem, so there is a goto pattern in cxl_dpa_alloc() to release the rwsem. The goto pattern can be optimized by using guard() to hold the rwsem. Creating a new function called __cxl_dpa_alloc() to include all checking and operations needed to be protected by cxl_dpa_rwsem. Using guard(rwsem_write()) to hold cxl_dpa_rwsem at the beginning of the new function. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Li Ming <ming.li@zohomail.com> Link: https://patch.msgid.link/20250221012453.126366-6-ming.li@zohomail.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions