[PATCH v4 1/4] uapi: Provide DIV_ROUND_CLOSEST()

Nícolas F. R. A. Prado nfraprado at collabora.com
Mon Jan 26 10:33:11 PST 2026


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 at collabora.com>

Reviewed-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>

-- 
Thanks,

Nícolas



More information about the linux-arm-kernel mailing list