linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size
@ 2020-08-22  8:07 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-08-22  8:07 UTC (permalink / raw)
  To: Jacopo Mondi
  Cc: kbuild-all, linux-kernel, Greg Kroah-Hartman, Nicolas Saenz Julienne

[-- Attachment #1: Type: text/plain, Size: 8593 bytes --]

Hi Jacopo,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f873db9acd3c92d4741bc3676c9eb511b2f9a6f6
commit: b18ee53ad297264a79cf4ea566663f20786b6455 staging: bcm2835: Break MMAL support out from camera
date:   8 weeks ago
config: ia64-randconfig-r035-20200822 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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
        git checkout b18ee53ad297264a79cf4ea566663f20786b6455
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

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 >>):

   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c: In function 'create_component':
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size [-Wstringop-truncation]
     932 |  strncpy(m.u.component_create.name, name,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     933 |   sizeof(m.u.component_create.name));
         |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b18ee53ad297264a79cf4ea566663f20786b6455
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b18ee53ad297264a79cf4ea566663f20786b6455
vim +/strncpy +932 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  918  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  919  /* create comonent on vc */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  920  static int create_component(struct vchiq_mmal_instance *instance,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  921  			    struct vchiq_mmal_component *component,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  922  			    const char *name)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  923  {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  924  	int ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  925  	struct mmal_msg m;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  926  	struct mmal_msg *rmsg;
9d4d3ac473912a drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c Dominic Braun 2018-12-14  927  	struct vchi_held_msg rmsg_handle;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  928  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  929  	/* build component create message */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  930  	m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE;
4fe08093094e5f drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c Michael Zoran 2017-03-09  931  	m.u.component_create.client_component = (u32)(unsigned long)component;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27 @932  	strncpy(m.u.component_create.name, name,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  933  		sizeof(m.u.component_create.name));
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  934  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  935  	ret = send_synchronous_mmal_msg(instance, &m,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  936  					sizeof(m.u.component_create),
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  937  					&rmsg, &rmsg_handle);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  938  	if (ret)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  939  		return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  940  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  941  	if (rmsg->h.type != m.h.type) {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  942  		/* got an unexpected message type in reply */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  943  		ret = -EINVAL;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  944  		goto release_msg;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  945  	}
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  946  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  947  	ret = -rmsg->u.component_create_reply.status;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  948  	if (ret != MMAL_MSG_STATUS_SUCCESS)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  949  		goto release_msg;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  950  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  951  	/* a valid component response received */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  952  	component->handle = rmsg->u.component_create_reply.component_handle;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  953  	component->inputs = rmsg->u.component_create_reply.input_num;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  954  	component->outputs = rmsg->u.component_create_reply.output_num;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  955  	component->clocks = rmsg->u.component_create_reply.clock_num;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  956  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  957  	pr_debug("Component handle:0x%x in:%d out:%d clock:%d\n",
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  958  		 component->handle,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  959  		 component->inputs, component->outputs, component->clocks);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  960  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  961  release_msg:
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  962  	vchi_held_msg_release(&rmsg_handle);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  963  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  964  	return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  965  }
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  966  

:::::: The code at line 932 was first introduced by commit
:::::: 7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a staging: Import the BCM2835 MMAL-based V4L2 camera driver.

:::::: TO: Eric Anholt <eric@anholt.net>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37581 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size
@ 2020-11-15 22:09 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-15 22:09 UTC (permalink / raw)
  To: Jacopo Mondi
  Cc: kbuild-all, linux-kernel, Greg Kroah-Hartman, Nicolas Saenz Julienne

[-- Attachment #1: Type: text/plain, Size: 8572 bytes --]

Hi Jacopo,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9cfd9c45994b409c7103efc2f265e0af7634cf75
commit: b18ee53ad297264a79cf4ea566663f20786b6455 staging: bcm2835: Break MMAL support out from camera
date:   5 months ago
config: openrisc-randconfig-r034-20201113 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b18ee53ad297264a79cf4ea566663f20786b6455
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b18ee53ad297264a79cf4ea566663f20786b6455
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc 

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 >>):

   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c: In function 'create_component':
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size [-Wstringop-truncation]
     932 |  strncpy(m.u.component_create.name, name,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     933 |   sizeof(m.u.component_create.name));
         |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +932 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  918  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  919  /* create comonent on vc */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  920  static int create_component(struct vchiq_mmal_instance *instance,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  921  			    struct vchiq_mmal_component *component,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  922  			    const char *name)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  923  {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  924  	int ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  925  	struct mmal_msg m;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  926  	struct mmal_msg *rmsg;
9d4d3ac473912a drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c Dominic Braun 2018-12-14  927  	struct vchi_held_msg rmsg_handle;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  928  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  929  	/* build component create message */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  930  	m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE;
4fe08093094e5f drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c Michael Zoran 2017-03-09  931  	m.u.component_create.client_component = (u32)(unsigned long)component;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27 @932  	strncpy(m.u.component_create.name, name,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  933  		sizeof(m.u.component_create.name));
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  934  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  935  	ret = send_synchronous_mmal_msg(instance, &m,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  936  					sizeof(m.u.component_create),
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  937  					&rmsg, &rmsg_handle);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  938  	if (ret)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  939  		return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  940  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  941  	if (rmsg->h.type != m.h.type) {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  942  		/* got an unexpected message type in reply */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  943  		ret = -EINVAL;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  944  		goto release_msg;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  945  	}
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  946  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  947  	ret = -rmsg->u.component_create_reply.status;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  948  	if (ret != MMAL_MSG_STATUS_SUCCESS)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  949  		goto release_msg;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  950  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  951  	/* a valid component response received */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  952  	component->handle = rmsg->u.component_create_reply.component_handle;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  953  	component->inputs = rmsg->u.component_create_reply.input_num;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  954  	component->outputs = rmsg->u.component_create_reply.output_num;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  955  	component->clocks = rmsg->u.component_create_reply.clock_num;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  956  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  957  	pr_debug("Component handle:0x%x in:%d out:%d clock:%d\n",
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  958  		 component->handle,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  959  		 component->inputs, component->outputs, component->clocks);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  960  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  961  release_msg:
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  962  	vchi_held_msg_release(&rmsg_handle);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  963  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  964  	return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  965  }
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  966  

