Re: [PATCH v5 1/4] uapi: Provide DIV_ROUND_CLOSEST()
From: AngeloGioacchino Del Regno
Date: Tue Jan 27 2026 - 07:35:36 EST
Il 27/01/26 09:45, Cristian Ciocaltea ha scritto:
Currently DIV_ROUND_CLOSEST() is only available for the kernel via
include/linux/math.h.
Expose it to userland as well by adding __KERNEL_DIV_ROUND_CLOSEST() as
a common definition in uapi.
Additionally, ensure it allows building ISO C applications by switching
from the 'typeof' GNU extension to the ISO-friendly __typeof__.
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
Tested-by: Diederik de Haas <diederik@xxxxxxxxxxxxxx>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>