mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 15:07:37 +07:00
iwlwifi: mvm: replace the number of blocks calculation
The logic in the paging calculations is a bit hard to follow. Replace it with a kernel define. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
08d785fd80
commit
850fe9af62
@ -270,8 +270,8 @@ static int iwl_alloc_fw_paging_mem(struct iwl_mvm *mvm,
|
||||
BUILD_BUG_ON(BIT(BLOCK_2_EXP_SIZE) != PAGING_BLOCK_SIZE);
|
||||
|
||||
num_of_pages = image->paging_mem_size / FW_PAGING_SIZE;
|
||||
mvm->num_of_paging_blk = ((num_of_pages - 1) /
|
||||
NUM_OF_PAGE_PER_GROUP) + 1;
|
||||
mvm->num_of_paging_blk =
|
||||
DIV_ROUND_UP(num_of_pages, NUM_OF_PAGE_PER_GROUP);
|
||||
mvm->num_of_pages_in_last_blk =
|
||||
num_of_pages -
|
||||
NUM_OF_PAGE_PER_GROUP * (mvm->num_of_paging_blk - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user