✗ CI.checkpatch: warning for Fixed-type GENMASK/BIT (rev3)

Patchwork patchwork at emeril.freedesktop.org
Thu Feb 8 17:05:38 UTC 2024


== Series Details ==

Series: Fixed-type GENMASK/BIT (rev3)
URL   : https://patchwork.freedesktop.org/series/129115/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
35591fb8b4d5305b37ce31483f85ac0956eaa536
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 36e5b56ef1ea7182c7d3c50a14e15290539ac740
Author: Lucas De Marchi <lucas.demarchi at intel.com>
Date:   Wed Feb 7 23:45:21 2024 -0800

    drm/i915: Convert REG_GENMASK* to fixed-width GENMASK_*
    
    Now that include/linux/bits.h implements fixed-width GENMASK_*, use them
    to implement the i915/xe specific macros. Converting each driver to use
    the generic macros are left for later, when/if other driver-specific
    macros are also generalized.
    
    Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
    Acked-by: Jani Nikula <jani.nikula at intel.com>
+ /mt/dim checkpatch 22d626404cb81d7818ab55e5b14885e31a998dfd drm-intel
bc106b7e0 bits: introduce fixed-type genmasks
-:72: CHECK:MACRO_ARG_REUSE: Macro argument reuse 't' - possible side-effects?
#72: FILE: include/linux/bits.h:45:
+#define __GENMASK(t, h, l) \
+	(GENMASK_INPUT_CHECK(h, l) + \
+	 (((t)~0ULL - ((t)(1) << (l)) + 1) & \
+	 ((t)~0ULL >> (BITS_PER_TYPE(t) - 1 - (h)))))

-:72: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'h' - possible side-effects?
#72: FILE: include/linux/bits.h:45:
+#define __GENMASK(t, h, l) \
+	(GENMASK_INPUT_CHECK(h, l) + \
+	 (((t)~0ULL - ((t)(1) << (l)) + 1) & \
+	 ((t)~0ULL >> (BITS_PER_TYPE(t) - 1 - (h)))))

-:72: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'l' - possible side-effects?
#72: FILE: include/linux/bits.h:45:
+#define __GENMASK(t, h, l) \
+	(GENMASK_INPUT_CHECK(h, l) + \
+	 (((t)~0ULL - ((t)(1) << (l)) + 1) & \
+	 ((t)~0ULL >> (BITS_PER_TYPE(t) - 1 - (h)))))

total: 0 errors, 0 warnings, 3 checks, 51 lines checked
28789da69 bits: Introduce fixed-type BIT
-:20: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#20: FILE: include/linux/bits.h:27:
+#define BIT_INPUT_CHECK(type, b) \
+	((BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
+		__is_constexpr(b), (b) >= BITS_PER_TYPE(type), 0))))

-:45: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#45: FILE: include/linux/bits.h:69:
+#define BIT_U8(b)		((u8)(BIT_INPUT_CHECK(u8, b) + BIT(b)))

-:46: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#46: FILE: include/linux/bits.h:70:
+#define BIT_U16(b)		((u16)(BIT_INPUT_CHECK(u16, b) + BIT(b)))

-:47: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#47: FILE: include/linux/bits.h:71:
+#define BIT_U32(b)		((u32)(BIT_INPUT_CHECK(u32, b) + BIT(b)))

-:48: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#48: FILE: include/linux/bits.h:72:
+#define BIT_U64(b)		((u64)(BIT_INPUT_CHECK(u64, b) + BIT(b)))

total: 0 errors, 0 warnings, 5 checks, 33 lines checked
36e5b56ef drm/i915: Convert REG_GENMASK* to fixed-width GENMASK_*




More information about the Intel-xe mailing list