summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-13 11:29:21 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 14:51:29 +0200
commit5f1e9dd555ee733a6ecb613f914840fb93dc25d6 (patch)
treec5602163c1aeaf11022c31c2288884530f3dbed2 /drivers/staging
parent983e5aca98bf569e45a98905e3f604f4c8fc58c8 (diff)
media: atomisp: get rid of __bo_alloc() macro
Simplify the hmm_bo a little bit by removing this macro. This will avoid printing twice errors when allocations happen. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/atomisp/pci/hmm/hmm_bo.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c
index 986396904fe0..492b76c29490 100644
--- a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c
+++ b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c
@@ -54,17 +54,6 @@ static unsigned int nr_to_order_bottom(unsigned int nr)
return fls(nr) - 1;
}
-static struct hmm_buffer_object *__bo_alloc(struct kmem_cache *bo_cache)
-{
- struct hmm_buffer_object *bo;
-
- bo = kmem_cache_alloc(bo_cache, GFP_KERNEL);
- if (!bo)
- dev_err(atomisp_dev, "%s: failed!\n", __func__);
-
- return bo;
-}
-
static int __bo_init(struct hmm_bo_device *bdev, struct hmm_buffer_object *bo,
unsigned int pgnr)
{
@@ -262,7 +251,7 @@ static struct hmm_buffer_object *__bo_break_up(struct hmm_bo_device *bdev,
unsigned long flags;
int ret;
- new_bo = __bo_alloc(bdev->bo_cache);
+ new_bo = kmem_cache_alloc(bdev->bo_cache, GFP_KERNEL);
if (!new_bo) {
dev_err(atomisp_dev, "%s: __bo_alloc failed!\n", __func__);
return NULL;
@@ -387,7 +376,7 @@ int hmm_bo_device_init(struct hmm_bo_device *bdev,
return -ENOMEM;
}
- bo = __bo_alloc(bdev->bo_cache);
+ bo = kmem_cache_alloc(bdev->bo_cache, GFP_KERNEL);
if (!bo) {
dev_err(atomisp_dev, "%s: __bo_alloc failed!\n", __func__);
isp_mmu_exit(&bdev->mmu);