summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-08-30 10:47:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-01 14:07:53 +0200
commit378bfea4fb132e8879c3b3872d7fee48c8b9ea85 (patch)
treef768aa00552819611ad56b45f24490cc4f97706a /tools/lib/python/kdoc/python_version.py
parent63fda2a1ba884203fc40bd05cd69d8491dbb4cf8 (diff)
char: xillybus: replace __get_free_pages() with kmalloc()
fifo_init() allocates the buffers backing the software FIFO and endpoint_alloc() allocates the transfer buffers of a USB endpoint. These buffers can be allocated with kmalloc() as there's nothing special about them to go directly to the page allocator. kmalloc() provides a better API that does not require ugly casts and kfree() does not need to know the size of the freed object. Performance difference between kmalloc() and __get_free_pages() is not measurable as both allocators take an object/page from a per-CPU list for fast path allocations. For the slow path the performance is anyway determined by the amount of reclaim involved rather than by what allocator is used. Since kmalloc() does not need the allocation order, ask it for the buffer sizes the driver already tracks and drop the now unused order fields. For a FIFO smaller than a page this also stops rounding the allocation up to PAGE_SIZE. Replace use of __get_free_pages() with kmalloc() and free_pages() with kfree(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com Assisted-by: copilot:claude-opus Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Link: https://patch.msgid.link/20260830-char-misc-v1-2-05e2ce44f291@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions