From ac08491d6a5b72b50544bd27bb91a03db7a7d49b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 29 Aug 2020 16:11:31 +0000 Subject: [PATCH] scst/include/backport.h: Backport the fallthrough macro git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9147 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index 9aa63dbc6..194bd4bbf 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -240,6 +240,15 @@ static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) #define __percpu #endif +/* */ + +/* See also commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' + * pseudo keyword for switch/case use") # v5.4 + */ +#ifndef fallthrough +#define fallthrough __attribute__((__fallthrough__)) +#endif + /* */ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) && !defined(BACKPORT_LINUX_CPUMASK_H)