]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: hmm_bo: Simplify alloc_private_pages()
authorHans de Goede <hdegoede@redhat.com>
Sat, 13 Aug 2022 15:38:45 +0000 (17:38 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 07:40:10 +0000 (09:40 +0200)
commitf919758569d3556f72de79972cab05d8609a92db
tree50087eecd8304dee22c72f2f5d25dd6b20d4bd53
parenta5610adcc23319201c0e9e4bf9609bacc6518a1a
media: atomisp: hmm_bo: Simplify alloc_private_pages()

Since lack_mem starts initialized to true, alloc_private_pages() will
always set order to HMM_MIN_ORDER aka 0 / will always alloc 1 page at
a time.

So all the magic to decrease order if allocs fail is not necessary
and can be removed.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/include/hmm/hmm_bo.h
drivers/staging/media/atomisp/pci/hmm/hmm_bo.c