LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: kbuild-all@01.org, Kees Cook <keescook@chromium.org>,
Matthew Wilcox <mawilcox@microsoft.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com
Subject: Re: [PATCH 3/6] Convert v4l2 event to struct_size
Date: Fri, 8 Jun 2018 12:03:16 +0800 [thread overview]
Message-ID: <201806081138.yqBwyBBb%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180607145720.22590-4-willy@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 3150 bytes --]
Hi Matthew,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.17 next-20180607]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Matthew-Wilcox/More-conversions-to-struct_size/20180608-112654
config: x86_64-randconfig-x017-201822 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/media/v4l2-core/v4l2-event.c: In function 'v4l2_event_subscribe':
>> drivers/media/v4l2-core/v4l2-event.c:218:17: error: implicit declaration of function 'struct_size'; did you mean 'resource_size'? [-Werror=implicit-function-declaration]
sev = kvzalloc(struct_size(sev, events, elems), GFP_KERNEL);
^~~~~~~~~~~
resource_size
drivers/media/v4l2-core/v4l2-event.c:218:34: error: 'events' undeclared (first use in this function); did you mean 'elems'?
sev = kvzalloc(struct_size(sev, events, elems), GFP_KERNEL);
^~~~~~
elems
drivers/media/v4l2-core/v4l2-event.c:218:34: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +218 drivers/media/v4l2-core/v4l2-event.c
203
204 int v4l2_event_subscribe(struct v4l2_fh *fh,
205 const struct v4l2_event_subscription *sub, unsigned elems,
206 const struct v4l2_subscribed_event_ops *ops)
207 {
208 struct v4l2_subscribed_event *sev, *found_ev;
209 unsigned long flags;
210 unsigned i;
211
212 if (sub->type == V4L2_EVENT_ALL)
213 return -EINVAL;
214
215 if (elems < 1)
216 elems = 1;
217
> 218 sev = kvzalloc(struct_size(sev, events, elems), GFP_KERNEL);
219 if (!sev)
220 return -ENOMEM;
221 for (i = 0; i < elems; i++)
222 sev->events[i].sev = sev;
223 sev->type = sub->type;
224 sev->id = sub->id;
225 sev->flags = sub->flags;
226 sev->fh = fh;
227 sev->ops = ops;
228
229 spin_lock_irqsave(&fh->vdev->fh_lock, flags);
230 found_ev = v4l2_event_subscribed(fh, sub->type, sub->id);
231 if (!found_ev)
232 list_add(&sev->list, &fh->subscribed);
233 spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
234
235 if (found_ev) {
236 kvfree(sev);
237 return 0; /* Already listening */
238 }
239
240 if (sev->ops && sev->ops->add) {
241 int ret = sev->ops->add(sev, elems);
242 if (ret) {
243 sev->ops = NULL;
244 v4l2_event_unsubscribe(fh, sub);
245 return ret;
246 }
247 }
248
249 /* Mark as ready for use */
250 sev->elems = elems;
251
252 return 0;
253 }
254 EXPORT_SYMBOL_GPL(v4l2_event_subscribe);
255
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28534 bytes --]
next prev parent reply other threads:[~2018-06-08 4:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 14:57 [PATCH 0/6] More conversions " Matthew Wilcox
2018-06-07 14:57 ` [PATCH 1/6] Convert virtio_console " Matthew Wilcox
2018-06-07 19:29 ` Kees Cook
2018-06-07 20:43 ` Kees Cook
2018-06-07 14:57 ` [PATCH 2/6] Convert infiniband uverbs " Matthew Wilcox
2018-06-07 14:57 ` [PATCH 3/6] Convert v4l2 event " Matthew Wilcox
2018-06-08 4:03 ` kbuild test robot [this message]
2018-06-07 14:57 ` [PATCH 4/6] Convert vhost " Matthew Wilcox
2018-06-07 14:57 ` [PATCH 5/6] Convert jffs2 acl " Matthew Wilcox
2018-06-07 14:57 ` [PATCH 6/6] Convert intel uncore " Matthew Wilcox
2018-06-07 17:29 ` Ralph Campbell
2018-06-07 17:34 ` Shakeel Butt
2018-06-08 4:03 ` kbuild test robot
2018-06-08 4:09 ` kbuild test robot
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=201806081138.yqBwyBBb%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mawilcox@microsoft.com \
--cc=willy@infradead.org \
--subject='Re: [PATCH 3/6] Convert v4l2 event to struct_size' \
/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
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).