drm/ttm: Remove mm init error printouts and checks
Replace with BUG_ON(). These error messages remained from the time when TTM was initialized from user-space. Nowadays hitting one of those is really a kernel bug. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
6e4c55db12
commit
dbc4a5b835
@@ -1354,18 +1354,9 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
|
|||||||
int ret = -EINVAL;
|
int ret = -EINVAL;
|
||||||
struct ttm_mem_type_manager *man;
|
struct ttm_mem_type_manager *man;
|
||||||
|
|
||||||
if (type >= TTM_NUM_MEM_TYPES) {
|
BUG_ON(type >= TTM_NUM_MEM_TYPES);
|
||||||
printk(KERN_ERR TTM_PFX "Illegal memory type %d\n", type);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
man = &bdev->man[type];
|
man = &bdev->man[type];
|
||||||
if (man->has_type) {
|
BUG_ON(man->has_type);
|
||||||
printk(KERN_ERR TTM_PFX
|
|
||||||
"Memory manager already initialized for type %d\n",
|
|
||||||
type);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = bdev->driver->init_mem_type(bdev, type, man);
|
ret = bdev->driver->init_mem_type(bdev, type, man);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -1374,13 +1365,6 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if (type != TTM_PL_SYSTEM) {
|
if (type != TTM_PL_SYSTEM) {
|
||||||
if (!p_size) {
|
|
||||||
printk(KERN_ERR TTM_PFX
|
|
||||||
"Zero size memory manager type %d\n",
|
|
||||||
type);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = (*man->func->init)(man, p_size);
|
ret = (*man->func->init)(man, p_size);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user