From: Mauro Carvalho Chehab Date: Tue, 14 Nov 2017 15:47:01 +0000 (-0500) Subject: Merge tag 'staging-4.15-rc1' into v4l_for_linus X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f2ecc3d0787e05d9145722feed01d4a11ab6bec1;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'staging-4.15-rc1' into v4l_for_linus There are some conflicts between staging and media trees, as reported by Stephen Rothwell . So, merge from staging. * tag 'staging-4.15-rc1': (775 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ... Signed-off-by: Mauro Carvalho Chehab --- f2ecc3d0787e05d9145722feed01d4a11ab6bec1 diff --cc drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c index 383d236c010c,53a7891111f9..8158ea40d069 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c @@@ -146,8 -146,8 +146,8 @@@ sh_css_load_blob_info(const char *fw, c size_t statestruct_size = sizeof(struct ia_css_state_memory_offsets); char *parambuf = kmalloc(paramstruct_size + configstruct_size + statestruct_size, - GFP_KERNEL); + GFP_KERNEL); - if (parambuf == NULL) + if (!parambuf) return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; bd->mem_offsets.array[IA_CSS_PARAM_CLASS_PARAM].ptr = NULL; diff --cc drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c index 9e957514108e,5232327f5d9c..6e2dce7a5a2d --- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c @@@ -721,10 -725,12 +721,10 @@@ static int alloc_private_pages(struct h pgnr = bo->pgnr; - bo->page_obj = kmalloc(sizeof(struct hmm_page_object) * pgnr, + bo->page_obj = kmalloc_array(pgnr, sizeof(struct hmm_page_object), GFP_KERNEL); - if (unlikely(!bo->page_obj)) { - dev_err(atomisp_dev, "out of memory for bo->page_obj\n"); + if (unlikely(!bo->page_obj)) return -ENOMEM; - } i = 0; alloc_pgnr = 0; @@@ -984,13 -990,16 +984,13 @@@ static int alloc_user_pages(struct hmm_ struct vm_area_struct *vma; struct page **pages; - pages = kmalloc(sizeof(struct page *) * bo->pgnr, GFP_KERNEL); + pages = kmalloc_array(bo->pgnr, sizeof(struct page *), GFP_KERNEL); - if (unlikely(!pages)) { - dev_err(atomisp_dev, "out of memory for pages...\n"); + if (unlikely(!pages)) return -ENOMEM; - } - bo->page_obj = kmalloc(sizeof(struct hmm_page_object) * bo->pgnr, + bo->page_obj = kmalloc_array(bo->pgnr, sizeof(struct hmm_page_object), GFP_KERNEL); if (unlikely(!bo->page_obj)) { - dev_err(atomisp_dev, "out of memory for bo->page_obj...\n"); kfree(pages); return -ENOMEM; } @@@ -1350,9 -1363,10 +1350,9 @@@ void *hmm_bo_vmap(struct hmm_buffer_obj bo->status &= ~(HMM_BO_VMAPED | HMM_BO_VMAPED_CACHED); } - pages = kmalloc(sizeof(*pages) * bo->pgnr, GFP_KERNEL); + pages = kmalloc_array(bo->pgnr, sizeof(*pages), GFP_KERNEL); if (unlikely(!pages)) { mutex_unlock(&bo->mutex); - dev_err(atomisp_dev, "out of memory for pages...\n"); return NULL; }