All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: syafiqnizam25 <muhammadsyafiqnizamuddinx.binshafie@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, "sys_oak" <sys_oak@intel.com>
Subject: [intel-lts:6.18/linux 52/52] drivers/media/i2c/d4xx.c:4748:66: warning: '
Date: Fri, 23 Oct 2026 00:55:39 +0800	[thread overview]
Message-ID: <202610230037.KDsJDmWX-lkp@intel.com> (raw)

Hi syafiqnizam25,

FYI, the error/warning still remains.

tree:   https://github.com/intel/linux-intel-lts.git 6.18/linux
head:   6f60c9f6344f04a699abb69dd35bc294f6c306d8
commit: 38131e1f862524e81f78a96ae9daf7d22519ef25 [52/52] media: i2c: add d4xx
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20261023/202610230037.KDsJDmWX-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261023/202610230037.KDsJDmWX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610230037.KDsJDmWX-lkp@intel.com/

All warnings (new ones prefixed by >>):

    2718 |         struct ds5 *ds5 = container_of(subdev, struct ds5, mux.sd.subdev);
         |                     ^~~
   drivers/media/i2c/d4xx.c: In function 'ds5_get_fw_info':
   drivers/media/i2c/d4xx.c:3626:13: warning: unused variable 'retry' [-Wunused-variable]
    3626 |         int retry = 5;
         |             ^~~~~
   drivers/media/i2c/d4xx.c:3625:13: warning: unused variable 'ret' [-Wunused-variable]
    3625 |         int ret;
         |             ^~~
   drivers/media/i2c/d4xx.c: At top level:
   drivers/media/i2c/d4xx.c:4058:17: warning: initialized field overwritten [-Woverride-init]
    4058 |         .step = 1,
         |                 ^
   drivers/media/i2c/d4xx.c:4058:17: note: (near initialization for 'ds5_ctrl_erb.step')
   drivers/media/i2c/d4xx.c:4072:17: warning: initialized field overwritten [-Woverride-init]
    4072 |         .step = 1,
         |                 ^
   drivers/media/i2c/d4xx.c:4072:17: note: (near initialization for 'ds5_ctrl_ewb.step')
   drivers/media/i2c/d4xx.c:4086:17: warning: initialized field overwritten [-Woverride-init]
    4086 |         .step = 1,
         |                 ^
   drivers/media/i2c/d4xx.c:4086:17: note: (near initialization for 'ds5_ctrl_hwmc.step')
   drivers/media/i2c/d4xx.c: In function 'ds5_mux_init':
   drivers/media/i2c/d4xx.c:4459:14: warning: unused variable 'suffix' [-Wunused-variable]
    4459 |         char suffix[5];
         |              ^~~~~~
   drivers/media/i2c/d4xx.c: In function 'ds5_dfu_device_release':
   drivers/media/i2c/d4xx.c:4877:22: warning: unused variable 'retry' [-Wunused-variable]
    4877 |         int ret = 0, retry = 10;
         |                      ^~~~~
   drivers/media/i2c/d4xx.c: In function 'ds5_chrdev_init':
   drivers/media/i2c/d4xx.c:4917:14: warning: unused variable 'suffix' [-Wunused-variable]
    4917 |         char suffix[5];
         |              ^~~~~~
   drivers/media/i2c/d4xx.c: In function 'ds5_probe':
   drivers/media/i2c/d4xx.c:5256:40: warning: too many arguments for format [-Wformat-extra-args]
    5256 |                 dev_info(&client->dev, "D4XX recovery state\n", __func__);
         |                                        ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   drivers/media/i2c/d4xx.c:5256:17: note: in expansion of macro 'dev_info'
    5256 |                 dev_info(&client->dev, "D4XX recovery state\n", __func__);
         |                 ^~~~~~~~
   drivers/media/i2c/d4xx.c:5287:13: warning: unused variable 'err' [-Wunused-variable]
    5287 |         int err = sysfs_create_group(&ds5->client->dev.kobj, &ds5_attr_group);
         |             ^~~
   drivers/media/i2c/d4xx.c:5192:36: warning: unused variable 'reg_list' [-Wunused-variable]
    5192 |         const struct ds5_reg_list *reg_list;
         |                                    ^~~~~~~~
   drivers/media/i2c/d4xx.c:5190:29: warning: unused variable 'sd' [-Wunused-variable]
    5190 |         struct v4l2_subdev *sd;
         |                             ^~
   drivers/media/i2c/d4xx.c: At top level:
   drivers/media/i2c/d4xx.c:5150:13: warning: 'ds5_update_pad_format' defined but not used [-Wunused-function]
    5150 | static void ds5_update_pad_format(const struct ds5_resolution *resolutions,
         |             ^~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:2352:12: warning: 'ds5_mux_set_frame_interval' defined but not used [-Wunused-function]
    2352 | static int ds5_mux_set_frame_interval(struct v4l2_subdev *sd,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:2325:12: warning: 'ds5_mux_get_frame_interval' defined but not used [-Wunused-function]
    2325 | static int ds5_mux_get_frame_interval(struct v4l2_subdev *sd,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:2157:21: warning: 'ds5_mbus_code_to_mipi' defined but not used [-Wunused-function]
    2157 | static unsigned int ds5_mbus_code_to_mipi(u32 code)
         |                     ^~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:1915:12: warning: 'ds5_mux_enum_frame_interval' defined but not used [-Wunused-function]
    1915 | static int ds5_mux_enum_frame_interval(struct v4l2_subdev *sd,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:1855:12: warning: 'ds5_mux_enum_frame_size' defined but not used [-Wunused-function]
    1855 | static int ds5_mux_enum_frame_size(struct v4l2_subdev *sd,
         |            ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:1564:12: warning: 'ds5_mux_set_stream' defined but not used [-Wunused-function]
    1564 | static int ds5_mux_set_stream(struct v4l2_subdev *sd, int on)
         |            ^~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:668:36: warning: 'ds5_size_w10' defined but not used [-Wunused-const-variable=]
     668 | static const struct ds5_resolution ds5_size_w10 = {
         |                                    ^~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:497:34: warning: 'ds5_1280_720_30fps_reg_list' defined but not used [-Wunused-const-variable=]
     497 | static const struct ds5_reg_list ds5_1280_720_30fps_reg_list = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:492:34: warning: 'ds5_1920_1080_30fps_reg_list' defined but not used [-Wunused-const-variable=]
     492 | static const struct ds5_reg_list ds5_1920_1080_30fps_reg_list = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:487:34: warning: 'ds5_1920_1536_30fps_reg_list' defined but not used [-Wunused-const-variable=]
     487 | static const struct ds5_reg_list ds5_1920_1536_30fps_reg_list = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:482:34: warning: 'ds5_framesync_reg_list' defined but not used [-Wunused-const-variable=]
     482 | static const struct ds5_reg_list ds5_framesync_reg_list = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:477:34: warning: 'ds5_init_reg_list' defined but not used [-Wunused-const-variable=]
     477 | static const struct ds5_reg_list ds5_init_reg_list = {
         |                                  ^~~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c:448:18: warning: 'ds5_framerate_25' defined but not used [-Wunused-const-variable=]
     448 | static const u16 ds5_framerate_25 = 25;
         |                  ^~~~~~~~~~~~~~~~
   drivers/media/i2c/d4xx.c: In function 'ds5_dfu_device_read':
>> drivers/media/i2c/d4xx.c:4748:66: warning: '
      ' directive output may be truncated writing 1 byte into a region of size between 0 and 8 [-Wformat-truncation=]
    4748 |         snprintf(msg, sizeof(msg), "DFU info: \tver:  %d.%d.%d.%d\n",
         |                                                                  ^~
   drivers/media/i2c/d4xx.c:4748:9: note: 'snprintf' output between 26 and 34 bytes into a destination of size 32
    4748 |         snprintf(msg, sizeof(msg), "DFU info: \tver:  %d.%d.%d.%d\n",
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4749 |                         (fw_ver >> 8) & 0xff, fw_ver & 0xff,
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4750 |                         (fw_build >> 8) & 0xff, fw_build & 0xff);
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +4748 drivers/media/i2c/d4xx.c

9552247d675e3b2 Khai Wen, Ng 2026-01-06  4732  
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4733  /* When a process reads from our device, this gets called. */
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4734  static ssize_t ds5_dfu_device_read(struct file *flip,
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4735  		char __user *buffer, size_t len, loff_t *offset)
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4736  {
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4737  	struct ds5 *state = flip->private_data;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4738  	u16 fw_ver, fw_build;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4739  	char msg[32];
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4740  	int ret = 0;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4741  
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4742  	if (mutex_lock_interruptible(&state->mutex))
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4743  		return -ERESTARTSYS;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4744  
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4745  	ret |= ds5_get_fw_info(state, &fw_ver, &fw_build);
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4746  	if (ret < 0)
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4747  		goto e_dfu_read_failed;
9552247d675e3b2 Khai Wen, Ng 2026-01-06 @4748  	snprintf(msg, sizeof(msg), "DFU info: \tver:  %d.%d.%d.%d\n",
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4749  			(fw_ver >> 8) & 0xff, fw_ver & 0xff,
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4750  			(fw_build >> 8) & 0xff, fw_build & 0xff);
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4751  
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4752  	if (copy_to_user(buffer, msg, strlen(msg)))
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4753  		ret = -EFAULT;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4754  	else {
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4755  		state->dfu_dev.msg_write_once = ~state->dfu_dev.msg_write_once;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4756  		ret = strlen(msg) & state->dfu_dev.msg_write_once;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4757  	}
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4758  
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4759  e_dfu_read_failed:
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4760  	mutex_unlock(&state->mutex);
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4761  	return ret;
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4762  };
9552247d675e3b2 Khai Wen, Ng 2026-01-06  4763  

:::::: The code at line 4748 was first introduced by commit
:::::: 9552247d675e3b2f6a968db946f6531505b8047c media: i2c: Add D4XX support and D4XX driver

:::::: TO: Khai Wen, Ng <khai.wen.ng@intel.com>
:::::: CC: sys_oak <sys_oak@intel.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-10-22 16:56 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=202610230037.KDsJDmWX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=muhammadsyafiqnizamuddinx.binshafie@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sys_oak@intel.com \
    /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.