Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ttm: Fix spelling mistakes and remove unused #ifdef

. and some comments to make it easier to understand.

Ackedby: Randy Dunlap <randy.dunlap@oracle.com>
[v2: Added some more updates from Randy Dunlap]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Konrad Rzeszutek Wilk and committed by
Dave Airlie
0d74f86f 20633442

+15 -18
+8 -8
drivers/gpu/drm/ttm/ttm_page_alloc.c
··· 355 355 if (nr_free) 356 356 goto restart; 357 357 358 - /* Not allowed to fall tough or break because 358 + /* Not allowed to fall through or break because 359 359 * following context is inside spinlock while we are 360 360 * outside here. 361 361 */ ··· 556 556 } 557 557 558 558 /** 559 - * Fill the given pool if there isn't enough pages and requested number of 559 + * Fill the given pool if there aren't enough pages and the requested number of 560 560 * pages is small. 561 561 */ 562 562 static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool, ··· 576 576 577 577 pool->fill_lock = true; 578 578 579 - /* If allocation request is small and there is not enough 580 - * pages in pool we fill the pool first */ 579 + /* If allocation request is small and there are not enough 580 + * pages in a pool we fill the pool up first. */ 581 581 if (count < _manager->options.small 582 582 && count > pool->npages) { 583 583 struct list_head new_pages; ··· 614 614 } 615 615 616 616 /** 617 - * Cut count nubmer of pages from the pool and put them to return list 617 + * Cut 'count' number of pages from the pool and put them on the return list. 618 618 * 619 - * @return count of pages still to allocate to fill the request. 619 + * @return count of pages still required to fulfill the request. 620 620 */ 621 621 static unsigned ttm_page_pool_get_pages(struct ttm_page_pool *pool, 622 622 struct list_head *pages, int ttm_flags, ··· 637 637 goto out; 638 638 } 639 639 /* find the last pages to include for requested number of pages. Split 640 - * pool to begin and halves to reduce search space. */ 640 + * pool to begin and halve it to reduce search space. */ 641 641 if (count <= pool->npages/2) { 642 642 i = 0; 643 643 list_for_each(p, &pool->list) { ··· 651 651 break; 652 652 } 653 653 } 654 - /* Cut count number of pages from pool */ 654 + /* Cut 'count' number of pages from the pool */ 655 655 list_cut_position(pages, &pool->list, p); 656 656 pool->npages -= count; 657 657 count = 0;
-3
include/drm/ttm/ttm_bo_api.h
··· 662 662 663 663 extern void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map); 664 664 665 - #if 0 666 - #endif 667 - 668 665 /** 669 666 * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object. 670 667 *
+3 -3
include/drm/ttm/ttm_bo_driver.h
··· 78 78 * 79 79 * Bind the backend pages into the aperture in the location 80 80 * indicated by @bo_mem. This function should be able to handle 81 - * differences between aperture- and system page sizes. 81 + * differences between aperture and system page sizes. 82 82 */ 83 83 int (*bind) (struct ttm_backend *backend, struct ttm_mem_reg *bo_mem); 84 84 ··· 88 88 * @backend: Pointer to a struct ttm_backend. 89 89 * 90 90 * Unbind previously bound backend pages. This function should be 91 - * able to handle differences between aperture- and system page sizes. 91 + * able to handle differences between aperture and system page sizes. 92 92 */ 93 93 int (*unbind) (struct ttm_backend *backend); 94 94 ··· 786 786 * ttm_bo_device_init 787 787 * 788 788 * @bdev: A pointer to a struct ttm_bo_device to initialize. 789 - * @mem_global: A pointer to an initialized struct ttm_mem_global. 789 + * @glob: A pointer to an initialized struct ttm_bo_global. 790 790 * @driver: A pointer to a struct ttm_bo_driver set up by the caller. 791 791 * @file_page_offset: Offset into the device address space that is available 792 792 * for buffer data. This ensures compatibility with other users of the
+1 -1
include/drm/ttm/ttm_memory.h
··· 41 41 * @do_shrink: The callback function. 42 42 * 43 43 * Arguments to the do_shrink functions are intended to be passed using 44 - * inheritance. That is, the argument class derives from struct ttm_mem_srink, 44 + * inheritance. That is, the argument class derives from struct ttm_mem_shrink, 45 45 * and can be accessed using container_of(). 46 46 */ 47 47
+2 -2
include/drm/ttm/ttm_object.h
··· 111 111 * 112 112 * @ref_obj_release: A function to be called when a reference object 113 113 * with another ttm_ref_type than TTM_REF_USAGE is deleted. 114 - * this function may, for example, release a lock held by a user-space 114 + * This function may, for example, release a lock held by a user-space 115 115 * process. 116 116 * 117 117 * This struct is intended to be used as a base struct for objects that ··· 172 172 /** 173 173 * ttm_base_object_unref 174 174 * 175 - * @p_base: Pointer to a pointer referncing a struct ttm_base_object. 175 + * @p_base: Pointer to a pointer referencing a struct ttm_base_object. 176 176 * 177 177 * Decrements the base object refcount and clears the pointer pointed to by 178 178 * p_base.
+1 -1
include/drm/ttm/ttm_page_alloc.h
··· 32 32 /** 33 33 * Get count number of pages from pool to pages list. 34 34 * 35 - * @pages: heado of empty linked list where pages are filled. 35 + * @pages: head of empty linked list where pages are filled. 36 36 * @flags: ttm flags for page allocation. 37 37 * @cstate: ttm caching state for the page. 38 38 * @count: number of pages to allocate.