From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [intel-lts:5.10/preempt-rt 11000/17188] drivers/media/i2c/lt6911uxc.c:722:6: warning: variable 'hblank' set but not used
Date: Thu, 30 Sep 2021 16:04:38 +0800 [thread overview]
Message-ID: <202109301635.GShUrRIK-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 15679 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 3ab3139402e6adc34f10481f1c1c60459bcd0a7e
commit: 367a342a05c249be8a0ea5e9d1e9dd5669a02abf [11000/17188] media: lt6911uxc:add sensor driver
config: powerpc-randconfig-r025-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-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 attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
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 >>):
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/media/i2c/lt6911uxc.c:10:
In file included from include/linux/gpio.h:62:
In file included from include/asm-generic/gpio.h:11:
In file included from include/linux/gpio/driver.h:7:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:217:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/media/i2c/lt6911uxc.c:10:
In file included from include/linux/gpio.h:62:
In file included from include/asm-generic/gpio.h:11:
In file included from include/linux/gpio/driver.h:7:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:219:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/media/i2c/lt6911uxc.c:10:
In file included from include/linux/gpio.h:62:
In file included from include/asm-generic/gpio.h:11:
In file included from include/linux/gpio/driver.h:7:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:221:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/media/i2c/lt6911uxc.c:10:
In file included from include/linux/gpio.h:62:
In file included from include/asm-generic/gpio.h:11:
In file included from include/linux/gpio/driver.h:7:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:223:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/media/i2c/lt6911uxc.c:10:
In file included from include/linux/gpio.h:62:
In file included from include/asm-generic/gpio.h:11:
In file included from include/linux/gpio/driver.h:7:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:225:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> 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,
^
13 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
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32901 bytes --]
reply other threads:[~2021-09-30 8:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109301635.GShUrRIK-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.