aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-02-13 11:17:00 -0600
committerMike Snitzer <snitzer@kernel.org>2024-03-04 15:07:56 -0500
commit8f89115efc1e8f34dd3182e2f3f7064225b52762 (patch)
tree279638df8bb6f49c01d347fa8de5b10f3705810c /drivers/md
parent0eea6b6e78daa45ca13e9b186da042f9b6139b50 (diff)
downloadlinux-8f89115efc1e8f34dd3182e2f3f7064225b52762.tar.gz
dm vdo memory-alloc: rename vdo_do_allocation to __vdo_do_allocation
__vdo_do_allocation shouldn't be used outside of memory-alloc.h, so add hidden prefix. Also, tabify the vdo_allocate_extended macro. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-vdo/memory-alloc.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/md/dm-vdo/memory-alloc.h b/drivers/md/dm-vdo/memory-alloc.h
index 3f27dd722a2d2..1401843db5e0f 100644
--- a/drivers/md/dm-vdo/memory-alloc.h
+++ b/drivers/md/dm-vdo/memory-alloc.h
@@ -37,8 +37,8 @@ int __must_check vdo_allocate_memory(size_t size, size_t align, const char *what
*
* Return: UDS_SUCCESS or an error code
*/
-static inline int vdo_do_allocation(size_t count, size_t size, size_t extra,
- size_t align, const char *what, void *ptr)
+static inline int __vdo_do_allocation(size_t count, size_t size, size_t extra,
+ size_t align, const char *what, void *ptr)
{
size_t total_size = count * size + extra;
@@ -68,7 +68,7 @@ static inline int vdo_do_allocation(size_t count, size_t size, size_t extra,
* Return: UDS_SUCCESS or an error code
*/
#define vdo_allocate(COUNT, TYPE, WHAT, PTR) \
- vdo_do_allocation(COUNT, sizeof(TYPE), 0, __alignof__(TYPE), WHAT, PTR)
+ __vdo_do_allocation(COUNT, sizeof(TYPE), 0, __alignof__(TYPE), WHAT, PTR)
/*
* Allocate one object of an indicated type, followed by one or more elements of a second type,
@@ -83,18 +83,18 @@ static inline int vdo_do_allocation(size_t count, size_t size, size_t extra,
*
* Return: UDS_SUCCESS or an error code
*/
-#define vdo_allocate_extended(TYPE1, COUNT, TYPE2, WHAT, PTR) \
- __extension__({ \
- int _result; \
- TYPE1 **_ptr = (PTR); \
- BUILD_BUG_ON(__alignof__(TYPE1) < __alignof__(TYPE2)); \
- _result = vdo_do_allocation(COUNT, \
- sizeof(TYPE2), \
- sizeof(TYPE1), \
- __alignof__(TYPE1), \
- WHAT, \
- _ptr); \
- _result; \
+#define vdo_allocate_extended(TYPE1, COUNT, TYPE2, WHAT, PTR) \
+ __extension__({ \
+ int _result; \
+ TYPE1 **_ptr = (PTR); \
+ BUILD_BUG_ON(__alignof__(TYPE1) < __alignof__(TYPE2)); \
+ _result = __vdo_do_allocation(COUNT, \
+ sizeof(TYPE2), \
+ sizeof(TYPE1), \
+ __alignof__(TYPE1), \
+ WHAT, \
+ _ptr); \
+ _result; \
})
/*