Avoid gcc warnings by stripping off outer parentheses from the SHOW_DELTA*() macros; Reported-by: eibisidi

This commit is contained in:
Kaiwan N Billimoria
2024-11-26 10:50:46 +05:30
parent 068f0c3ed8
commit ca960e5bf9

View File

@@ -123,15 +123,16 @@
* as required.
* Inspired from raspberry pi kernel src: arch/arm/mm/init.c:MLM()
*/
#define SHOW_DELTA_b(low, hi) ((low), (hi), ((hi) - (low)))
#define SHOW_DELTA_K(low, hi) ((low), (hi), (((hi) - (low)) >> 10))
#define SHOW_DELTA_M(low, hi) ((low), (hi), (((hi) - (low)) >> 20))
#define SHOW_DELTA_G(low, hi) ((low), (hi), (((hi) - (low)) >> 30))
#define SHOW_DELTA_MG(low, hi) ((low), (hi), (((hi) - (low)) >> 20), (((hi) - (low)) >> 30))
#define SHOW_DELTA_b(low, hi) (low), (hi), ((hi) - (low))
#define SHOW_DELTA_K(low, hi) (low), (hi), (((hi) - (low)) >> 10)
#define SHOW_DELTA_M(low, hi) (low), (hi), (((hi) - (low)) >> 20)
#define SHOW_DELTA_G(low, hi) (low), (hi), (((hi) - (low)) >> 30)
#define SHOW_DELTA_MG(low, hi) (low), (hi), (((hi) - (low)) >> 20), (((hi) - (low)) >> 30)
#if (BITS_PER_LONG == 64)
#define SHOW_DELTA_MGT(low, hi) ((low), (hi), (((hi) - (low)) >> 20), (((hi) - (low)) >> 30), (((hi) - (low)) >> 40))
#define SHOW_DELTA_MGT(low, hi) (low), (hi), (((hi) - (low)) >> 20), (((hi) - (low)) >> 30), (((hi) - (low)) >> 40)
#else // 32-bit
#define SHOW_DELTA_MGT(low, hi) ((low), (hi), (((hi) - (low)) >> 20), (((hi) - (low)) >> 30))
#define SHOW_DELTA_MGT(low, hi) (low), (hi), (((hi) - (low)) >> 20), (((hi) - (low)) >> 30)
#endif
#ifdef __KERNEL__