Fix checkpatch issues
Subsystems (4)
v3 cover Fix checkpatch issues
This patchset was created to fix warnings introduced by several patches from the previous patchset. The number of the patches was reduced from 10 to 7 because 1 patch is already accepted, 2 patches were combined into a single patch, and the changes from the 10/10 patch were added in the patches where coding style fixes were required.
* [1/07] kmalloc generates a backtrace on failure and it will show the same information as the removed messages.
* [2/07] the unlikely function is not necessary on NULL pointers after a memory allocation.
Changes in v2:
* Nothing changed in 1/10
* New added 2/10 - 10/10
Changes in v3:
* added a different cover letter message
* removed an accepted patch
* removed the braces for single statement blocks in 1/7
* split the lines with over 80 characters where changes were made
Georgiana Chelu (7):
Staging: media: atomisp: Remove useless 'out of memory' messages
Staging: media: atomisp: Remove unlikely from NULL pointer check
Staging: media: atomisp: Adjust checks for null pointers
Staging: media: atomisp: Remove return statement from void function
Staging: media: atomisp: Add spaces around bitwise OR
Staging: media: atomisp: Merge quoted string split across lines
Staging: media: atomisp: Align code with open parenthesis
.../media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 156 ++++++++++----------- 1 file changed, 72 insertions(+), 84 deletions(-)
Signature · 1 line
2.11.0
PATCH v3 1/7 Staging: media: atomisp: Remove useless 'out of memory' messages
OOM (Out Of Memory Manager) reports memory allocation fails, so there is no need for the error messages. Also, remove the {} for single if statement blocks.
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* removed {} for single statement blocks
* changed the commit message
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +2 -8
@@ -727,10 +727,8 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, 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 ;
@@ -991,15 +989,12 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,struct page **pages; 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_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 ; }
@@ -1366,7 +1361,6 @@ void *hmm_bo_vmap(struct hmm_buffer_object *bo, bool cached) 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 ; }
Signature · 1 line
2.11.0
PATCH v3 2/7 Staging: media: atomisp: Remove unlikely from NULL pointer check
In reply to Georgiana CheluRemove unlikely because kmalloc uses it inside the source code.
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* nothing changed
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +4 -4
@@ -727,7 +727,7 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, bo->page_obj =kmalloc_array (pgnr,sizeof (struct hmm_page_object ),GFP_KERNEL ); -if (unlikely (!bo->page_obj)) +if (!bo->page_obj)return -ENOMEM ; i =0 ;
@@ -989,12 +989,12 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,struct page **pages; pages =kmalloc_array (bo->pgnr,sizeof (struct page *),GFP_KERNEL ); -if (unlikely (!pages)) +if (!pages)return -ENOMEM ; bo->page_obj =kmalloc_array (bo->pgnr,sizeof (struct hmm_page_object ),GFP_KERNEL ); -if (unlikely (!bo->page_obj)) { +if (!bo->page_obj) {kfree (pages);return -ENOMEM ; }
@@ -1359,7 +1359,7 @@ void *hmm_bo_vmap(struct hmm_buffer_object *bo, bool cached) } pages =kmalloc_array (bo->pgnr,sizeof (*pages),GFP_KERNEL ); -if (unlikely (!pages)) { +if (!pages) {mutex_unlock (&bo->mutex);return NULL ; }
Signature · 1 line
2.11.0
PATCH v3 3/7 Staging: media: atomisp: Adjust checks for null pointers
In reply to Georgiana CheluRewrite the comparison to NULL for better coding style.
Fix issue reported by checkpatch.pl:
* CHECK: Comparison to NULL could be written
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* nothing changed
.../staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +10 -10
@@ -106,7 +106,7 @@ struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree( this = rb_entry(node, struct hmm_buffer_object, node);if (this->pgnr == pgnr || - (this->pgnr > pgnr && this->node.rb_left ==NULL )) { + (this->pgnr > pgnr && !this->node.rb_left)) { goto remove_bo_and_return; }else {if (this->pgnr < pgnr) {
@@ -132,7 +132,7 @@ struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree(* 1. check if 'this->next' is NULL: * yes: erase 'this' node and rebalance rbtree, return 'this'. */ -if (this->next ==NULL ) { +if (!this->next) {rb_erase (&this->node, &this->bdev->free_rbtree);return this; }
@@ -160,11 +160,11 @@ struct hmm_buffer_object *__bo_search_by_addr(struct rb_root *root, bo = rb_entry(n, struct hmm_buffer_object, node);if (bo->start > start) { -if (n->rb_left ==NULL ) +if (!n->rb_left)return NULL ; n = n->rb_left; }else if (bo->start < start) { -if (n->rb_right ==NULL ) +if (!n->rb_right)return NULL ; n = n->rb_right; }else {
@@ -185,13 +185,13 @@ struct hmm_buffer_object *__bo_search_by_addr_in_range(struct rb_root *root, bo = rb_entry(n, struct hmm_buffer_object, node);if (bo->start > start) { -if (n->rb_left ==NULL ) +if (!n->rb_left)return NULL ; n = n->rb_left; }else {if (bo->end > start)return bo; -if (n->rb_right ==NULL ) +if (!n->rb_right)return NULL ; n = n->rb_right; }
@@ -298,14 +298,14 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)* and does not have a linked list after bo, to take off this bo, * we just need erase bo directly and rebalance the free rbtree */ -if (bo->prev ==NULL && bo->next ==NULL ) { +if (!bo->prev && !bo->next) {rb_erase (&bo->node, &bdev->free_rbtree);/* 2. when bo->next != NULL && bo->prev == NULL, bo is a rbtree node, * and has a linked list,to take off this bo we need erase bo * first, then, insert bo->next into free rbtree and rebalance * the free rbtree */ - }else if (bo->prev ==NULL && bo->next !=NULL ) { + }else if (!bo->prev && bo->next) { bo->next->prev =NULL ;rb_erase (&bo->node, &bdev->free_rbtree);__bo_insert_to_free_rbtree (&bdev->free_rbtree, bo->next);
@@ -315,7 +315,7 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)* node, to take off this bo, we just need set the "prev/next" * pointers to NULL, the free rbtree stays unchaged */ - }else if (bo->prev !=NULL && bo->next ==NULL ) { + }else if (bo->prev && !bo->next) { bo->prev->next =NULL ; bo->prev =NULL ;/* 4. when bo->prev != NULL && bo->next != NULL ,bo is not a rbtree
@@ -1003,7 +1003,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,down_read (¤t->mm->mmap_sem); vma =find_vma (current->mm, (unsigned long )userptr);up_read (¤t->mm->mmap_sem); -if (vma ==NULL ) { +if (!vma) {dev_err (atomisp_dev,"find_vma failed\n" );kfree (bo->page_obj);kfree (pages);
Signature · 1 line
2.11.0
PATCH v3 4/7 Staging: media: atomisp: Remove return statement from void function
In reply to Georgiana CheluThe return statement is not useful when it ends a void function.
Issue found by checkpatch.pl:
WARNING: void function return statements are not generally useful
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* nothing changed
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +0 -4
@@ -520,7 +520,6 @@ void hmm_bo_release(struct hmm_buffer_object *bo)__bo_insert_to_free_rbtree (&bdev->free_rbtree, bo);mutex_unlock (&bdev->rbtree_mutex); -return ; }void hmm_bo_device_exit (struct hmm_bo_device *bdev)
@@ -700,8 +699,6 @@ static void free_private_bo_pages(struct hmm_buffer_object *bo,break ; } } - -return ; }/*Allocate pages which will be used only by ISP*/
@@ -1409,7 +1406,6 @@ void hmm_bo_vunmap(struct hmm_buffer_object *bo) }mutex_unlock (&bo->mutex); -return ; }void hmm_bo_ref (struct hmm_buffer_object *bo)
Signature · 1 line
2.11.0
PATCH v3 5/7 Staging: media: atomisp: Add spaces around bitwise OR
In reply to Georgiana CheluAdd spaces around operator to improve the code
readability.
Issue reported by checkpatch.pl script:
* CHECK: spaces preferred around that '|'
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* nothing changed
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +1 -1
@@ -1519,7 +1519,7 @@ int hmm_bo_mmap(struct vm_area_struct *vma, struct hmm_buffer_object *bo) vma->vm_private_data = bo; vma->vm_ops = &hmm_bo_vm_ops; - vma->vm_flags |=VM_IO |VM_DONTEXPAND |VM_DONTDUMP ; + vma->vm_flags |=VM_IO |VM_DONTEXPAND |VM_DONTDUMP ;/* * call hmm_bo_vm_open explictly.
Signature · 1 line
2.11.0
PATCH v3 6/7 Staging: media: atomisp: Merge quoted string split across lines
In reply to Georgiana CheluPrefer merging quoted strings on one line than splitting them, even if the line exceeds 80 characters. It is easier to read and grep for strings that are not split. Also, split one line with over 80 characters.
Warning found by the checkpatch.pl script:
* WARNING: quoted string split across lines
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* fixed the "line over 80 characters" warning
introduced in v2
* updated the commit message
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +5 -9
@@ -822,8 +822,7 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, ret =set_pages_uc (pages, blk_pgnr);if (ret) {dev_err (atomisp_dev, -"set page uncacheable" -"failed.\n" ); +"set page uncacheable failed.\n" );__free_pages (pages, order);
@@ -1032,8 +1031,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,/* can be written by caller, not forced */ if (page_nr != bo->pgnr) {dev_err (atomisp_dev, -"get_user_pages err: bo->pgnr = %d, " -"pgnr actually pinned = %d.\n" , +"get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n" , bo->pgnr, page_nr); goto out_of_mem; }
@@ -1498,8 +1496,7 @@ int hmm_bo_mmap(struct vm_area_struct *vma, struct hmm_buffer_object *bo)*/ if ((start +pgnr_to_size (pgnr)) != end) {dev_warn (atomisp_dev, -"vma's address space size not equal" -" to buffer object's size" ); +"vma's address space size not equal to buffer object's size" );return -EINVAL ; }
@@ -1508,9 +1505,8 @@ int hmm_bo_mmap(struct vm_area_struct *vma, struct hmm_buffer_object *bo) pfn =page_to_pfn (bo->page_obj[i].page);if (remap_pfn_range (vma, virt, pfn,PAGE_SIZE ,PAGE_SHARED )) {dev_warn (atomisp_dev, -"remap_pfn_range failed:" -" virt = 0x%x, pfn = 0x%x," -" mapped_pgnr = %d\n" , virt, pfn,1 ); +"remap_pfn_range failed: virt = 0x%x, pfn = 0x%x, mapped_pgnr = %d\n" , + virt, pfn,1 );return -EINVAL ; } virt +=PAGE_SIZE ;
Signature · 1 line
2.11.0
PATCH v3 7/7 Staging: media: atomisp: Align code with open parenthesis
In reply to Georgiana CheluImprove the code readability by aligning the code
with the open parenthesis. Also, split lines
with over 80 characters.
Fix issue reported by checkpatch.pl
* CHECK: Alignment should match open parenthesis
---
Changes in v2:
* this is a new patch added to the patchset
Changes in v3:
* fixed the "line over 80 characters" warning introduced in v2
* updated the commit message to reflect the changes
.../media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 104 +++++++++++---------- 1 file changed, 53 insertions(+), 51 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +53 -51
@@ -70,11 +70,11 @@ struct hmm_buffer_object *__bo_alloc(struct kmem_cache *bo_cache) }static int __bo_init (struct hmm_bo_device *bdev,struct hmm_buffer_object *bo, -unsigned int pgnr) +unsigned int pgnr) {check_bodev_null_return (bdev, -EINVAL );var_equal_return (hmm_bo_device_inited (bdev),0 , -EINVAL , -"hmm_bo_device not inited yet.\n" ); +"hmm_bo_device not inited yet.\n" );/* prevent zero size buffer object */ if (pgnr ==0 ) {dev_err (atomisp_dev,"0 size buffer is not allowed.\n" );
@@ -106,7 +106,7 @@ struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree( this = rb_entry(node, struct hmm_buffer_object, node);if (this->pgnr == pgnr || - (this->pgnr > pgnr && !this->node.rb_left)) { + (this->pgnr > pgnr && !this->node.rb_left)) { goto remove_bo_and_return; }else {if (this->pgnr < pgnr) {
@@ -151,7 +151,7 @@ struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree( }struct hmm_buffer_object *__bo_search_by_addr (struct rb_root *root, -ia_css_ptr start) +ia_css_ptr start) {struct rb_node *n = root->rb_node;struct hmm_buffer_object *bo;
@@ -176,7 +176,7 @@ struct hmm_buffer_object *__bo_search_by_addr(struct rb_root *root, }struct hmm_buffer_object *__bo_search_by_addr_in_range (struct rb_root *root, -unsigned int start) +unsigned int start) {struct rb_node *n = root->rb_node;struct hmm_buffer_object *bo;
@@ -201,7 +201,7 @@ struct hmm_buffer_object *__bo_search_by_addr_in_range(struct rb_root *root, }static void __bo_insert_to_free_rbtree (struct rb_root *root, -struct hmm_buffer_object *bo) +struct hmm_buffer_object *bo) {struct rb_node **new = &(root->rb_node);struct rb_node *parent =NULL ;
@@ -332,7 +332,7 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo) }struct hmm_buffer_object *__bo_merge (struct hmm_buffer_object *bo, -struct hmm_buffer_object *next_bo) +struct hmm_buffer_object *next_bo) {struct hmm_bo_device *bdev;unsigned long flags;
@@ -354,9 +354,9 @@ struct hmm_buffer_object *__bo_merge(struct hmm_buffer_object *bo,* hmm_bo_device functions. */ int hmm_bo_device_init (struct hmm_bo_device *bdev, -struct isp_mmu_client *mmu_driver, -unsigned int vaddr_start, -unsigned int size) +struct isp_mmu_client *mmu_driver, +unsigned int vaddr_start, +unsigned int size) {struct hmm_buffer_object *bo;unsigned long flags;
@@ -384,7 +384,8 @@ int hmm_bo_device_init(struct hmm_bo_device *bdev, bdev->free_rbtree =RB_ROOT ; bdev->bo_cache =kmem_cache_create ("bo_cache" , -sizeof (struct hmm_buffer_object ),0 ,0 ,NULL ); +sizeof (struct hmm_buffer_object ), +0 ,0 ,NULL );if (!bdev->bo_cache) {dev_err (atomisp_dev,"%s: create cache failed!\n" , __func__);isp_mmu_exit (&bdev->mmu);
@@ -416,14 +417,14 @@ int hmm_bo_device_init(struct hmm_bo_device *bdev, }struct hmm_buffer_object *hmm_bo_alloc (struct hmm_bo_device *bdev, -unsigned int pgnr) +unsigned int pgnr) {struct hmm_buffer_object *bo, *new_bo;struct rb_root *root = &bdev->free_rbtree;check_bodev_null_return (bdev,NULL );var_equal_return (hmm_bo_device_inited (bdev),0 ,NULL , -"hmm_bo_device not inited yet.\n" ); +"hmm_bo_device not inited yet.\n" );if (pgnr ==0 ) {dev_err (atomisp_dev,"0 size buffer is not allowed.\n" );
@@ -504,15 +505,15 @@ void hmm_bo_release(struct hmm_buffer_object *bo) next_bo = list_entry(bo->list.next, struct hmm_buffer_object, list);if (bo->list.prev != &bdev->entire_bo_list && - prev_bo->end == bo->start && - (prev_bo->status &HMM_BO_MASK ) ==HMM_BO_FREE ) { + prev_bo->end == bo->start && + (prev_bo->status &HMM_BO_MASK ) ==HMM_BO_FREE ) {__bo_take_off_handling (prev_bo); bo =__bo_merge (prev_bo, bo); }if (bo->list.next != &bdev->entire_bo_list && - next_bo->start == bo->end && - (next_bo->status &HMM_BO_MASK ) ==HMM_BO_FREE ) { + next_bo->start == bo->end && + (next_bo->status &HMM_BO_MASK ) ==HMM_BO_FREE ) {__bo_take_off_handling (next_bo); bo =__bo_merge (bo, next_bo); }
@@ -642,9 +643,9 @@ struct hmm_buffer_object *hmm_bo_device_search_vmap_start(static void free_private_bo_pages (struct hmm_buffer_object *bo, -struct hmm_pool *dypool, -struct hmm_pool *repool, -int free_pgnr) +struct hmm_pool *dypool, +struct hmm_pool *repool, +int free_pgnr) {int i, ret;
@@ -683,8 +684,8 @@ static void free_private_bo_pages(struct hmm_buffer_object *bo, ret =set_pages_wb (bo->page_obj[i].page,1 );if (ret)dev_err (atomisp_dev, -"set page to WB err ...ret = %d\n" , - ret); +"set page to WB err ...ret = %d\n" , + ret);/* W/A: set_pages_wb seldom return value = -EFAULT indicate that address of page is not in valid
@@ -703,10 +704,10 @@ static void free_private_bo_pages(struct hmm_buffer_object *bo,/*Allocate pages which will be used only by ISP*/ static int alloc_private_pages (struct hmm_buffer_object *bo, -int from_highmem, -bool cached, -struct hmm_pool *dypool, -struct hmm_pool *repool) +int from_highmem, +bool cached, +struct hmm_pool *dypool, +struct hmm_pool *repool) {int ret;unsigned int pgnr, order, blk_pgnr, alloc_pgnr;
@@ -723,7 +724,7 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, pgnr = bo->pgnr; bo->page_obj =kmalloc_array (pgnr,sizeof (struct hmm_page_object ), -GFP_KERNEL ); +GFP_KERNEL );if (!bo->page_obj)return -ENOMEM ;
@@ -735,8 +736,8 @@ static int alloc_private_pages(struct hmm_buffer_object *bo,*/ if (dypool->pops && dypool->pops->pool_alloc_pages) { alloc_pgnr = dypool->pops->pool_alloc_pages (dypool->pool_info, - bo->page_obj, pgnr, - cached); + bo->page_obj, pgnr, + cached); hmm_mem_stat.dyc_size -= alloc_pgnr;if (alloc_pgnr == pgnr)
@@ -860,8 +861,8 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, }static void free_private_pages (struct hmm_buffer_object *bo, -struct hmm_pool *dypool, -struct hmm_pool *repool) +struct hmm_pool *dypool, +struct hmm_pool *repool) {free_private_bo_pages (bo, dypool, repool, bo->pgnr);
@@ -958,8 +959,9 @@ static int __get_pfnmap_pages(struct task_struct *tsk, struct mm_struct *mm, }static int get_pfnmap_pages (struct task_struct *tsk,struct mm_struct *mm, -unsigned long start,int nr_pages,int write,int force, -struct page **pages,struct vm_area_struct **vmas) +unsigned long start,int nr_pages,int write, +int force,struct page **pages, +struct vm_area_struct **vmas) {int flags =FOLL_TOUCH ;
@@ -977,7 +979,7 @@ static int get_pfnmap_pages(struct task_struct *tsk, struct mm_struct *mm,* Convert user space virtual address into pages list */ static int alloc_user_pages (struct hmm_buffer_object *bo, -void *userptr,bool cached) +void *userptr,bool cached) {int page_nr;int i;
@@ -989,7 +991,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,return -ENOMEM ; bo->page_obj =kmalloc_array (bo->pgnr,sizeof (struct hmm_page_object ), -GFP_KERNEL ); +GFP_KERNEL );if (!bo->page_obj) {kfree (pages);return -ENOMEM ;
@@ -1032,7 +1034,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,if (page_nr != bo->pgnr) {dev_err (atomisp_dev,"get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n" , - bo->pgnr, page_nr); + bo->pgnr, page_nr); goto out_of_mem; }
@@ -1097,7 +1099,8 @@ int hmm_bo_alloc_pages(struct hmm_buffer_object *bo,*/ if (type ==HMM_BO_PRIVATE ) { ret =alloc_private_pages (bo, from_highmem, - cached, &dynamic_pool, &reserved_pool); + cached, &dynamic_pool, + &reserved_pool); }else if (type ==HMM_BO_USER ) { ret =alloc_user_pages (bo, userptr, cached); }else {
@@ -1122,7 +1125,7 @@ int hmm_bo_alloc_pages(struct hmm_buffer_object *bo, status_err:mutex_unlock (&bo->mutex);dev_err (atomisp_dev, -"buffer object has already page allocated.\n" ); +"buffer object has already page allocated.\n" );return -EINVAL ; }
@@ -1153,7 +1156,7 @@ void hmm_bo_free_pages(struct hmm_buffer_object *bo) status_err2:mutex_unlock (&bo->mutex);dev_err (atomisp_dev, -"buffer object not page allocated yet.\n" ); +"buffer object not page allocated yet.\n" ); }int hmm_bo_page_allocated (struct hmm_buffer_object *bo)
@@ -1188,7 +1191,7 @@ int hmm_bo_get_page_info(struct hmm_buffer_object *bo, status_err:dev_err (atomisp_dev, -"buffer object not page allocated yet.\n" ); +"buffer object not page allocated yet.\n" );mutex_unlock (&bo->mutex);return -EINVAL ; }
@@ -1207,9 +1210,8 @@ int hmm_bo_bind(struct hmm_buffer_object *bo)mutex_lock (&bo->mutex); -check_bo_status_yes_goto (bo, -HMM_BO_PAGE_ALLOCED |HMM_BO_ALLOCED , - status_err1); +check_bo_status_yes_goto (bo,HMM_BO_PAGE_ALLOCED |HMM_BO_ALLOCED , + status_err1);check_bo_status_no_goto (bo,HMM_BO_BINDED , status_err2);
@@ -1239,7 +1241,7 @@ int hmm_bo_bind(struct hmm_buffer_object *bo)*/ if (bo->start !=0x0 )isp_mmu_flush_tlb_range (&bdev->mmu, bo->start, - (bo->pgnr <<PAGE_SHIFT )); + (bo->pgnr <<PAGE_SHIFT )); bo->status |=HMM_BO_BINDED ;
@@ -1257,7 +1259,7 @@ int hmm_bo_bind(struct hmm_buffer_object *bo)mutex_unlock (&bo->mutex);dev_err (atomisp_dev, -"setup MMU address mapping failed.\n" ); +"setup MMU address mapping failed.\n" );return ret; status_err2:
@@ -1267,7 +1269,7 @@ int hmm_bo_bind(struct hmm_buffer_object *bo) status_err1:mutex_unlock (&bo->mutex);dev_err (atomisp_dev, -"buffer object vm_node or page not allocated.\n" ); +"buffer object vm_node or page not allocated.\n" );return -EINVAL ; }
@@ -1285,9 +1287,9 @@ void hmm_bo_unbind(struct hmm_buffer_object *bo)mutex_lock (&bo->mutex);check_bo_status_yes_goto (bo, -HMM_BO_PAGE_ALLOCED | -HMM_BO_ALLOCED | -HMM_BO_BINDED , status_err); +HMM_BO_PAGE_ALLOCED | +HMM_BO_ALLOCED | +HMM_BO_BINDED , status_err); bdev = bo->bdev;
@@ -1314,7 +1316,7 @@ void hmm_bo_unbind(struct hmm_buffer_object *bo) status_err:mutex_unlock (&bo->mutex);dev_err (atomisp_dev, -"buffer vm or page not allocated or not binded yet.\n" ); +"buffer vm or page not allocated or not binded yet.\n" ); }int hmm_bo_binded (struct hmm_buffer_object *bo)
@@ -1363,7 +1365,7 @@ void *hmm_bo_vmap(struct hmm_buffer_object *bo, bool cached) pages[i] = bo->page_obj[i].page; bo->vmap_addr =vmap (pages, bo->pgnr,VM_MAP , - cached ?PAGE_KERNEL :PAGE_KERNEL_NOCACHE ); + cached ?PAGE_KERNEL :PAGE_KERNEL_NOCACHE );if (unlikely (!bo->vmap_addr)) {kfree (pages);mutex_unlock (&bo->mutex);
Signature · 1 line
2.11.0
Greg Kroah-Hartman
maintainerQuoted 7 lines · Georgiana Chelu
This patchset was created to fix warnings introduced by several patches from the previous patchset. The number of the patches was reduced from 10 to 7 because 1 patch is already accepted, 2 patches were combined into a single patch, and the changes from the 10/10 patch were added in the patches where coding style fixes were required.
In the future, please put the subsystem and driver name in the subject of your 0/X email, otherwise it can get lost in my inbox.
Also, why wrap your lines so narrow here?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH v3 6/7] Staging: media: atomisp: Merge quoted string split across lines
In reply to Georgiana CheluQuoted 4 lines · Georgiana Chelu
Prefer merging quoted strings on one line than splitting them, even if the line exceeds 80 characters. It is easier to read and grep for strings that are not split. Also, split one line with over 80 characters.
It's nice to wrap changelog lines, but please do so at 72 columns.
Mauro, are you going to be taking these types of changes for this driver, or do you want me to?
thanks,
greg k-h
Quoted 11 lines · Greg Kroah-Hartman
Quoted 7 lines · Georgiana Chelu
This patchset was created to fix warnings introduced by several patches from the previous patchset. The number of the patches was reduced from 10 to 7 because 1 patch is already accepted, 2 patches were combined into a single patch, and the changes from the 10/10 patch were added in the patches where coding style fixes were required.
In the future, please put the subsystem and driver name in the subject of your 0/X email, otherwise it can get lost in my inbox.
I will keep it in mind.
Quoted 2 lines
Also, why wrap your lines so narrow here?
I wanted to be a compact message, but now I see that is quite difficult to read it. I will take into consideration to increase the number of columns. Thank you for the review!
Georgiana
Quoted 4 lines
thanks,
greg k-h