From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/media/v4l2-core/v4l2-ctrls-core.c:944 v4l2_ctrl_handler_init_class() warn: Please consider using kvcalloc instead
Date: Thu, 24 Mar 2022 12:41:53 +0800 [thread overview]
Message-ID: <202203241203.MLZXJZEd-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2797 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Hans Verkuil <hverkuil@xs4all.nl>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d51b1b33c51d147b757f042b4d336603b699f362
commit: 71c689dc2e732d4cb190aaf0edea73116b1611bd media: v4l2-ctrls: split up into four source files
date: 10 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 10 months ago
config: arm-randconfig-m031-20220323 (https://download.01.org/0day-ci/archive/20220324/202203241203.MLZXJZEd-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/media/v4l2-core/v4l2-ctrls-core.c:944 v4l2_ctrl_handler_init_class() warn: Please consider using kvcalloc instead
vim +944 drivers/media/v4l2-core/v4l2-ctrls-core.c
71c689dc2e732d4 Hans Verkuil 2021-04-27 932
71c689dc2e732d4 Hans Verkuil 2021-04-27 933 /* Initialize the handler */
71c689dc2e732d4 Hans Verkuil 2021-04-27 934 int v4l2_ctrl_handler_init_class(struct v4l2_ctrl_handler *hdl,
71c689dc2e732d4 Hans Verkuil 2021-04-27 935 unsigned nr_of_controls_hint,
71c689dc2e732d4 Hans Verkuil 2021-04-27 936 struct lock_class_key *key, const char *name)
71c689dc2e732d4 Hans Verkuil 2021-04-27 937 {
71c689dc2e732d4 Hans Verkuil 2021-04-27 938 mutex_init(&hdl->_lock);
71c689dc2e732d4 Hans Verkuil 2021-04-27 939 hdl->lock = &hdl->_lock;
71c689dc2e732d4 Hans Verkuil 2021-04-27 940 lockdep_set_class_and_name(hdl->lock, key, name);
71c689dc2e732d4 Hans Verkuil 2021-04-27 941 INIT_LIST_HEAD(&hdl->ctrls);
71c689dc2e732d4 Hans Verkuil 2021-04-27 942 INIT_LIST_HEAD(&hdl->ctrl_refs);
71c689dc2e732d4 Hans Verkuil 2021-04-27 943 hdl->nr_of_buckets = 1 + nr_of_controls_hint / 8;
71c689dc2e732d4 Hans Verkuil 2021-04-27 @944 hdl->buckets = kvmalloc_array(hdl->nr_of_buckets,
71c689dc2e732d4 Hans Verkuil 2021-04-27 945 sizeof(hdl->buckets[0]),
71c689dc2e732d4 Hans Verkuil 2021-04-27 946 GFP_KERNEL | __GFP_ZERO);
71c689dc2e732d4 Hans Verkuil 2021-04-27 947 hdl->error = hdl->buckets ? 0 : -ENOMEM;
71c689dc2e732d4 Hans Verkuil 2021-04-27 948 v4l2_ctrl_handler_init_request(hdl);
71c689dc2e732d4 Hans Verkuil 2021-04-27 949 return hdl->error;
71c689dc2e732d4 Hans Verkuil 2021-04-27 950 }
71c689dc2e732d4 Hans Verkuil 2021-04-27 951 EXPORT_SYMBOL(v4l2_ctrl_handler_init_class);
71c689dc2e732d4 Hans Verkuil 2021-04-27 952
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-03-24 4:41 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=202203241203.MLZXJZEd-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@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.