Hi Dafna, I love your patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Dafna-Hirschfeld/staging-media-wave5-add-wave5-codec-driver/20210916-002552 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 5e57c668dc097c6c27c973504706edec53f79281 config: csky-randconfig-r033-20210916 (attached as .config) compiler: csky-linux-gcc (GCC) 11.2.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/99e6d1e51b84739f614c6ae5a772b04671bad9ba git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Dafna-Hirschfeld/staging-media-wave5-add-wave5-codec-driver/20210916-002552 git checkout 99e6d1e51b84739f614c6ae5a772b04671bad9ba # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=csky If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/kfifo.h:39, from drivers/staging/media/wave5/vpuapi/vpuapi.h:11, from drivers/staging/media/wave5/vpuapi/vpuapi.c:9: arch/csky/include/asm/bitops.h:77: warning: "__clear_bit" redefined 77 | #define __clear_bit(nr, vaddr) clear_bit(nr, vaddr) | In file included from arch/csky/include/asm/bitops.h:76, from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/kfifo.h:39, from drivers/staging/media/wave5/vpuapi/vpuapi.h:11, from drivers/staging/media/wave5/vpuapi/vpuapi.c:9: include/asm-generic/bitops/non-atomic.h:34: note: this is the location of the previous definition 34 | #define __clear_bit arch___clear_bit | drivers/staging/media/wave5/vpuapi/vpuapi.c: In function 'vpu_dec_get_bitstream_buffer': >> drivers/staging/media/wave5/vpuapi/vpuapi.c:323:26: warning: variable 'p_attr' set but not used [-Wunused-but-set-variable] 323 | struct vpu_attr *p_attr; | ^~~~~~ drivers/staging/media/wave5/vpuapi/vpuapi.c: In function 'vpu_enc_register_frame_buffer': >> drivers/staging/media/wave5/vpuapi/vpuapi.c:824:32: warning: variable 'open_param' set but not used [-Wunused-but-set-variable] 824 | struct enc_open_param *open_param; | ^~~~~~~~~~ -- In file included from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/linux/preempt.h:11, from include/linux/spinlock.h:55, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from drivers/staging/media/wave5/vdi/vdi.h:13, from drivers/staging/media/wave5/vdi/vdi.c:8: arch/csky/include/asm/bitops.h:77: warning: "__clear_bit" redefined 77 | #define __clear_bit(nr, vaddr) clear_bit(nr, vaddr) | In file included from arch/csky/include/asm/bitops.h:76, from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/linux/preempt.h:11, from include/linux/spinlock.h:55, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from drivers/staging/media/wave5/vdi/vdi.h:13, from drivers/staging/media/wave5/vdi/vdi.c:8: include/asm-generic/bitops/non-atomic.h:34: note: this is the location of the previous definition 34 | #define __clear_bit arch___clear_bit | >> drivers/staging/media/wave5/vdi/vdi.c:239:6: warning: no previous prototype for 'byte_swap' [-Wmissing-prototypes] 239 | void byte_swap(unsigned char *data, int len) | ^~~~~~~~~ >> drivers/staging/media/wave5/vdi/vdi.c:251:6: warning: no previous prototype for 'word_swap' [-Wmissing-prototypes] 251 | void word_swap(unsigned char *data, int len) | ^~~~~~~~~ >> drivers/staging/media/wave5/vdi/vdi.c:264:6: warning: no previous prototype for 'dword_swap' [-Wmissing-prototypes] 264 | void dword_swap(unsigned char *data, int len) | ^~~~~~~~~~ >> drivers/staging/media/wave5/vdi/vdi.c:277:6: warning: no previous prototype for 'lword_swap' [-Wmissing-prototypes] 277 | void lword_swap(unsigned char *data, int len) | ^~~~~~~~~~ -- In file included from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/media/v4l2-ctrls.h:11, from drivers/staging/media/wave5/v4l2/vpu.h:10, from drivers/staging/media/wave5/v4l2/vpu_enc.h:10, from drivers/staging/media/wave5/v4l2/vpu_enc.c:7: arch/csky/include/asm/bitops.h:77: warning: "__clear_bit" redefined 77 | #define __clear_bit(nr, vaddr) clear_bit(nr, vaddr) | In file included from arch/csky/include/asm/bitops.h:76, from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/media/v4l2-ctrls.h:11, from drivers/staging/media/wave5/v4l2/vpu.h:10, from drivers/staging/media/wave5/v4l2/vpu_enc.h:10, from drivers/staging/media/wave5/v4l2/vpu_enc.c:7: include/asm-generic/bitops/non-atomic.h:34: note: this is the location of the previous definition 34 | #define __clear_bit arch___clear_bit | drivers/staging/media/wave5/v4l2/vpu_enc.c: In function 'to_vpu_codstd': >> drivers/staging/media/wave5/v4l2/vpu_enc.c:84:24: warning: implicit conversion from 'enum wave_std' to 'enum cod_std' [-Wenum-conversion] 84 | return W_AVC_ENC; | ^~~~~~~~~ drivers/staging/media/wave5/v4l2/vpu_enc.c:86:24: warning: implicit conversion from 'enum wave_std' to 'enum cod_std' [-Wenum-conversion] 86 | return W_HEVC_ENC; | ^~~~~~~~~~ drivers/staging/media/wave5/v4l2/vpu_enc.c:88:24: warning: implicit conversion from 'enum wave_std' to 'enum cod_std' [-Wenum-conversion] 88 | return STD_UNKNOWN; | ^~~~~~~~~~~ drivers/staging/media/wave5/v4l2/vpu_enc.c: In function 'vpu_enc_queue_setup': >> drivers/staging/media/wave5/v4l2/vpu_enc.c:1150:27: warning: implicit conversion from 'enum cod_std' to 'enum wave_std' [-Wenum-conversion] 1150 | inst->std = to_vpu_codstd(inst->dst_fmt.pixelformat); | ^ vim +/open_param +824 drivers/staging/media/wave5/vpuapi/vpuapi.c 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 818 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 819 enum ret_code vpu_enc_register_frame_buffer(struct vpu_instance *inst, int num, int stride, 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 820 int height, enum tiled_map_type map_type) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 821 { 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 822 struct enc_info *p_enc_info; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 823 enum ret_code ret; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 @824 struct enc_open_param *open_param; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 825 struct frame_buffer *fb; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 826 struct vpu_device *vpu_dev = inst->dev; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 827 u32 size_luma, size_chroma; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 828 int i; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 829 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 830 p_enc_info = &inst->codec_info->enc_info; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 831 open_param = &p_enc_info->open_param; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 832 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 833 if (p_enc_info->stride) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 834 return RETCODE_CALLED_BEFORE; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 835 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 836 if (!p_enc_info->initial_info_obtained) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 837 return RETCODE_WRONG_CALL_SEQUENCE; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 838 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 839 if (num < p_enc_info->initial_info.min_frame_buffer_count) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 840 return RETCODE_INSUFFICIENT_FRAME_BUFFERS; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 841 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 842 if (stride == 0 || (stride % 8 != 0) || stride < 0) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 843 return RETCODE_INVALID_STRIDE; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 844 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 845 if (height == 0 || height < 0) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 846 return RETCODE_INVALID_PARAM; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 847 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 848 if (mutex_lock_interruptible(&vpu_dev->hw_lock)) 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 849 return RETCODE_FAILURE; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 850 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 851 p_enc_info->num_frame_buffers = num; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 852 p_enc_info->stride = stride; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 853 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 854 fb = inst->frame_buf; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 855 size_luma = stride * height; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 856 size_chroma = ALIGN(stride / 2, 16) * height; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 857 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 858 for (i = 0; i < num; i++) { 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 859 if (fb[i].update_fb_info) { 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 860 fb[i].update_fb_info = FALSE; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 861 fb[i].stride = stride; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 862 fb[i].height = height; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 863 fb[i].map_type = COMPRESSED_FRAME_MAP; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 864 fb[i].cbcr_interleave = true; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 865 fb[i].endian = VDI_128BIT_LITTLE_ENDIAN; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 866 fb[i].buf_y_size = size_luma; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 867 fb[i].buf_cb = fb[i].buf_y + size_luma; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 868 fb[i].buf_cb_size = size_chroma; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 869 fb[i].buf_cr_size = 0; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 870 } 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 871 } 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 872 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 873 ret = wave5_vpu_enc_register_framebuffer(inst->dev->dev, inst, &fb[0], 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 874 COMPRESSED_FRAME_MAP, p_enc_info->num_frame_buffers); 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 875 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 876 mutex_unlock(&vpu_dev->hw_lock); 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 877 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 878 return ret; 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 879 } 77ec4cac6e8198 Dafna Hirschfeld 2021-09-15 880 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip