[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Prefer struct_size over open coded arithmetic

Patchwork patchwork at emeril.freedesktop.org
Mon Oct 4 15:06:56 UTC 2021


== Series Details ==

Series: drm/i915: Prefer struct_size over open coded arithmetic
URL   : https://patchwork.freedesktop.org/series/95408/
State : failure

== Summary ==

CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND objtool
  CHK     include/generated/compile.h
  CC [M]  drivers/gpu/drm/i915/i915_syncmap.o
drivers/gpu/drm/i915/i915_syncmap.c:86:3: error: expected specifier-qualifier-list before ‘DECLARE_FLEX_ARRAY’
   DECLARE_FLEX_ARRAY(u32, seqno);
   ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c: In function ‘__sync_seqno’:
drivers/gpu/drm/i915/i915_syncmap.c:106:10: error: ‘struct i915_syncmap’ has no member named ‘seqno’
  return p->seqno;
          ^~
drivers/gpu/drm/i915/i915_syncmap.c: In function ‘__sync_child’:
drivers/gpu/drm/i915/i915_syncmap.c:112:10: error: ‘struct i915_syncmap’ has no member named ‘child’
  return p->child;
          ^~
In file included from ./include/linux/slab.h:16,
                 from drivers/gpu/drm/i915/i915_syncmap.c:25:
drivers/gpu/drm/i915/i915_syncmap.c: In function ‘__sync_alloc_leaf’:
./include/linux/overflow.h:194:18: error: ‘struct i915_syncmap’ has no member named ‘seqno’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                  ^~
drivers/gpu/drm/i915/i915_syncmap.c:207:14: note: in expansion of macro ‘struct_size’
  p = kmalloc(struct_size(p, seqno, KSYNCMAP), GFP_KERNEL);
              ^~~~~~~~~~~
In file included from ./include/linux/bits.h:22,
                 from ./include/linux/ratelimit_types.h:5,
                 from ./include/linux/printk.h:10,
                 from ./include/asm-generic/bug.h:22,
                 from ./arch/x86/include/asm/bug.h:84,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/mmdebug.h:5,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/slab.h:15,
                 from drivers/gpu/drm/i915/i915_syncmap.c:25:
./include/linux/overflow.h:194:49: error: ‘struct i915_syncmap’ has no member named ‘seqno’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                                                 ^~
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                              ^
./include/linux/compiler.h:258:46: note: in expansion of macro ‘__same_type’
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                              ^~~~~~~~~~~
./include/linux/overflow.h:194:30: note: in expansion of macro ‘__must_be_array’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                              ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c:207:14: note: in expansion of macro ‘struct_size’
  p = kmalloc(struct_size(p, seqno, KSYNCMAP), GFP_KERNEL);
              ^~~~~~~~~~~
./include/linux/overflow.h:194:49: error: ‘struct i915_syncmap’ has no member named ‘seqno’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                                                 ^~
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                              ^
./include/linux/compiler.h:258:46: note: in expansion of macro ‘__same_type’
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                              ^~~~~~~~~~~
./include/linux/overflow.h:194:30: note: in expansion of macro ‘__must_be_array’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                              ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c:207:14: note: in expansion of macro ‘struct_size’
  p = kmalloc(struct_size(p, seqno, KSYNCMAP), GFP_KERNEL);
              ^~~~~~~~~~~
./include/linux/build_bug.h:16:51: error: bit-field ‘<anonymous>’ width not an integer constant
 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                   ^
./include/linux/compiler.h:258:28: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                            ^~~~~~~~~~~~~~~~~
./include/linux/overflow.h:194:30: note: in expansion of macro ‘__must_be_array’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                              ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c:207:14: note: in expansion of macro ‘struct_size’
  p = kmalloc(struct_size(p, seqno, KSYNCMAP), GFP_KERNEL);
              ^~~~~~~~~~~
In file included from ./include/linux/slab.h:16,
                 from drivers/gpu/drm/i915/i915_syncmap.c:25:
drivers/gpu/drm/i915/i915_syncmap.c: In function ‘__sync_set’:
./include/linux/overflow.h:194:18: error: ‘struct i915_syncmap’ has no member named ‘child’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                  ^~
drivers/gpu/drm/i915/i915_syncmap.c:289:19: note: in expansion of macro ‘struct_size’
    next = kzalloc(struct_size(next, child, KSYNCMAP),
                   ^~~~~~~~~~~
In file included from ./include/linux/bits.h:22,
                 from ./include/linux/ratelimit_types.h:5,
                 from ./include/linux/printk.h:10,
                 from ./include/asm-generic/bug.h:22,
                 from ./arch/x86/include/asm/bug.h:84,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/mmdebug.h:5,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/slab.h:15,
                 from drivers/gpu/drm/i915/i915_syncmap.c:25:
./include/linux/overflow.h:194:49: error: ‘struct i915_syncmap’ has no member named ‘child’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                                                 ^~
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                              ^
./include/linux/compiler.h:258:46: note: in expansion of macro ‘__same_type’
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                              ^~~~~~~~~~~
./include/linux/overflow.h:194:30: note: in expansion of macro ‘__must_be_array’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                              ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c:289:19: note: in expansion of macro ‘struct_size’
    next = kzalloc(struct_size(next, child, KSYNCMAP),
                   ^~~~~~~~~~~
./include/linux/overflow.h:194:49: error: ‘struct i915_syncmap’ has no member named ‘child’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                                                 ^~
./include/linux/build_bug.h:16:62: note: in definition of macro ‘BUILD_BUG_ON_ZERO’
 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                              ^
./include/linux/compiler.h:258:46: note: in expansion of macro ‘__same_type’
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                              ^~~~~~~~~~~
./include/linux/overflow.h:194:30: note: in expansion of macro ‘__must_be_array’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                              ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c:289:19: note: in expansion of macro ‘struct_size’
    next = kzalloc(struct_size(next, child, KSYNCMAP),
                   ^~~~~~~~~~~
./include/linux/build_bug.h:16:51: error: bit-field ‘<anonymous>’ width not an integer constant
 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                   ^
./include/linux/compiler.h:258:28: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                            ^~~~~~~~~~~~~~~~~
./include/linux/overflow.h:194:30: note: in expansion of macro ‘__must_be_array’
       sizeof(*(p)->member) + __must_be_array((p)->member),\
                              ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c:289:19: note: in expansion of macro ‘struct_size’
    next = kzalloc(struct_size(next, child, KSYNCMAP),
                   ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_syncmap.c: In function ‘__sync_child’:
drivers/gpu/drm/i915/i915_syncmap.c:113:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
drivers/gpu/drm/i915/i915_syncmap.c: In function ‘__sync_seqno’:
drivers/gpu/drm/i915/i915_syncmap.c:107:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
scripts/Makefile.build:277: recipe for target 'drivers/gpu/drm/i915/i915_syncmap.o' failed
make[4]: *** [drivers/gpu/drm/i915/i915_syncmap.o] Error 1
scripts/Makefile.build:540: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:540: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:540: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1868: recipe for target 'drivers' failed
make: *** [drivers] Error 2




More information about the Intel-gfx mailing list