From: Dave Stevenson Date: Fri, 1 Sep 2017 15:59:49 +0000 (+0100) Subject: vcsm: Fix blank lines after declarations. X-Git-Tag: archive/raspbian/4.9.51-1+rpi1~5^2~165 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c1a2d2db9a003ef0607c35987aa7f004d6449d14;p=linux-4.9.git vcsm: Fix blank lines after declarations. Signed-off-by: Dave Stevenson --- diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c index a2695196a94a..847a51c9c957 100644 --- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c @@ -355,6 +355,7 @@ int vc_vchi_sm_stop(struct sm_instance **handle) /* Close all VCHI service connections */ for (i = 0; i < instance->num_connections; i++) { int32_t success; + vchi_service_use(instance->vchi_handle[i]); success = vchi_service_close(instance->vchi_handle[i]); diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c index 4ccc6ab3a03a..13911b69858b 100644 --- a/drivers/char/broadcom/vc_sm/vmcs_sm.c +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -230,6 +230,7 @@ static const char *const sm_cache_map_vector[] = { static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) { unsigned long pfn = vc_addr & 0x3FFFFFFF; + pfn += mm_vc_mem_phys_addr; pfn >>= PAGE_SHIFT; return pfn; @@ -1441,9 +1442,11 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) if (resource->map) { /* We don't use vmf->pgoff since that has the fake offset */ unsigned long addr; + for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) { /* Finally, remap it */ unsigned long pfn = (unsigned long)resource->res_base_mem & 0x3FFFFFFF; + pfn += mm_vc_mem_phys_addr; pfn += addr - vma->vm_start; pfn >>= PAGE_SHIFT; @@ -1974,6 +1977,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, /* Flush if requested */ if (resource->res_cached && flush) { dma_addr_t phys_addr = 0; + resource->res_stats[FLUSH]++; phys_addr = @@ -1988,6 +1992,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, if (map->vma) { unsigned long start; unsigned long end; + start = map->vma->vm_start; end = map->vma->vm_end; @@ -3022,6 +3027,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if ((resource != NULL) && resource->res_cached) { unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); + resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; /* L1/L2 cache flush */ @@ -3071,6 +3077,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) for (i=0; iblock_count; ++j) {