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

Configure Feed

Select the types of activity you want to include in your feed.

firewire: ohci: use MAX macro to guarantee minimum count of pages for AR contexts

The computation of page size for AR DMA context can be simplified by MAX
macro.

Link: https://lore.kernel.org/r/20260110013911.19160-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+1 -1
+1 -1
drivers/firewire/ohci.c
··· 86 86 #define AR_BUFFER_SIZE (32*1024) 87 87 #define AR_BUFFERS_MIN DIV_ROUND_UP(AR_BUFFER_SIZE, PAGE_SIZE) 88 88 /* we need at least two pages for proper list management */ 89 - #define AR_BUFFERS (AR_BUFFERS_MIN >= 2 ? AR_BUFFERS_MIN : 2) 89 + #define AR_BUFFERS MAX(2, AR_BUFFERS_MIN) 90 90 91 91 #define MAX_ASYNC_PAYLOAD 4096 92 92 #define MAX_AR_PACKET_SIZE (16 + MAX_ASYNC_PAYLOAD + 4)