Hi Alan, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Alan-Maguire/bpf-libbpf-share-BTF-data-show-functionality/20210112-013917 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: arm-randconfig-r014-20210111 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/04cba32126a479b2b87ff64eaf1e266574221cad git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Alan-Maguire/bpf-libbpf-share-BTF-data-show-functionality/20210112-013917 git checkout 04cba32126a479b2b87ff64eaf1e266574221cad # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): kernel/bpf/btf_show_common.c: In function 'btf_seq_show': >> kernel/bpf/btf_show_common.c:1136:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 1136 | seq_vprintf((struct seq_file *)show->target, fmt, args); | ^~~~~~~~ kernel/bpf/btf_show_common.c: In function 'btf_snprintf_show': >> kernel/bpf/btf_show_common.c:1175:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 1175 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args); | ^~~ vim +1136 kernel/bpf/btf_show_common.c 1130 1131 /* seq_file show is for kernel only. */ 1132 #ifdef __KERNEL__ 1133 static void btf_seq_show(struct btf_show *show, const char *fmt, 1134 va_list args) 1135 { > 1136 seq_vprintf((struct seq_file *)show->target, fmt, args); 1137 } 1138 1139 int btf_type_seq_show_flags(const struct btf *btf, u32 type_id, 1140 void *obj, struct seq_file *m, u64 flags) 1141 { 1142 struct btf_show sseq; 1143 1144 sseq.target = m; 1145 sseq.showfn = btf_seq_show; 1146 sseq.flags = flags; 1147 1148 btf_type_show(btf, type_id, obj, &sseq); 1149 1150 return sseq.state.status; 1151 } 1152 1153 void btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj, 1154 struct seq_file *m) 1155 { 1156 (void) btf_type_seq_show_flags(btf, type_id, obj, m, 1157 BTF_SHOW_NONAME | BTF_SHOW_COMPACT | 1158 BTF_SHOW_ZERO | BTF_SHOW_UNSAFE); 1159 } 1160 1161 #endif /* __KERNEL__ */ 1162 1163 struct btf_show_snprintf { 1164 struct btf_show show; 1165 int len_left; /* space left in string */ 1166 int len; /* length we would have written */ 1167 }; 1168 1169 static void btf_snprintf_show(struct btf_show *show, const char *fmt, 1170 va_list args) 1171 { 1172 struct btf_show_snprintf *ssnprintf = (struct btf_show_snprintf *)show; 1173 int len; 1174 > 1175 len = vsnprintf(show->target, ssnprintf->len_left, fmt, args); 1176 1177 if (len < 0) { 1178 ssnprintf->len_left = 0; 1179 ssnprintf->len = len; 1180 } else if (len > ssnprintf->len_left) { 1181 /* no space, drive on to get length we would have written */ 1182 ssnprintf->len_left = 0; 1183 ssnprintf->len += len; 1184 } else { 1185 ssnprintf->len_left -= len; 1186 ssnprintf->len += len; 1187 show->target += len; 1188 } 1189 } 1190 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org