Hi Can, Thank you for the patch! Yet something to improve: [auto build test ERROR on scsi/for-next] [also build test ERROR on mkp-scsi/for-next v5.9 next-20201016] [cannot apply to target/for-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/Can-Guo/scsi-ufs-Fix-unexpected-values-get-from-ufshcd_read_desc_param/20201020-183121 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: openrisc-randconfig-r026-20201020 (attached as .config) compiler: or1k-linux-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/63b44a6aaa719b0d2eb2ed982279c9dc38fabb30 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Can-Guo/scsi-ufs-Fix-unexpected-values-get-from-ufshcd_read_desc_param/20201020-183121 git checkout 63b44a6aaa719b0d2eb2ed982279c9dc38fabb30 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_read_desc_param': drivers/scsi/ufs/ufshcd.c:3175:7: warning: unused variable 'is_kmalloc' [-Wunused-variable] 3175 | bool is_kmalloc = true; | ^~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3173:6: warning: unused variable 'desc_buf' [-Wunused-variable] 3173 | u8 *desc_buf; | ^~~~~~~~ drivers/scsi/ufs/ufshcd.c:3172:6: warning: unused variable 'ret' [-Wunused-variable] 3172 | int ret; | ^~~ In file included from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/async.h:12, from drivers/scsi/ufs/ufshcd.c:12: drivers/scsi/ufs/ufshcd.c: At top level: >> include/linux/compiler.h:56:23: error: expected identifier or '(' before 'if' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~ drivers/scsi/ufs/ufshcd.c:3195:2: note: in expansion of macro 'if' 3195 | if (param_offset != 0 || param_size < buff_len) { | ^~ >> include/linux/compiler.h:72:2: error: expected identifier or '(' before ')' token 72 | }) | ^ include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~~~~~~~~~~~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3195:2: note: in expansion of macro 'if' 3195 | if (param_offset != 0 || param_size < buff_len) { | ^~ drivers/scsi/ufs/ufshcd.c:3199:4: error: expected identifier or '(' before 'else' 3199 | } else { | ^~~~ drivers/scsi/ufs/ufshcd.c:3205:2: warning: data definition has no type or storage class 3205 | ret = ufshcd_query_descriptor_retry(hba, UPIU_QUERY_OPCODE_READ_DESC, | ^~~ drivers/scsi/ufs/ufshcd.c:3205:2: error: type defaults to 'int' in declaration of 'ret' [-Werror=implicit-int] drivers/scsi/ufs/ufshcd.c:3205:38: error: 'hba' undeclared here (not in a function) 3205 | ret = ufshcd_query_descriptor_retry(hba, UPIU_QUERY_OPCODE_READ_DESC, | ^~~ drivers/scsi/ufs/ufshcd.c:3206:6: error: 'desc_id' undeclared here (not in a function); did you mean 'desc_idn'? 3206 | desc_id, desc_index, 0, | ^~~~~~~ | desc_idn drivers/scsi/ufs/ufshcd.c:3206:15: error: 'desc_index' undeclared here (not in a function); did you mean 'desc_idn'? 3206 | desc_id, desc_index, 0, | ^~~~~~~~~~ | desc_idn drivers/scsi/ufs/ufshcd.c:3207:6: error: 'desc_buf' undeclared here (not in a function) 3207 | desc_buf, &buff_len); | ^~~~~~~~ drivers/scsi/ufs/ufshcd.c:3207:17: error: 'buff_len' undeclared here (not in a function) 3207 | desc_buf, &buff_len); | ^~~~~~~~ In file included from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/async.h:12, from drivers/scsi/ufs/ufshcd.c:12: >> include/linux/compiler.h:56:23: error: expected identifier or '(' before 'if' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~ drivers/scsi/ufs/ufshcd.c:3209:2: note: in expansion of macro 'if' 3209 | if (ret) { | ^~ >> include/linux/compiler.h:72:2: error: expected identifier or '(' before ')' token 72 | }) | ^ include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~~~~~~~~~~~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3209:2: note: in expansion of macro 'if' 3209 | if (ret) { | ^~ >> include/linux/compiler.h:56:23: error: expected identifier or '(' before 'if' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~ drivers/scsi/ufs/ufshcd.c:3216:2: note: in expansion of macro 'if' 3216 | if (desc_buf[QUERY_DESC_DESC_TYPE_OFFSET] != desc_id) { | ^~ >> include/linux/compiler.h:72:2: error: expected identifier or '(' before ')' token 72 | }) | ^ include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~~~~~~~~~~~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3216:2: note: in expansion of macro 'if' 3216 | if (desc_buf[QUERY_DESC_DESC_TYPE_OFFSET] != desc_id) { | ^~ drivers/scsi/ufs/ufshcd.c:3224:2: warning: data definition has no type or storage class 3224 | buff_len = desc_buf[QUERY_DESC_LENGTH_OFFSET]; | ^~~~~~~~ drivers/scsi/ufs/ufshcd.c:3224:2: error: type defaults to 'int' in declaration of 'buff_len' [-Werror=implicit-int] drivers/scsi/ufs/ufshcd.c:3225:2: warning: data definition has no type or storage class 3225 | ufshcd_update_desc_length(hba, desc_id, desc_index, buff_len); | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3225:2: error: type defaults to 'int' in declaration of 'ufshcd_update_desc_length' [-Werror=implicit-int] drivers/scsi/ufs/ufshcd.c:3225:2: warning: parameter names (without types) in function declaration drivers/scsi/ufs/ufshcd.c:3225:2: error: conflicting types for 'ufshcd_update_desc_length' drivers/scsi/ufs/ufshcd.c:3140:13: note: previous definition of 'ufshcd_update_desc_length' was here 3140 | static void ufshcd_update_desc_length(struct ufs_hba *hba, | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/async.h:12, from drivers/scsi/ufs/ufshcd.c:12: >> include/linux/compiler.h:56:23: error: expected identifier or '(' before 'if' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~ drivers/scsi/ufs/ufshcd.c:3227:2: note: in expansion of macro 'if' 3227 | if (is_kmalloc) { | ^~ >> include/linux/compiler.h:72:2: error: expected identifier or '(' before ')' token 72 | }) | ^ include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~~~~~~~~~~~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3227:2: note: in expansion of macro 'if' 3227 | if (is_kmalloc) { | ^~ drivers/scsi/ufs/ufshcd.c:3233:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 3233 | out: | ^ In file included from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/async.h:12, from drivers/scsi/ufs/ufshcd.c:12: >> include/linux/compiler.h:72:2: error: expected identifier or '(' before ')' token 72 | }) | ^ include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~~~~~~~~~~~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:3234:2: note: in expansion of macro 'if' 3234 | if (is_kmalloc) | ^~ drivers/scsi/ufs/ufshcd.c:3236:2: error: expected identifier or '(' before 'return' 3236 | return ret; | ^~~~~~ drivers/scsi/ufs/ufshcd.c:3237:1: error: expected identifier or '(' before '}' token 3237 | } | ^ drivers/scsi/ufs/ufshcd.c:3140:13: warning: 'ufshcd_update_desc_length' defined but not used [-Wunused-function] 3140 | static void ufshcd_update_desc_length(struct ufs_hba *hba, | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +56 include/linux/compiler.h 2bcd521a684cc94 Steven Rostedt 2008-11-21 50 2bcd521a684cc94 Steven Rostedt 2008-11-21 51 #ifdef CONFIG_PROFILE_ALL_BRANCHES 2bcd521a684cc94 Steven Rostedt 2008-11-21 52 /* 2bcd521a684cc94 Steven Rostedt 2008-11-21 53 * "Define 'is'", Bill Clinton 2bcd521a684cc94 Steven Rostedt 2008-11-21 54 * "Define 'if'", Steven Rostedt 2bcd521a684cc94 Steven Rostedt 2008-11-21 55 */ a15fd609ad53a63 Linus Torvalds 2019-03-20 @56 #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) a15fd609ad53a63 Linus Torvalds 2019-03-20 57 a15fd609ad53a63 Linus Torvalds 2019-03-20 58 #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) a15fd609ad53a63 Linus Torvalds 2019-03-20 59 a15fd609ad53a63 Linus Torvalds 2019-03-20 60 #define __trace_if_value(cond) ({ \ 2bcd521a684cc94 Steven Rostedt 2008-11-21 61 static struct ftrace_branch_data \ e04462fb82f8dd9 Miguel Ojeda 2018-09-03 62 __aligned(4) \ bfafddd8de426d8 Nick Desaulniers 2019-08-28 63 __section(_ftrace_branch) \ a15fd609ad53a63 Linus Torvalds 2019-03-20 64 __if_trace = { \ 2bcd521a684cc94 Steven Rostedt 2008-11-21 65 .func = __func__, \ 2bcd521a684cc94 Steven Rostedt 2008-11-21 66 .file = __FILE__, \ 2bcd521a684cc94 Steven Rostedt 2008-11-21 67 .line = __LINE__, \ 2bcd521a684cc94 Steven Rostedt 2008-11-21 68 }; \ a15fd609ad53a63 Linus Torvalds 2019-03-20 69 (cond) ? \ a15fd609ad53a63 Linus Torvalds 2019-03-20 70 (__if_trace.miss_hit[1]++,1) : \ a15fd609ad53a63 Linus Torvalds 2019-03-20 71 (__if_trace.miss_hit[0]++,0); \ a15fd609ad53a63 Linus Torvalds 2019-03-20 @72 }) a15fd609ad53a63 Linus Torvalds 2019-03-20 73 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip