summaryrefslogtreecommitdiff
path: root/arch/s390/hypfs/hypfs_diag.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-07-04 15:47:12 +0200
committerHeiko Carstens <hca@linux.ibm.com>2023-07-24 12:12:22 +0200
commitb7857acc1b1105da5f088fe2593f1a6e3a3d47ce (patch)
tree0e0d2d4b2441f17ca28190cc0556fe520ee5c687 /arch/s390/hypfs/hypfs_diag.c
parent83f95671943e6394eda4d20fa9458d4a2ae13c5c (diff)
s390/hypfs: remove open-coded PTR_ALIGN()
Get rid of page_align_ptr() and use PTR_ALIGN() instead. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/hypfs/hypfs_diag.c')
-rw-r--r--arch/s390/hypfs/hypfs_diag.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index c8083dc08db3..889d83c77826 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -215,11 +215,6 @@ static void diag204_free_buffer(void)
diag204_buf = NULL;
}
-static void *page_align_ptr(void *ptr)
-{
- return (void *) PAGE_ALIGN((unsigned long) ptr);
-}
-
static void *diag204_get_buffer(enum diag204_format fmt, int *pages)
{
if (diag204_buf) {
@@ -379,7 +374,7 @@ static int dbfs_d204_create(void **data, void **data_free_ptr, size_t *size)
base = vzalloc(buf_size);
if (!base)
return -ENOMEM;
- d204 = page_align_ptr(base + sizeof(d204->hdr)) - sizeof(d204->hdr);
+ d204 = PTR_ALIGN(base + sizeof(d204->hdr), PAGE_SIZE) - sizeof(d204->hdr);
rc = diag204_do_store(d204->buf, diag204_buf_pages);
if (rc) {
vfree(base);