Hi Bingbu, I love your patch! Yet something to improve: [auto build test ERROR on media-tree/master] [also build test ERROR on v5.15-rc5 next-20211013] [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/Bingbu-Cao/media-imx258-add-vblank-control-to-support-wide-frame-rate-range/20211015-150254 base: git://linuxtv.org/media_tree.git master config: alpha-randconfig-r014-20211014 (attached as .config) compiler: alpha-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/8775f7beb99fa27ed3d3f64b289d9727963ca0c3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Bingbu-Cao/media-imx258-add-vblank-control-to-support-wide-frame-rate-range/20211015-150254 git checkout 8775f7beb99fa27ed3d3f64b289d9727963ca0c3 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/media/i2c/ 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/media/i2c/imx258.c: In function 'imx258_set_ctrl': >> drivers/media/i2c/imx258.c:766:17: error: break statement not within loop or switch 766 | break; | ^~~~~ vim +766 drivers/media/i2c/imx258.c 751 752 static int imx258_set_ctrl(struct v4l2_ctrl *ctrl) 753 { 754 struct imx258 *imx258 = 755 container_of(ctrl->handler, struct imx258, ctrl_handler); 756 struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd); 757 s64 max; 758 int ret = 0; 759 760 if (ctrl->id == V4L2_CID_VBLANK) { 761 /* Update max exposure to meet expected vblanking */ 762 max = imx258->cur_mode->height + ctrl->val - 10; 763 __v4l2_ctrl_modify_range(imx258->exposure, 764 imx258->exposure->minimum, 765 max, imx258->exposure->step, max); > 766 break; 767 } 768 769 /* 770 * Applying V4L2 control value only happens 771 * when power is up for streaming 772 */ 773 if (pm_runtime_get_if_in_use(&client->dev) == 0) 774 return 0; 775 776 switch (ctrl->id) { 777 case V4L2_CID_ANALOGUE_GAIN: 778 ret = imx258_write_reg(imx258, IMX258_REG_ANALOG_GAIN, 779 IMX258_REG_VALUE_16BIT, 780 ctrl->val); 781 break; 782 case V4L2_CID_EXPOSURE: 783 ret = imx258_write_reg(imx258, IMX258_REG_EXPOSURE, 784 IMX258_REG_VALUE_16BIT, 785 ctrl->val); 786 break; 787 case V4L2_CID_VBLANK: 788 ret = imx258_write_reg(imx258, IMX258_REG_FLL, 2, 789 imx258->cur_mode->height + ctrl->val); 790 break; 791 case V4L2_CID_DIGITAL_GAIN: 792 ret = imx258_update_digital_gain(imx258, IMX258_REG_VALUE_16BIT, 793 ctrl->val); 794 break; 795 case V4L2_CID_TEST_PATTERN: 796 ret = imx258_write_reg(imx258, IMX258_REG_TEST_PATTERN, 797 IMX258_REG_VALUE_16BIT, 798 ctrl->val); 799 ret = imx258_write_reg(imx258, REG_MIRROR_FLIP_CONTROL, 800 IMX258_REG_VALUE_08BIT, 801 !ctrl->val ? REG_CONFIG_MIRROR_FLIP : 802 REG_CONFIG_FLIP_TEST_PATTERN); 803 break; 804 case V4L2_CID_WIDE_DYNAMIC_RANGE: 805 if (!ctrl->val) { 806 ret = imx258_write_reg(imx258, IMX258_REG_HDR, 807 IMX258_REG_VALUE_08BIT, 808 IMX258_HDR_RATIO_MIN); 809 } else { 810 ret = imx258_write_reg(imx258, IMX258_REG_HDR, 811 IMX258_REG_VALUE_08BIT, 812 IMX258_HDR_ON); 813 if (ret) 814 break; 815 ret = imx258_write_reg(imx258, IMX258_REG_HDR_RATIO, 816 IMX258_REG_VALUE_08BIT, 817 BIT(IMX258_HDR_RATIO_MAX)); 818 } 819 break; 820 default: 821 dev_info(&client->dev, 822 "ctrl(id:0x%x,val:0x%x) is not handled\n", 823 ctrl->id, ctrl->val); 824 ret = -EINVAL; 825 break; 826 } 827 828 pm_runtime_put(&client->dev); 829 830 return ret; 831 } 832 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip