Re: [PATCH v4 1/4] uapi: Provide DIV_ROUND_CLOSEST()
From: F. R. A. Prado
Date: Mon Jan 26 2026 - 13:33:52 EST
On Fri, 2025-12-19 at 23:46 +0200, Cristian Ciocaltea wrote:
> 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__.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
--
Thanks,
Nícolas