Hi Gustavo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jack-fs/fsnotify]
[also build test WARNING on linus/master v6.15-rc5 next-20250507]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Gustavo-A-R-Silva/fanotify-Avoid-a-couple-of-Wflex-array-member-not-at-end-warnings/20250507-074110
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git 
fsnotify
patch link:    https://lore.kernel.org/r/aBqdlxlBtb9s7ydc%40kspp
patch subject: [PATCH][next] fanotify: Avoid a couple of 
-Wflex-array-member-not-at-end warnings
config: x86_64-defconfig 
(https://download.01.org/0day-ci/archive/20250508/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250508/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   In file included from fs/notify/fdinfo.c:17:
>> fs/notify/fanotify/fanotify.h:280:16: warning: alignment 1 of 'union 
>> <anonymous>' is less than 4 [-Wpacked-not-aligned]
     280 |         struct fanotify_fh name;                                     
                 \
         |                ^~~~~~~~~~~
   fs/notify/fanotify/fanotify.h:287:9: note: in expansion of macro 
'FANOTIFY_INLINE_FH'
     287 |         FANOTIFY_INLINE_FH(object_fh, FANOTIFY_INLINE_FH_LEN);
         |         ^~~~~~~~~~~~~~~~~~
>> fs/notify/fanotify/fanotify.h:280:16: warning: alignment 1 of 'union 
>> <anonymous>' is less than 4 [-Wpacked-not-aligned]
     280 |         struct fanotify_fh name;                                     
                 \
         |                ^~~~~~~~~~~
   fs/notify/fanotify/fanotify.h:315:9: note: in expansion of macro 
'FANOTIFY_INLINE_FH'
     315 |         FANOTIFY_INLINE_FH(object_fh, MAX_HANDLE_SZ);
         |         ^~~~~~~~~~~~~~~~~~


vim +280 fs/notify/fanotify/fanotify.h

b8a6c3a2f0ae4d Amir Goldstein          2020-07-08  275  
2c5069433a3adc Gabriel Krisman Bertazi 2021-10-25  276  #define 
FANOTIFY_INLINE_FH(name, size)                                                \
e3725b8a2ecdf6 Gustavo A. R. Silva     2025-05-06  277  union {                 
                                                              \
e3725b8a2ecdf6 Gustavo A. R. Silva     2025-05-06  278          /* Space for 
object_fh and object_fh.buf[] - access with fanotify_fh_buf() */ \
e3725b8a2ecdf6 Gustavo A. R. Silva     2025-05-06  279          unsigned char 
_inline_fh_buf[struct_size_t(struct fanotify_fh, buf, size)];   \
1758cd2e95d31b Alexey Dobriyan         2023-10-10 @280          struct 
fanotify_fh name;                                                      \
e3725b8a2ecdf6 Gustavo A. R. Silva     2025-05-06  281  } __packed
2c5069433a3adc Gabriel Krisman Bertazi 2021-10-25  282  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to