Loading drivers/gpu/msm/adreno.c +4 −5 Original line number Diff line number Diff line Loading @@ -1442,6 +1442,7 @@ done: static int adreno_of_get_iommu(struct device_node *parent, struct kgsl_device_platform_data *pdata) { int result = -EINVAL; struct device_node *node, *child; struct kgsl_device_iommu_data *data = NULL; struct kgsl_iommu_ctx *ctxs = NULL; Loading @@ -1454,7 +1455,7 @@ static int adreno_of_get_iommu(struct device_node *parent, data = kzalloc(sizeof(*data), GFP_KERNEL); if (data == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*data)); result = -ENOMEM; goto err; } Loading @@ -1475,8 +1476,7 @@ static int adreno_of_get_iommu(struct device_node *parent, GFP_KERNEL); if (ctxs == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", data->iommu_ctx_count * sizeof(struct kgsl_iommu_ctx)); result = -ENOMEM; goto err; } Loading Loading @@ -1515,7 +1515,7 @@ err: kfree(ctxs); kfree(data); return -EINVAL; return result; } static int adreno_of_get_pdata(struct platform_device *pdev) Loading @@ -1540,7 +1540,6 @@ static int adreno_of_get_pdata(struct platform_device *pdev) pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (pdata == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*pdata)); ret = -ENOMEM; goto err; } Loading drivers/gpu/msm/adreno_ringbuffer.c +1 −2 Original line number Diff line number Diff line Loading @@ -172,8 +172,7 @@ static int _load_firmware(struct kgsl_device *device, const char *fwfile, if (*data) { memcpy(*data, fw->data, fw->size); *len = fw->size; } else KGSL_MEM_ERR(device, "kmalloc(%d) failed\n", fw->size); } release_firmware(fw); return (*data != NULL) ? 0 : -ENOMEM; Loading drivers/gpu/msm/kgsl.c +4 −11 Original line number Diff line number Diff line Loading @@ -188,9 +188,7 @@ kgsl_mem_entry_create(void) { struct kgsl_mem_entry *entry = kzalloc(sizeof(*entry), GFP_KERNEL); if (!entry) KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*entry)); else if (entry) kref_init(&entry->refcount); return entry; Loading Loading @@ -443,7 +441,7 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv, /* MAX - 1, there is one memdesc in memstore for device info */ if (id >= KGSL_MEMSTORE_MAX) { KGSL_DRV_INFO(device, "cannot have more than %d " KGSL_DRV_INFO(device, "cannot have more than %zu " "ctxts due to memstore limitation\n", KGSL_MEMSTORE_MAX); ret = -ENOSPC; Loading Loading @@ -824,11 +822,8 @@ kgsl_find_process_private(struct kgsl_device_private *cur_dev_priv) /* no existing process private found for this dev_priv, create one */ private = kzalloc(sizeof(struct kgsl_process_private), GFP_KERNEL); if (private == NULL) { KGSL_DRV_ERR(cur_dev_priv->device, "kzalloc(%d) failed\n", sizeof(struct kgsl_process_private)); if (private == NULL) goto done; } kref_init(&private->refcount); Loading Loading @@ -1059,8 +1054,6 @@ static int kgsl_open(struct inode *inodep, struct file *filep) dev_priv = kzalloc(sizeof(struct kgsl_device_private), GFP_KERNEL); if (dev_priv == NULL) { KGSL_DRV_ERR(device, "kzalloc failed(%d)\n", sizeof(struct kgsl_device_private)); result = -ENOMEM; goto err_pmruntime; } Loading Loading @@ -2479,7 +2472,7 @@ static int kgsl_setup_useraddr(struct kgsl_mem_entry *entry, size = ALIGN(size, PAGE_SIZE); if (_check_region(offset & PAGE_MASK, size, len)) { KGSL_CORE_ERR("Offset (%ld) + size (%d) is larger" KGSL_CORE_ERR("Offset (%ld) + size (%zu) is larger" "than region length %d\n", offset & PAGE_MASK, size, len); return -EINVAL; Loading drivers/gpu/msm/kgsl_gpummu.c +5 −12 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ sysfs_show_ptpool_ptsize(struct kobject *kobj, { struct kgsl_ptpool *pool = (struct kgsl_ptpool *) kgsl_driver.ptpool; return snprintf(buf, PAGE_SIZE, "%d\n", pool->ptsize); return snprintf(buf, PAGE_SIZE, "%zu\n", pool->ptsize); } static struct kobj_attribute attr_ptpool_entries = { Loading Loading @@ -115,15 +115,13 @@ _kgsl_ptpool_add_entries(struct kgsl_ptpool *pool, int count, int dynamic) BUG_ON(count == 0); if (get_order(size) >= MAX_ORDER) { KGSL_CORE_ERR("ptpool allocation is too big: %d\n", size); KGSL_CORE_ERR("ptpool allocation is too big: %zu\n", size); return -EINVAL; } chunk = kzalloc(sizeof(*chunk), GFP_KERNEL); if (chunk == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*chunk)); if (chunk == NULL) return -ENOMEM; } chunk->size = size; chunk->count = count; Loading @@ -132,18 +130,13 @@ _kgsl_ptpool_add_entries(struct kgsl_ptpool *pool, int count, int dynamic) chunk->data = dma_alloc_coherent(NULL, size, &chunk->phys, GFP_KERNEL); if (chunk->data == NULL) { KGSL_CORE_ERR("dma_alloc_coherent(%d) failed\n", size); if (chunk->data == NULL) goto err; } chunk->bitmap = kzalloc(BITS_TO_LONGS(count) * 4, GFP_KERNEL); if (chunk->bitmap == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", BITS_TO_LONGS(count) * 4); if (chunk->bitmap == NULL) goto err_dma; } list_add_tail(&chunk->list, &pool->list); Loading drivers/gpu/msm/kgsl_iommu.c +3 −8 Original line number Diff line number Diff line Loading @@ -686,11 +686,9 @@ void *kgsl_iommu_create_pagetable(void) }; iommu_pt = kzalloc(sizeof(struct kgsl_iommu_pt), GFP_KERNEL); if (!iommu_pt) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(struct kgsl_iommu_pt)); if (!iommu_pt) return NULL; } /* L2 redirect is not stable on IOMMU v1 */ if (msm_soc_version_supports_iommu_v0()) kgsl_layout.domain_flags = MSM_IOMMU_DOMAIN_PT_CACHEABLE; Loading Loading @@ -1363,11 +1361,8 @@ static int kgsl_iommu_init(struct kgsl_mmu *mmu) atomic_set(&mmu->fault, 0); iommu = kzalloc(sizeof(struct kgsl_iommu), GFP_KERNEL); if (!iommu) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(struct kgsl_iommu)); if (!iommu) return -ENOMEM; } mmu->priv = iommu; status = kgsl_get_iommu_ctxt(mmu); Loading Loading
drivers/gpu/msm/adreno.c +4 −5 Original line number Diff line number Diff line Loading @@ -1442,6 +1442,7 @@ done: static int adreno_of_get_iommu(struct device_node *parent, struct kgsl_device_platform_data *pdata) { int result = -EINVAL; struct device_node *node, *child; struct kgsl_device_iommu_data *data = NULL; struct kgsl_iommu_ctx *ctxs = NULL; Loading @@ -1454,7 +1455,7 @@ static int adreno_of_get_iommu(struct device_node *parent, data = kzalloc(sizeof(*data), GFP_KERNEL); if (data == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*data)); result = -ENOMEM; goto err; } Loading @@ -1475,8 +1476,7 @@ static int adreno_of_get_iommu(struct device_node *parent, GFP_KERNEL); if (ctxs == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", data->iommu_ctx_count * sizeof(struct kgsl_iommu_ctx)); result = -ENOMEM; goto err; } Loading Loading @@ -1515,7 +1515,7 @@ err: kfree(ctxs); kfree(data); return -EINVAL; return result; } static int adreno_of_get_pdata(struct platform_device *pdev) Loading @@ -1540,7 +1540,6 @@ static int adreno_of_get_pdata(struct platform_device *pdev) pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (pdata == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*pdata)); ret = -ENOMEM; goto err; } Loading
drivers/gpu/msm/adreno_ringbuffer.c +1 −2 Original line number Diff line number Diff line Loading @@ -172,8 +172,7 @@ static int _load_firmware(struct kgsl_device *device, const char *fwfile, if (*data) { memcpy(*data, fw->data, fw->size); *len = fw->size; } else KGSL_MEM_ERR(device, "kmalloc(%d) failed\n", fw->size); } release_firmware(fw); return (*data != NULL) ? 0 : -ENOMEM; Loading
drivers/gpu/msm/kgsl.c +4 −11 Original line number Diff line number Diff line Loading @@ -188,9 +188,7 @@ kgsl_mem_entry_create(void) { struct kgsl_mem_entry *entry = kzalloc(sizeof(*entry), GFP_KERNEL); if (!entry) KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*entry)); else if (entry) kref_init(&entry->refcount); return entry; Loading Loading @@ -443,7 +441,7 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv, /* MAX - 1, there is one memdesc in memstore for device info */ if (id >= KGSL_MEMSTORE_MAX) { KGSL_DRV_INFO(device, "cannot have more than %d " KGSL_DRV_INFO(device, "cannot have more than %zu " "ctxts due to memstore limitation\n", KGSL_MEMSTORE_MAX); ret = -ENOSPC; Loading Loading @@ -824,11 +822,8 @@ kgsl_find_process_private(struct kgsl_device_private *cur_dev_priv) /* no existing process private found for this dev_priv, create one */ private = kzalloc(sizeof(struct kgsl_process_private), GFP_KERNEL); if (private == NULL) { KGSL_DRV_ERR(cur_dev_priv->device, "kzalloc(%d) failed\n", sizeof(struct kgsl_process_private)); if (private == NULL) goto done; } kref_init(&private->refcount); Loading Loading @@ -1059,8 +1054,6 @@ static int kgsl_open(struct inode *inodep, struct file *filep) dev_priv = kzalloc(sizeof(struct kgsl_device_private), GFP_KERNEL); if (dev_priv == NULL) { KGSL_DRV_ERR(device, "kzalloc failed(%d)\n", sizeof(struct kgsl_device_private)); result = -ENOMEM; goto err_pmruntime; } Loading Loading @@ -2479,7 +2472,7 @@ static int kgsl_setup_useraddr(struct kgsl_mem_entry *entry, size = ALIGN(size, PAGE_SIZE); if (_check_region(offset & PAGE_MASK, size, len)) { KGSL_CORE_ERR("Offset (%ld) + size (%d) is larger" KGSL_CORE_ERR("Offset (%ld) + size (%zu) is larger" "than region length %d\n", offset & PAGE_MASK, size, len); return -EINVAL; Loading
drivers/gpu/msm/kgsl_gpummu.c +5 −12 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ sysfs_show_ptpool_ptsize(struct kobject *kobj, { struct kgsl_ptpool *pool = (struct kgsl_ptpool *) kgsl_driver.ptpool; return snprintf(buf, PAGE_SIZE, "%d\n", pool->ptsize); return snprintf(buf, PAGE_SIZE, "%zu\n", pool->ptsize); } static struct kobj_attribute attr_ptpool_entries = { Loading Loading @@ -115,15 +115,13 @@ _kgsl_ptpool_add_entries(struct kgsl_ptpool *pool, int count, int dynamic) BUG_ON(count == 0); if (get_order(size) >= MAX_ORDER) { KGSL_CORE_ERR("ptpool allocation is too big: %d\n", size); KGSL_CORE_ERR("ptpool allocation is too big: %zu\n", size); return -EINVAL; } chunk = kzalloc(sizeof(*chunk), GFP_KERNEL); if (chunk == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(*chunk)); if (chunk == NULL) return -ENOMEM; } chunk->size = size; chunk->count = count; Loading @@ -132,18 +130,13 @@ _kgsl_ptpool_add_entries(struct kgsl_ptpool *pool, int count, int dynamic) chunk->data = dma_alloc_coherent(NULL, size, &chunk->phys, GFP_KERNEL); if (chunk->data == NULL) { KGSL_CORE_ERR("dma_alloc_coherent(%d) failed\n", size); if (chunk->data == NULL) goto err; } chunk->bitmap = kzalloc(BITS_TO_LONGS(count) * 4, GFP_KERNEL); if (chunk->bitmap == NULL) { KGSL_CORE_ERR("kzalloc(%d) failed\n", BITS_TO_LONGS(count) * 4); if (chunk->bitmap == NULL) goto err_dma; } list_add_tail(&chunk->list, &pool->list); Loading
drivers/gpu/msm/kgsl_iommu.c +3 −8 Original line number Diff line number Diff line Loading @@ -686,11 +686,9 @@ void *kgsl_iommu_create_pagetable(void) }; iommu_pt = kzalloc(sizeof(struct kgsl_iommu_pt), GFP_KERNEL); if (!iommu_pt) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(struct kgsl_iommu_pt)); if (!iommu_pt) return NULL; } /* L2 redirect is not stable on IOMMU v1 */ if (msm_soc_version_supports_iommu_v0()) kgsl_layout.domain_flags = MSM_IOMMU_DOMAIN_PT_CACHEABLE; Loading Loading @@ -1363,11 +1361,8 @@ static int kgsl_iommu_init(struct kgsl_mmu *mmu) atomic_set(&mmu->fault, 0); iommu = kzalloc(sizeof(struct kgsl_iommu), GFP_KERNEL); if (!iommu) { KGSL_CORE_ERR("kzalloc(%d) failed\n", sizeof(struct kgsl_iommu)); if (!iommu) return -ENOMEM; } mmu->priv = iommu; status = kgsl_get_iommu_ctxt(mmu); Loading