Hi Qu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kdave/for-next]
[also build test ERROR on v5.9-rc6 next-20200921]
[cannot apply to btrfs/next]
[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]
url:
https://github.com/0day-ci/linux/commits/Qu-Wenruo/btrfs-fix-false-alert-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-randconfig-s021-20200920 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:32:
> ./usr/include/linux/btrfs_tree.h:651:19: error: unknown type name
'size_t'
651 | static __inline__ size_t
btrfs_legacy_root_item_size(void)
| ^~~~~~
./usr/include/linux/btrfs_tree.h: In function 'btrfs_legacy_root_item_size':
> ./usr/include/linux/btrfs_tree.h:653:9: error: implicit
declaration of function 'offsetof' [-Werror=implicit-function-declaration]
653 | return offsetof(struct btrfs_root_item, generation_v2);
| ^~~~~~~~
./usr/include/linux/btrfs_tree.h:6:1: note: 'offsetof' is defined in header
'<stddef.h>'; did you forget to '#include <stddef.h>'?
5 | #include <linux/btrfs.h>
+++ |+#include <stddef.h>
6 | #include <linux/types.h>
> ./usr/include/linux/btrfs_tree.h:653:18: error: expected
expression before 'struct'
653 | return offsetof(struct
btrfs_root_item, generation_v2);
| ^~~~~~
cc1: some warnings being treated as errors
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org