tools/include: Add _RET_IP_ and math definitions to kernel.h
authorKarolina Drobnik <karolinadrobnik@gmail.com>
Fri, 23 Dec 2022 00:09:57 +0000 (18:09 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:44 +0000 (13:14 +0100)
commit6215904fe29537067ff938fae1732b204abf8ea7
tree3d056a7513226c53b62658ed783986daf3a89a3f
parentc8853267289c55b1acbe4dc3641374887584834d
tools/include: Add _RET_IP_ and math definitions to kernel.h

commit 5cf67a6051ea2558fd7c3d39c5a808db73073e9d upstream.

Add max_t, min_t and clamp functions, together with _RET_IP_
definition, so they can be used in testing.

Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/230fea382cb1e1659cdd52a55201854d38a0a149.1643796665.git.karolinadrobnik@gmail.com
[tyhicks: Backport around contextual differences due to the lack of v5.16 commit
 d6e6a27d960f ("tools: Fix math.h breakage"). That commit fixed a commit
 that was merged in v5.16-rc1 and, therefore, doesn't need to go back to
 the stable branches.]
Signed-off-by: Tyler Hicks (Microsoft) <code@tyhicks.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/include/linux/kernel.h