staging: media: atomisp: remove unused functions
Subsystems (4)
cover staging: media: atomisp: remove unused functions
This series removes functions in pci/hmm/ that are declared and defined but never called.
Nikolay Kulikov (2):
staging: media: atomisp: remove unused functions from hmm.c
staging: media: atomisp: remove unused functions from hmm_bo.c
.../staging/media/atomisp/include/hmm/hmm.h | 16 --- .../media/atomisp/include/hmm/hmm_bo.h | 19 ---- drivers/staging/media/atomisp/pci/hmm/hmm.c | 41 -------- .../staging/media/atomisp/pci/hmm/hmm_bo.c | 97 ------------------- 4 files changed, 173 deletions(-)
base-commit: cb08dcd0a896c3ac8073a57296f2377b106c35b4
Signature · 1 line
2.55.0
PATCH 1/2 staging: media: atomisp: remove unused functions from hmm.c
These functions are declared and defined but are not called anywhere.
--- .../staging/media/atomisp/include/hmm/hmm.h | 16 -------- drivers/staging/media/atomisp/pci/hmm/hmm.c | 41 ------------------- 2 files changed, 57 deletions(-)
drivers/staging/media/atomisp/include/hmm/hmm.h +0 -16
@@ -32,12 +32,6 @@ void hmm_free(ia_css_ptr ptr);int hmm_load (ia_css_ptr virt,void *data,unsigned int bytes);int hmm_store (ia_css_ptr virt,const void *data,unsigned int bytes);int hmm_set (ia_css_ptr virt,int c,unsigned int bytes); -int hmm_flush (ia_css_ptr virt,unsigned int bytes); - -/* -* get kernel memory physical address from ISP virtual address. -*/ -phys_addr_t hmm_virt_to_phys (ia_css_ptr virt);/* * map ISP memory starts with virt to kernel virtual address
@@ -55,16 +49,6 @@ void hmm_vunmap(ia_css_ptr virt);*/ void hmm_flush_vmap (ia_css_ptr virt); -/* -* map ISP memory starts with virt to specific vma. -* -* used for mmap operation. -* -* virt must be the start address of ISP memory (return by hmm_alloc), -* do not pass any other address. -*/ -int hmm_mmap (struct vm_area_struct *vma,ia_css_ptr virt); -extern struct hmm_bo_device bo_device;#endif
drivers/staging/media/atomisp/pci/hmm/hmm.c +0 -41
53 lines not on this page · raw message
Signature · 1 line
2.55.0
PATCH 2/2 staging: media: atomisp: remove unused functions from hmm_bo.c
In reply to Nikolay KulikovRemove several functions that are defined but never called.
--- .../media/atomisp/include/hmm/hmm_bo.h | 19 ---- .../staging/media/atomisp/pci/hmm/hmm_bo.c | 97 ------------------- 2 files changed, 116 deletions(-)
drivers/staging/media/atomisp/include/hmm/hmm_bo.h +0 -19
@@ -205,7 +205,6 @@ int hmm_bo_page_allocated(struct hmm_buffer_object *bo);*/ int hmm_bo_bind (struct hmm_buffer_object *bo);void hmm_bo_unbind (struct hmm_buffer_object *bo); -int hmm_bo_binded (struct hmm_buffer_object *bo);/* * vmap buffer object's pages to contiguous kernel virtual address.
@@ -224,17 +223,6 @@ void hmm_bo_flush_vmap(struct hmm_buffer_object *bo);*/ void hmm_bo_vunmap (struct hmm_buffer_object *bo); -/* -* mmap the bo's physical pages to specific vma. -* -* vma's address space size must be the same as bo's size, -* otherwise it will return -EINVAL. -* -* vma->vm_flags will be set to (VM_RESERVED | VM_IO). -*/ -int hmm_bo_mmap (struct vm_area_struct *vma, -struct hmm_buffer_object *bo); -/* * find the buffer object by its virtual address vaddr. * return NULL if no such buffer object found.
@@ -251,11 +239,4 @@ struct hmm_buffer_object *hmm_bo_device_search_start(struct hmm_buffer_object *hmm_bo_device_search_in_range (struct hmm_bo_device *bdev,ia_css_ptr vaddr); -/* -* find the buffer object with kernel virtual address vaddr. -* return NULL if no such buffer object found. -*/ -struct hmm_buffer_object *hmm_bo_device_search_vmap_start ( -struct hmm_bo_device *bdev,const void *vaddr); -#endif
drivers/staging/media/atomisp/pci/hmm/hmm_bo.c +0 -97
112 lines not on this page · raw message
Signature · 1 line
2.55.0
Quoted 3 lines · Nikolay Kulikov
This series removes functions in pci/hmm/ that are declared and defined but never called.
Don't do it per file, squash these changes as it seems not so many of them (I assume you checked the entire driver, right?).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · Nikolay Kulikov
This series removes functions in pci/hmm/ that are declared and defined but never called.
Don't do it per file, squash these changes as it seems not so many of them (I assume you checked the entire driver, right?).
Note, if you want to make a useful contribution, try to clean up the below header
include / hmm / hmm_common.h
It has some ugly macros, instead this code should go to the users and then be propagated to each level and refactored.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Andy Shevchenko
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · Nikolay Kulikov
This series removes functions in pci/hmm/ that are declared and defined but never called.
Don't do it per file, squash these changes as it seems not so many of them (I assume you checked the entire driver, right?).
Yes, the entire driver. I usually use 'git grep' from its root.
Quoted 8 lines
Note, if you want to make a useful contribution, try to clean up the below header
include / hmm /
hmm_common.hIt has some ugly macros, instead this code should go to the users and then be propagated to each level and refactored.
I'll add this to v2.
Thanks,
Nikolay
Quoted 4 lines
Signature · 3 lines
-- With Best Regards, Andy Shevchenko