Skip to content

Commit ee09c91

Browse files
Thomas RichterVasily Gorbik
authored andcommitted
s390/cpum_sf: Use DIV_ROUND_UP
Use macro DIV_ROUND_UP() for calculation of number of SDBT SDBT pages required for index pages. This macro is already used throughout the file. Signed-off-by: Thomas Richter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 32dab68 commit ee09c91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/kernel/perf_cpum_sf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ static void *aux_buffer_setup(struct perf_event *event, void **pages,
17161716
sfb = &aux->sfb;
17171717

17181718
/* Allocate sdbt_index for fast reference */
1719-
n_sdbt = (nr_pages + CPUM_SF_SDB_PER_TABLE - 1) / CPUM_SF_SDB_PER_TABLE;
1719+
n_sdbt = DIV_ROUND_UP(nr_pages, CPUM_SF_SDB_PER_TABLE);
17201720
aux->sdbt_index = kmalloc_array(n_sdbt, sizeof(void *), GFP_KERNEL);
17211721
if (!aux->sdbt_index)
17221722
goto no_sdbt_index;

0 commit comments

Comments
 (0)