Message ID | 20200623164235.29566-2-nsaenzjulienne@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | staging: vchiq: Getting rid of the vchi/vchiq split | expand |
Hi Nicolas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Nicolas-Saenz-Julienne/staging-vchiq-Getting-rid-of-the-vchi-vchiq-split/20200624-004930
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9bea6eb3f59cb2fad8b46d91c666a17d0aa53456
config: ia64-allmodconfig (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
# 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));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/staging/vc04_services/Kconfig b/drivers/staging/vc04_services/Kconfig index 6baf9dd57f1f..4b886293f198 100644 --- a/drivers/staging/vc04_services/Kconfig +++ b/drivers/staging/vc04_services/Kconfig @@ -23,5 +23,7 @@ source "drivers/staging/vc04_services/bcm2835-audio/Kconfig" source "drivers/staging/vc04_services/bcm2835-camera/Kconfig" +source "drivers/staging/vc04_services/vchiq-mmal/Kconfig" + endif diff --git a/drivers/staging/vc04_services/Makefile b/drivers/staging/vc04_services/Makefile index 54d9e2f31916..d37f21d1a219 100644 --- a/drivers/staging/vc04_services/Makefile +++ b/drivers/staging/vc04_services/Makefile @@ -10,8 +10,9 @@ vchiq-objs := \ interface/vchiq_arm/vchiq_util.o \ interface/vchiq_arm/vchiq_connected.o \ -obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/ -obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/ +obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/ +obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/ +obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += vchiq-mmal/ ccflags-y += -D__VCCOREVER__=0x04000000 diff --git a/drivers/staging/vc04_services/bcm2835-camera/Kconfig b/drivers/staging/vc04_services/bcm2835-camera/Kconfig index c81baf2c111e..d0653d1ed3c7 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/Kconfig +++ b/drivers/staging/vc04_services/bcm2835-camera/Kconfig @@ -4,6 +4,7 @@ config VIDEO_BCM2835 depends on MEDIA_SUPPORT depends on VIDEO_V4L2 && (ARCH_BCM2835 || COMPILE_TEST) select BCM2835_VCHIQ + select BCM2835_VCHIQ_MMAL select VIDEOBUF2_VMALLOC select BTREE help diff --git a/drivers/staging/vc04_services/bcm2835-camera/Makefile b/drivers/staging/vc04_services/bcm2835-camera/Makefile index 472f21e1f2a1..3a76d6ade428 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/Makefile +++ b/drivers/staging/vc04_services/bcm2835-camera/Makefile @@ -1,11 +1,11 @@ # SPDX-License-Identifier: GPL-2.0 bcm2835-v4l2-$(CONFIG_VIDEO_BCM2835) := \ bcm2835-camera.o \ - controls.o \ - mmal-vchiq.o + controls.o obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-v4l2.o ccflags-y += \ -I $(srctree)/$(src)/.. \ + -I $(srctree)/$(src)/../vchiq-mmal/ \ -D__VCCOREVER__=0x04000000 diff --git a/drivers/staging/vc04_services/vchiq-mmal/Kconfig b/drivers/staging/vc04_services/vchiq-mmal/Kconfig new file mode 100644 index 000000000000..500c0d12e4ff --- /dev/null +++ b/drivers/staging/vc04_services/vchiq-mmal/Kconfig @@ -0,0 +1,7 @@ +config BCM2835_VCHIQ_MMAL + tristate "BCM2835 MMAL VCHIQ service" + depends on (ARCH_BCM2835 || COMPILE_TEST) + help + Enables the MMAL API over VCHIQ interface as used for the + majority of the multimedia services on VideoCore. + Defaults to Y when the Broadcomd BCM2835 camera host is selected. diff --git a/drivers/staging/vc04_services/vchiq-mmal/Makefile b/drivers/staging/vc04_services/vchiq-mmal/Makefile new file mode 100644 index 000000000000..f8164c33aec3 --- /dev/null +++ b/drivers/staging/vc04_services/vchiq-mmal/Makefile @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0 +bcm2835-mmal-vchiq-objs := mmal-vchiq.o + +obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += bcm2835-mmal-vchiq.o + +ccflags-y += \ + -I$(srctree)/$(src)/.. \ + -D__VCCOREVER__=0x04000000 diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-common.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-common.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-common.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-encodings.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-encodings.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-common.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg-common.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-msg-common.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-msg-common.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-format.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg-format.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-msg-format.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-msg-format.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg-port.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-msg-port.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c similarity index 98% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c rename to drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index de03b90021a8..daf21087f8f9 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -17,6 +17,7 @@ #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/mutex.h> #include <linux/mm.h> #include <linux/slab.h> @@ -1396,6 +1397,7 @@ int vchiq_mmal_port_set_format(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_port_set_format); int vchiq_mmal_port_parameter_set(struct vchiq_mmal_instance *instance, struct vchiq_mmal_port *port, @@ -1412,6 +1414,7 @@ int vchiq_mmal_port_parameter_set(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_port_parameter_set); int vchiq_mmal_port_parameter_get(struct vchiq_mmal_instance *instance, struct vchiq_mmal_port *port, @@ -1428,6 +1431,7 @@ int vchiq_mmal_port_parameter_get(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_port_parameter_get); /* enable a port * @@ -1458,6 +1462,7 @@ int vchiq_mmal_port_enable(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_port_enable); int vchiq_mmal_port_disable(struct vchiq_mmal_instance *instance, struct vchiq_mmal_port *port) @@ -1478,6 +1483,7 @@ int vchiq_mmal_port_disable(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_port_disable); /* ports will be connected in a tunneled manner so data buffers * are not handled by client. @@ -1565,6 +1571,7 @@ int vchiq_mmal_port_connect_tunnel(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_port_connect_tunnel); int vchiq_mmal_submit_buffer(struct vchiq_mmal_instance *instance, struct vchiq_mmal_port *port, @@ -1583,6 +1590,7 @@ int vchiq_mmal_submit_buffer(struct vchiq_mmal_instance *instance, return 0; } +EXPORT_SYMBOL_GPL(vchiq_mmal_submit_buffer); int mmal_vchi_buffer_init(struct vchiq_mmal_instance *instance, struct mmal_buffer *buf) @@ -1595,6 +1603,7 @@ int mmal_vchi_buffer_init(struct vchiq_mmal_instance *instance, buf->msg_context = msg_context; return 0; } +EXPORT_SYMBOL_GPL(mmal_vchi_buffer_init); int mmal_vchi_buffer_cleanup(struct mmal_buffer *buf) { @@ -1606,6 +1615,7 @@ int mmal_vchi_buffer_cleanup(struct mmal_buffer *buf) return 0; } +EXPORT_SYMBOL_GPL(mmal_vchi_buffer_cleanup); /* Initialise a mmal component and its ports * @@ -1693,6 +1703,7 @@ int vchiq_mmal_component_init(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_component_init); /* * cause a mmal component to be destroyed @@ -1714,6 +1725,7 @@ int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_component_finalise); /* * cause a mmal component to be enabled @@ -1739,6 +1751,7 @@ int vchiq_mmal_component_enable(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_component_enable); /* * cause a mmal component to be enabled @@ -1764,6 +1777,7 @@ int vchiq_mmal_component_disable(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_component_disable); int vchiq_mmal_version(struct vchiq_mmal_instance *instance, u32 *major_out, u32 *minor_out) @@ -1779,6 +1793,7 @@ int vchiq_mmal_version(struct vchiq_mmal_instance *instance, return ret; } +EXPORT_SYMBOL_GPL(vchiq_mmal_version); int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance) { @@ -1809,6 +1824,7 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance) return status; } +EXPORT_SYMBOL_GPL(vchiq_mmal_finalise); int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) { @@ -1889,3 +1905,8 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) kfree(instance); return -ENODEV; } +EXPORT_SYMBOL_GPL(vchiq_mmal_init); + +MODULE_DESCRIPTION("BCM2835 MMAL VCHIQ interface"); +MODULE_AUTHOR("Dave Stevenson, <dave.stevenson@raspberrypi.org>"); +MODULE_LICENSE("GPL"); diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h similarity index 100% rename from drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h rename to drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h