* [ti:ti-linux-5.4.y 3134/12975] drivers/soc/ti/ti-pat.c:406:5: warning: no previous prototype for 'ti_pat_export'
@ 2021-01-09 12:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-09 12:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3017 bytes --]
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 5aea85e559610bad4007450d95456084edb025fb
commit: 836024ddc4ababf10dad367c2998dd82c68c96a3 [3134/12975] soc: ti: Add Support for the TI Page-based Address Translator (PAT)
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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 remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.4.y
git checkout 836024ddc4ababf10dad367c2998dd82c68c96a3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/soc/ti/ti-pat.c:406:5: warning: no previous prototype for 'ti_pat_export' [-Wmissing-prototypes]
406 | int ti_pat_export(struct ti_pat_data *pat,
| ^~~~~~~~~~~~~
drivers/soc/ti/ti-pat.c: In function 'ti_pat_ioctl':
drivers/soc/ti/ti-pat.c:482:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
482 | if (export.fd < 0) {
| ^
vim +/ti_pat_export +406 drivers/soc/ti/ti-pat.c
405
> 406 int ti_pat_export(struct ti_pat_data *pat,
407 struct dma_buf *i_dma_buf,
408 struct dma_buf **e_dma_buf)
409 {
410 struct ti_pat_buffer *buffer;
411 DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
412 int ret;
413
414 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
415 if (!buffer)
416 return -ENOMEM;
417
418 buffer->pat = pat;
419 buffer->i_dma_buf = i_dma_buf;
420 buffer->size = buffer->i_dma_buf->size;
421 mutex_init(&buffer->lock);
422 INIT_LIST_HEAD(&buffer->attachments);
423 buffer->map_count = 0;
424
425 /* Reserve PAT space */
426 buffer->offset = gen_pool_alloc(buffer->pat->pool, buffer->size);
427 if (!buffer->offset) {
428 ret = -ENOMEM;
429 goto free_buffer;
430 }
431
432 exp_info.ops = &dma_buf_ops;
433 exp_info.size = buffer->size;
434 exp_info.flags = O_RDWR;
435 exp_info.priv = buffer;
436
437 *e_dma_buf = dma_buf_export(&exp_info);
438 if (IS_ERR(*e_dma_buf)) {
439 ret = PTR_ERR(*e_dma_buf);
440 goto free_pool;
441 }
442
443 return 0;
444
445 free_pool:
446 gen_pool_free(buffer->pat->pool, buffer->offset, buffer->size);
447 free_buffer:
448 kfree(buffer);
449 return ret;
450 }
451 EXPORT_SYMBOL_GPL(ti_pat_export);
452
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 68339 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-09 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 12:41 [ti:ti-linux-5.4.y 3134/12975] drivers/soc/ti/ti-pat.c:406:5: warning: no previous prototype for 'ti_pat_export' kernel test robot
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.