diff --git a/ras-record.h b/ras-record.h index 3fe332e..750e2bb 100644 --- a/ras-record.h +++ b/ras-record.h @@ -263,7 +263,6 @@ struct ras_cxl_memory_module_event; #ifdef HAVE_SQLITE3 - struct sqlite3_priv { sqlite3 *db; sqlite3_stmt *stmt_mc_event; diff --git a/types.h b/types.h index d0b4ee3..8b8a8ec 100644 --- a/types.h +++ b/types.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -110,6 +109,14 @@ (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ __is_constexpr((l) > (h)), (l) > (h), 0))) +#define __GENMASK(h, l) \ + (((~_UL(0)) - (_UL(1) << (l)) + 1) & \ + (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) + +#define __GENMASK_ULL(h, l) \ + (((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \ + (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) + #define GENMASK(h, l) \ (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) #define GENMASK_ULL(h, l) \