From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7472312861937405755==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [intel-lts:5.10/preempt-rt 11000/20574] drivers/media/i2c/lt6911uxc.c:722:6: warning: variable 'hblank' set but not used Date: Sat, 08 Jan 2022 21:26:29 +0800 Message-ID: <202201082121.jIigUHSI-lkp@intel.com> List-Id: --===============7472312861937405755== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Ng, FYI, the error/warning still remains. tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt head: c7241f7c2813b8e7f1831cd1dd178132c58caeb5 commit: 367a342a05c249be8a0ea5e9d1e9dd5669a02abf [11000/20574] media: lt691= 1uxc:add sensor driver config: powerpc64-allyesconfig (https://download.01.org/0day-ci/archive/202= 20108/202201082121.jIigUHSI-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f3a344= d2125fa37e59bae1b0874442c650a19607) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc64-linux-gnu # https://github.com/intel/linux-intel-lts/commit/367a342a05c249be8= a0ea5e9d1e9dd5669a02abf git remote add intel-lts https://github.com/intel/linux-intel-lts.g= it git fetch --no-tags intel-lts 5.10/preempt-rt git checkout 367a342a05c249be8a0ea5e9d1e9dd5669a02abf # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dpowerpc SHELL=3D/bin/bash drivers/media/i2c/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/media/i2c/lt6911uxc.c:4: In file included from arch/powerpc/include/asm/unaligned.h:10: In file included from include/linux/unaligned/access_ok.h:5: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redef= ined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : := :"memory") ^ :311:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/media/i2c/lt6911uxc.c:722:6: warning: variable 'hblank' set but = not used [-Wunused-but-set-variable] s64 hblank; ^ drivers/media/i2c/lt6911uxc.c:1140:14: warning: initializer overrides pr= ior initialization of this subobject [-Winitializer-overrides] .s_stream =3D lt6911uxc_set_stream, ^~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/lt6911uxc.c:1134:14: note: previous initialization is = here .s_stream =3D lt6911uxc_set_stream, ^~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/lt6911uxc.c:116:31: warning: unused variable 'default_= timing' [-Wunused-variable] static struct v4l2_dv_timings default_timing =3D V4L2_DV_BT_CEA_3840X216= 0P30; ^ >> drivers/media/i2c/lt6911uxc.c:238:32: warning: unused variable 'lt6911ux= c_ev_source_change' [-Wunused-const-variable] static const struct v4l2_event lt6911uxc_ev_source_change =3D { ^ drivers/media/i2c/lt6911uxc.c:468:12: warning: unused function 'lt6911ux= c_s_dv_timings' [-Wunused-function] static int lt6911uxc_s_dv_timings(struct v4l2_subdev *sd, ^ drivers/media/i2c/lt6911uxc.c:499:12: warning: unused function 'lt6911ux= c_query_dv_timings' [-Wunused-function] static int lt6911uxc_query_dv_timings(struct v4l2_subdev *sd, ^ 7 warnings generated. vim +/hblank +722 drivers/media/i2c/lt6911uxc.c 717 = 718 static int lt6911uxc_init_controls(struct lt6911uxc_state *lt6911uxc) 719 { 720 struct i2c_client *client =3D v4l2_get_subdevdata(<6911uxc->sd); 721 struct v4l2_ctrl_handler *ctrl_hdlr; > 722 s64 hblank; 723 struct v4l2_ctrl_config cfg =3D { 0 }; 724 int ret; 725 = 726 ctrl_hdlr =3D <6911uxc->ctrl_handler; 727 ret =3D v4l2_ctrl_handler_init(ctrl_hdlr, 8); 728 if (ret) 729 return ret; 730 = 731 ctrl_hdlr->lock =3D <6911uxc->mutex; 732 lt6911uxc->link_freq =3D 733 v4l2_ctrl_new_int_menu(ctrl_hdlr, 734 <6911uxc_ctrl_ops, 735 V4L2_CID_LINK_FREQ, 736 sizeof(lt6911uxc->cur_mode->pixel_clk), 737 0, (s64 *)<6911uxc->cur_mode->pixel_clk); 738 if (ctrl_hdlr->error) { 739 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 740 ctrl_hdlr->error); 741 return ctrl_hdlr->error; 742 } 743 if (lt6911uxc->link_freq) 744 lt6911uxc->link_freq->flags |=3D V4L2_CTRL_FLAG_READ_ONLY; 745 = 746 lt6911uxc->vblank =3D v4l2_ctrl_new_std(ctrl_hdlr, 747 <6911uxc_ctrl_ops, 748 V4L2_CID_VBLANK, 0, 1, 1, 1); 749 if (ctrl_hdlr->error) { 750 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 751 ctrl_hdlr->error); 752 return ctrl_hdlr->error; 753 } 754 = 755 lt6911uxc->analogue_gain =3D v4l2_ctrl_new_std(ctrl_hdlr, 756 <6911uxc_ctrl_ops, 757 V4L2_CID_ANALOGUE_GAIN, 0, 1, 1, 1); 758 if (ctrl_hdlr->error) { 759 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 760 ctrl_hdlr->error); 761 return ctrl_hdlr->error; 762 } 763 = 764 lt6911uxc->digital_gain =3D v4l2_ctrl_new_std(ctrl_hdlr, 765 <6911uxc_ctrl_ops, 766 V4L2_CID_DIGITAL_GAIN, 0, 1, 1, 1); 767 if (ctrl_hdlr->error) { 768 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 769 ctrl_hdlr->error); 770 return ctrl_hdlr->error; 771 } 772 = 773 lt6911uxc->exposure =3D v4l2_ctrl_new_std(ctrl_hdlr, 774 <6911uxc_ctrl_ops, 775 V4L2_CID_EXPOSURE, 0, 1, 1, 1); 776 if (ctrl_hdlr->error) { 777 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 778 ctrl_hdlr->error); 779 return ctrl_hdlr->error; 780 } 781 = 782 cfg.ops =3D <6911uxc_ctrl_ops; 783 cfg.id =3D V4L2_CID_MIPI_LANES; 784 cfg.name =3D "V4L2_CID_MIPI_LANES"; 785 cfg.type =3D V4L2_CTRL_TYPE_INTEGER; 786 cfg.max =3D 4; cfg.min =3D 2; cfg.step =3D 2; cfg.def =3D 4; 787 cfg.qmenu =3D 0; cfg.elem_size =3D 0; 788 lt6911uxc->mipi_lanes =3D v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NUL= L); 789 if (ctrl_hdlr->error) { 790 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 791 ctrl_hdlr->error); 792 return ctrl_hdlr->error; 793 } 794 = 795 lt6911uxc_csi_port.def =3D lt6911uxc->platform_data->port; 796 lt6911uxc->csi_port =3D 797 v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_csi_port, NULL); 798 if (ctrl_hdlr->error) { 799 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 800 ctrl_hdlr->error); 801 return ctrl_hdlr->error; 802 } 803 = 804 lt6911uxc_i2c_bus.def =3D i2c_adapter_id(client->adapter); 805 lt6911uxc->i2c_bus =3D 806 v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_i2c_bus, NULL); 807 if (ctrl_hdlr->error) { 808 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 809 ctrl_hdlr->error); 810 return ctrl_hdlr->error; 811 } 812 = 813 lt6911uxc_i2c_id.def =3D client->addr; 814 lt6911uxc->i2c_id =3D v4l2_ctrl_new_custom(ctrl_hdlr, 815 <6911uxc_i2c_id, NULL); 816 if (ctrl_hdlr->error) { 817 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 818 ctrl_hdlr->error); 819 return ctrl_hdlr->error; 820 } 821 = 822 lt6911uxc_i2c_slave_address.def =3D 823 lt6911uxc->platform_data->i2c_slave_address; 824 lt6911uxc->i2c_slave_address =3D v4l2_ctrl_new_custom(ctrl_hdlr, 825 <6911uxc_i2c_slave_address, NULL); 826 if (ctrl_hdlr->error) { 827 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 828 ctrl_hdlr->error); 829 return ctrl_hdlr->error; 830 } 831 = 832 lt6911uxc_fps.def =3D lt6911uxc->cur_mode->fps; 833 lt6911uxc->fps =3D v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_fps, = NULL); 834 if (ctrl_hdlr->error) { 835 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 836 ctrl_hdlr->error); 837 return ctrl_hdlr->error; 838 } 839 = 840 lt6911uxc_frame_interval.def =3D 1000 / lt6911uxc->cur_mode->fps; 841 lt6911uxc->frame_interval =3D v4l2_ctrl_new_custom(ctrl_hdlr, 842 <6911uxc_frame_interval, NULL); 843 if (ctrl_hdlr->error) { 844 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 845 ctrl_hdlr->error); 846 return ctrl_hdlr->error; 847 } 848 = 849 lt6911uxc->pixel_rate =3D v4l2_ctrl_new_std(ctrl_hdlr, 850 <6911uxc_ctrl_ops, 851 V4L2_CID_PIXEL_RATE, 852 get_pixel_rate(lt6911uxc), 853 get_pixel_rate(lt6911uxc), 1, 854 get_pixel_rate(lt6911uxc)); 855 if (ctrl_hdlr->error) { 856 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 857 ctrl_hdlr->error); 858 return ctrl_hdlr->error; 859 } 860 if (lt6911uxc->pixel_rate) 861 lt6911uxc->pixel_rate->flags |=3D V4L2_CTRL_FLAG_READ_ONLY; 862 = 863 hblank =3D 1; 864 lt6911uxc->hblank =3D v4l2_ctrl_new_std(ctrl_hdlr, 865 <6911uxc_ctrl_ops, 866 V4L2_CID_HBLANK, 0, 1, 1, 1); 867 if (ctrl_hdlr->error) { 868 dev_dbg(&client->dev, "Set ctrl_hdlr, err=3D%d.\n", 869 ctrl_hdlr->error); 870 return ctrl_hdlr->error; 871 } 872 if (lt6911uxc->hblank) 873 lt6911uxc->hblank->flags |=3D V4L2_CTRL_FLAG_READ_ONLY; 874 = 875 /* custom v4l2 audio controls */ 876 lt6911uxc->audio_sampling_rate_ctrl =3D v4l2_ctrl_new_custom( 877 ctrl_hdlr, <6911uxc_ctrl_audio_sampling_rate, NULL); 878 if (ctrl_hdlr->error) { 879 dev_dbg(&client->dev, "Set audio sampling rate ctrl, err=3D%d.\n", 880 ctrl_hdlr->error); 881 return ctrl_hdlr->error; 882 } 883 lt6911uxc->audio_present_ctrl =3D v4l2_ctrl_new_custom(ctrl_hdlr, 884 <6911uxc_ctrl_audio_present, NULL); 885 if (ctrl_hdlr->error) { 886 dev_dbg(&client->dev, "Set audio present ctrl, error =3D %d.\n", 887 ctrl_hdlr->error); 888 return ctrl_hdlr->error; 889 } 890 = 891 lt6911uxc->sd.ctrl_handler =3D ctrl_hdlr; 892 return 0; 893 } 894 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7472312861937405755==--