mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
overflow: Include header file with SIZE_MAX declaration
[ Upstream commita4947e84f2] 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:610b15c50e("overflow.h: Add allocation size calculation helpers") Link: https://lore.kernel.org/r/20200913102928.134985-1-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e8b33f91ce
commit
a04b9430d2
|
|
@ -3,6 +3,7 @@
|
|||
#define __LINUX_OVERFLOW_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/limits.h>
|
||||
|
||||
/*
|
||||
* In the fallback code below, we need to compute the minimum and
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user