]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
linuxkpi: Add overflow.h
authormanu <manu@FreeBSD.org>
Wed, 27 May 2020 09:31:50 +0000 (09:31 +0000)
committermanu <manu@FreeBSD.org>
Wed, 27 May 2020 09:31:50 +0000 (09:31 +0000)
commit8a31db9e3b5bd6af291201bb7938e6c151b0c844
treee79b512cf5fa4cbbbe2e863bfb2d355e117716b3
parentdaa928cb2e41aba964fe54ec6399ba581523ae15
linuxkpi: Add overflow.h

Only add check_add_overflow and check_mul_overflow as those are the only
two needed function by DRM v5.3.
Both gcc and clang have builtin to do this check so use them directly
but throw an error if the compiler/code checker doesn't support this builtin.

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselsasky
Differential Revision: https://reviews.freebsd.org/D25015
sys/compat/linuxkpi/common/include/linux/overflow.h [new file with mode: 0644]