diff options
| author | Vitaly Kuznetsov <[email protected]> | 2020-12-02 16:12:44 +0000 |
|---|---|---|
| committer | Wei Liu <[email protected]> | 2020-12-13 15:06:05 +0000 |
| commit | 7f3f227b41e81f8669e906c49a240c1678c65cfe (patch) | |
| tree | 1e51c3a036622f52542214a91d7fbd997ce6959f /drivers/pci/controller/pci-host-common.c | |
| parent | drivers/hv: remove obsolete TODO and fix misleading typo in comment (diff) | |
| download | kernel-7f3f227b41e81f8669e906c49a240c1678c65cfe.tar.gz kernel-7f3f227b41e81f8669e906c49a240c1678c65cfe.zip | |
hv_balloon: simplify math in alloc_balloon_pages()
'alloc_unit' in alloc_balloon_pages() is either '512' for 2M allocations or
'1' for 4k allocations. So
1 << get_order(alloc_unit << PAGE_SHIFT)
equals to 'alloc_unit' and the for loop basically sets all them offline.
Simplify the math to improve the readability.
Signed-off-by: Vitaly Kuznetsov <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wei Liu <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-host-common.c')
0 files changed, 0 insertions, 0 deletions
