From: Leon Romanovsky Date: Sun, 13 Sep 2020 10:29:28 +0000 (+0300) Subject: overflow: Include header file with SIZE_MAX declaration X-Git-Tag: v5.15~2640^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4947e84f23474803b62a2759b5808147e4e15f9;p=platform%2Fkernel%2Flinux-starfive.git overflow: Include header file with SIZE_MAX declaration The various array_size functions use SIZE_MAX define, but missed limits.h causes to failure to compile code that needs overflow.h. In file included from drivers/infiniband/core/uverbs_std_types_device.c:6: ./include/linux/overflow.h: In function 'array_size': ./include/linux/overflow.h:258:10: error: 'SIZE_MAX' undeclared (first use in this function) 258 | return SIZE_MAX; | ^~~~~~~~ Fixes: 610b15c50e86 ("overflow.h: Add allocation size calculation helpers") Link: https://lore.kernel.org/r/20200913102928.134985-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 93fcef1..ff3c48f 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -3,6 +3,7 @@ #define __LINUX_OVERFLOW_H #include +#include /* * In the fallback code below, we need to compute the minimum and