* [intel-lts:5.10/preempt-rt 11000/20574] drivers/media/i2c/lt6911uxc.c:722:6: warning: variable 'hblank' set but not used
@ 2022-01-08 13:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-08 13:26 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 10388 bytes --]
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: lt6911uxc:add sensor driver
config: powerpc64-allyesconfig (https://download.01.org/0day-ci/archive/20220108/202201082121.jIigUHSI-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f3a344d2125fa37e59bae1b0874442c650a19607)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/367a342a05c249be8a0ea5e9d1e9dd5669a02abf
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
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=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/media/i2c/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
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 redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>: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 prior initialization of this subobject [-Winitializer-overrides]
.s_stream = lt6911uxc_set_stream,
^~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/lt6911uxc.c:1134:14: note: previous initialization is here
.s_stream = lt6911uxc_set_stream,
^~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/lt6911uxc.c:116:31: warning: unused variable 'default_timing' [-Wunused-variable]
static struct v4l2_dv_timings default_timing = V4L2_DV_BT_CEA_3840X2160P30;
^
>> drivers/media/i2c/lt6911uxc.c:238:32: warning: unused variable 'lt6911uxc_ev_source_change' [-Wunused-const-variable]
static const struct v4l2_event lt6911uxc_ev_source_change = {
^
drivers/media/i2c/lt6911uxc.c:468:12: warning: unused function 'lt6911uxc_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 'lt6911uxc_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 = v4l2_get_subdevdata(<6911uxc->sd);
721 struct v4l2_ctrl_handler *ctrl_hdlr;
> 722 s64 hblank;
723 struct v4l2_ctrl_config cfg = { 0 };
724 int ret;
725
726 ctrl_hdlr = <6911uxc->ctrl_handler;
727 ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
728 if (ret)
729 return ret;
730
731 ctrl_hdlr->lock = <6911uxc->mutex;
732 lt6911uxc->link_freq =
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=%d.\n",
740 ctrl_hdlr->error);
741 return ctrl_hdlr->error;
742 }
743 if (lt6911uxc->link_freq)
744 lt6911uxc->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
745
746 lt6911uxc->vblank = 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=%d.\n",
751 ctrl_hdlr->error);
752 return ctrl_hdlr->error;
753 }
754
755 lt6911uxc->analogue_gain = 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=%d.\n",
760 ctrl_hdlr->error);
761 return ctrl_hdlr->error;
762 }
763
764 lt6911uxc->digital_gain = 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=%d.\n",
769 ctrl_hdlr->error);
770 return ctrl_hdlr->error;
771 }
772
773 lt6911uxc->exposure = 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=%d.\n",
778 ctrl_hdlr->error);
779 return ctrl_hdlr->error;
780 }
781
782 cfg.ops = <6911uxc_ctrl_ops;
783 cfg.id = V4L2_CID_MIPI_LANES;
784 cfg.name = "V4L2_CID_MIPI_LANES";
785 cfg.type = V4L2_CTRL_TYPE_INTEGER;
786 cfg.max = 4; cfg.min = 2; cfg.step = 2; cfg.def = 4;
787 cfg.qmenu = 0; cfg.elem_size = 0;
788 lt6911uxc->mipi_lanes = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
789 if (ctrl_hdlr->error) {
790 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
791 ctrl_hdlr->error);
792 return ctrl_hdlr->error;
793 }
794
795 lt6911uxc_csi_port.def = lt6911uxc->platform_data->port;
796 lt6911uxc->csi_port =
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=%d.\n",
800 ctrl_hdlr->error);
801 return ctrl_hdlr->error;
802 }
803
804 lt6911uxc_i2c_bus.def = i2c_adapter_id(client->adapter);
805 lt6911uxc->i2c_bus =
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=%d.\n",
809 ctrl_hdlr->error);
810 return ctrl_hdlr->error;
811 }
812
813 lt6911uxc_i2c_id.def = client->addr;
814 lt6911uxc->i2c_id = 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=%d.\n",
818 ctrl_hdlr->error);
819 return ctrl_hdlr->error;
820 }
821
822 lt6911uxc_i2c_slave_address.def =
823 lt6911uxc->platform_data->i2c_slave_address;
824 lt6911uxc->i2c_slave_address = 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=%d.\n",
828 ctrl_hdlr->error);
829 return ctrl_hdlr->error;
830 }
831
832 lt6911uxc_fps.def = lt6911uxc->cur_mode->fps;
833 lt6911uxc->fps = v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_fps, NULL);
834 if (ctrl_hdlr->error) {
835 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
836 ctrl_hdlr->error);
837 return ctrl_hdlr->error;
838 }
839
840 lt6911uxc_frame_interval.def = 1000 / lt6911uxc->cur_mode->fps;
841 lt6911uxc->frame_interval = 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=%d.\n",
845 ctrl_hdlr->error);
846 return ctrl_hdlr->error;
847 }
848
849 lt6911uxc->pixel_rate = 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=%d.\n",
857 ctrl_hdlr->error);
858 return ctrl_hdlr->error;
859 }
860 if (lt6911uxc->pixel_rate)
861 lt6911uxc->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
862
863 hblank = 1;
864 lt6911uxc->hblank = 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=%d.\n",
869 ctrl_hdlr->error);
870 return ctrl_hdlr->error;
871 }
872 if (lt6911uxc->hblank)
873 lt6911uxc->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
874
875 /* custom v4l2 audio controls */
876 lt6911uxc->audio_sampling_rate_ctrl = 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=%d.\n",
880 ctrl_hdlr->error);
881 return ctrl_hdlr->error;
882 }
883 lt6911uxc->audio_present_ctrl = 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 = %d.\n",
887 ctrl_hdlr->error);
888 return ctrl_hdlr->error;
889 }
890
891 lt6911uxc->sd.ctrl_handler = 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-08 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-08 13:26 [intel-lts:5.10/preempt-rt 11000/20574] drivers/media/i2c/lt6911uxc.c:722:6: warning: variable 'hblank' set but not used kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.