:::::: The code at line 932 was first introduced by commit
:::::: 7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a staging: Import the BCM2835 MMAL-based V4L2 camera driver.

:::::: TO: Eric Anholt <eric@anholt.net>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30046 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size
@ 2020-10-17  1:48 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-10-17  1:48 UTC (permalink / raw)
  To: Jacopo Mondi
  Cc: kbuild-all, linux-kernel, Greg Kroah-Hartman, Nicolas Saenz Julienne

[-- Attachment #1: Type: text/plain, Size: 11977 bytes --]

Hi Jacopo,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8119c4332d253660e0a6b8748fe0749961cfbc97
commit: b18ee53ad297264a79cf4ea566663f20786b6455 staging: bcm2835: Break MMAL support out from camera
date:   4 months ago
config: nds32-randconfig-r026-20201017 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b18ee53ad297264a79cf4ea566663f20786b6455
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b18ee53ad297264a79cf4ea566663f20786b6455
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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 include/linux/kernel.h:11,
                    from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:19:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   arch/nds32/include/asm/memory.h:82:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      82 | #define pfn_valid(pfn)  ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
         |                                ^~
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                    ^~~~
   include/linux/dma-mapping.h:352:2: note: in expansion of macro 'if'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |  ^~
   include/linux/dma-mapping.h:352:6: note: in expansion of macro 'WARN_ON_ONCE'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |      ^~~~~~~~~~~~
   include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   arch/nds32/include/asm/memory.h:82:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      82 | #define pfn_valid(pfn)  ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
         |                                ^~
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                             ^~~~
   include/linux/dma-mapping.h:352:2: note: in expansion of macro 'if'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |  ^~
   include/linux/dma-mapping.h:352:6: note: in expansion of macro 'WARN_ON_ONCE'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |      ^~~~~~~~~~~~
   include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   arch/nds32/include/asm/memory.h:82:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      82 | #define pfn_valid(pfn)  ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
         |                                ^~
   include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
      69 |  (cond) ?     \
         |   ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   include/linux/dma-mapping.h:352:2: note: in expansion of macro 'if'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |  ^~
   include/linux/dma-mapping.h:352:6: note: in expansion of macro 'WARN_ON_ONCE'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |      ^~~~~~~~~~~~
   include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c: In function 'create_component':
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size [-Wstringop-truncation]
     932 |  strncpy(m.u.component_create.name, name,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     933 |   sizeof(m.u.component_create.name));
         |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +932 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  918  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  919  /* create comonent on vc */
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  920  static int create_component(struct vchiq_mmal_instance *instance,
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  921  			    struct vchiq_mmal_component *component,
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  922  			    const char *name)
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  923  {
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  924  	int ret;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  925  	struct mmal_msg m;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  926  	struct mmal_msg *rmsg;
9d4d3ac473912a2 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c Dominic Braun 2018-12-14  927  	struct vchi_held_msg rmsg_handle;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  928  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  929  	/* build component create message */
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  930  	m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE;
4fe08093094e5f6 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c Michael Zoran 2017-03-09  931  	m.u.component_create.client_component = (u32)(unsigned long)component;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27 @932  	strncpy(m.u.component_create.name, name,
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  933  		sizeof(m.u.component_create.name));
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  934  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  935  	ret = send_synchronous_mmal_msg(instance, &m,
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  936  					sizeof(m.u.component_create),
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  937  					&rmsg, &rmsg_handle);
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  938  	if (ret)
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  939  		return ret;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  940  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  941  	if (rmsg->h.type != m.h.type) {
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  942  		/* got an unexpected message type in reply */
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  943  		ret = -EINVAL;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  944  		goto release_msg;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  945  	}
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  946  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  947  	ret = -rmsg->u.component_create_reply.status;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  948  	if (ret != MMAL_MSG_STATUS_SUCCESS)
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  949  		goto release_msg;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  950  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  951  	/* a valid component response received */
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  952  	component->handle = rmsg->u.component_create_reply.component_handle;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  953  	component->inputs = rmsg->u.component_create_reply.input_num;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  954  	component->outputs = rmsg->u.component_create_reply.output_num;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  955  	component->clocks = rmsg->u.component_create_reply.clock_num;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  956  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  957  	pr_debug("Component handle:0x%x in:%d out:%d clock:%d\n",
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  958  		 component->handle,
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  959  		 component->inputs, component->outputs, component->clocks);
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  960  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  961  release_msg:
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  962  	vchi_held_msg_release(&rmsg_handle);
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  963  
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  964  	return ret;
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  965  }
7b3ad5abf027b76 drivers/staging/media/platform/bcm2835/mmal-vchiq.c       Eric Anholt   2017-01-27  966  

:::::: The code at line 932 was first introduced by commit
:::::: 7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a staging: Import the BCM2835 MMAL-based V4L2 camera driver.

:::::: TO: Eric Anholt <eric@anholt.net>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32318 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-15 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22  8:07 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:932:2: warning: 'strncpy' specified bound 128 equals destination size kernel test robot
2020-10-17  1:48 kernel test robot
2020-11-15 22:09 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).