[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202309010543.Xc8XI7oZ-lkp@intel.com>
Date: Fri, 1 Sep 2023 05:26:13 +0800
From: kernel test robot <lkp@...el.com>
To: Ekansh Gupta <quic_ekangupt@...cinc.com>,
srinivas.kandagatla@...aro.org, linux-arm-msm@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
Ekansh Gupta <quic_ekangupt@...cinc.com>,
ekangupt@....qualcomm.com, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, fastrpc.upstream@....qualcomm.com
Subject: Re: [PATCH v1 1/5] misc: fastrpc: Add fastrpc multimode invoke
request support
Hi Ekansh,
kernel test robot noticed the following build warnings:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.5 next-20230831]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ekansh-Gupta/misc-fastrpc-Add-fastrpc-multimode-invoke-request-support/20230901-002929
base: char-misc/char-misc-testing
patch link: https://lore.kernel.org/r/1693499292-19083-2-git-send-email-quic_ekangupt%40quicinc.com
patch subject: [PATCH v1 1/5] misc: fastrpc: Add fastrpc multimode invoke request support
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230901/202309010543.Xc8XI7oZ-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230901/202309010543.Xc8XI7oZ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309010543.Xc8XI7oZ-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/misc/fastrpc.c: In function 'fastrpc_context_alloc':
>> drivers/misc/fastrpc.c:607:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
607 | ctx->args = (struct fastrpc_invoke_args *)invoke->inv.args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_init_create_static_process':
>> drivers/misc/fastrpc.c:1320:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1320 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_init_create_process':
drivers/misc/fastrpc.c:1453:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1453 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_release_current_dsp_process':
drivers/misc/fastrpc.c:1517:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1517 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_init_attach':
drivers/misc/fastrpc.c:1665:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1665 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_invoke':
drivers/misc/fastrpc.c:1696:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1696 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_multimode_invoke':
drivers/misc/fastrpc.c:1732:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1732 | einv.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_get_info_from_dsp':
drivers/misc/fastrpc.c:1762:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1762 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_req_munmap_impl':
drivers/misc/fastrpc.c:1865:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1865 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_req_mmap':
drivers/misc/fastrpc.c:1963:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1963 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_req_mem_unmap_impl':
drivers/misc/fastrpc.c:2044:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2044 | ioctl.inv.args = (__u64)args;
| ^
drivers/misc/fastrpc.c: In function 'fastrpc_req_mem_map':
drivers/misc/fastrpc.c:2113:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2113 | ioctl.inv.args = (__u64)args;
| ^
vim +607 drivers/misc/fastrpc.c
573
574 static struct fastrpc_invoke_ctx *fastrpc_context_alloc(
575 struct fastrpc_user *user, u32 kernel, u32 sc,
576 struct fastrpc_enhanced_invoke *invoke)
577 {
578 struct fastrpc_channel_ctx *cctx = user->cctx;
579 struct fastrpc_invoke_ctx *ctx = NULL;
580 unsigned long flags;
581 int ret;
582
583 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
584 if (!ctx)
585 return ERR_PTR(-ENOMEM);
586
587 INIT_LIST_HEAD(&ctx->node);
588 ctx->fl = user;
589 ctx->nscalars = REMOTE_SCALARS_LENGTH(sc);
590 ctx->nbufs = REMOTE_SCALARS_INBUFS(sc) +
591 REMOTE_SCALARS_OUTBUFS(sc);
592
593 if (ctx->nscalars) {
594 ctx->maps = kcalloc(ctx->nscalars,
595 sizeof(*ctx->maps), GFP_KERNEL);
596 if (!ctx->maps) {
597 kfree(ctx);
598 return ERR_PTR(-ENOMEM);
599 }
600 ctx->olaps = kcalloc(ctx->nscalars,
601 sizeof(*ctx->olaps), GFP_KERNEL);
602 if (!ctx->olaps) {
603 kfree(ctx->maps);
604 kfree(ctx);
605 return ERR_PTR(-ENOMEM);
606 }
> 607 ctx->args = (struct fastrpc_invoke_args *)invoke->inv.args;
608 fastrpc_get_buff_overlaps(ctx);
609 }
610
611 /* Released in fastrpc_context_put() */
612 fastrpc_channel_ctx_get(cctx);
613
614 ctx->sc = sc;
615 ctx->retval = -1;
616 ctx->pid = current->pid;
617 ctx->tgid = user->tgid;
618 ctx->cctx = cctx;
619 init_completion(&ctx->work);
620 INIT_WORK(&ctx->put_work, fastrpc_context_put_wq);
621
622 spin_lock(&user->lock);
623 list_add_tail(&ctx->node, &user->pending);
624 spin_unlock(&user->lock);
625
626 spin_lock_irqsave(&cctx->lock, flags);
627 ret = idr_alloc_cyclic(&cctx->ctx_idr, ctx, 1,
628 FASTRPC_CTX_MAX, GFP_ATOMIC);
629 if (ret < 0) {
630 spin_unlock_irqrestore(&cctx->lock, flags);
631 goto err_idr;
632 }
633 ctx->ctxid = ret << 4;
634 spin_unlock_irqrestore(&cctx->lock, flags);
635
636 kref_init(&ctx->refcount);
637
638 return ctx;
639 err_idr:
640 spin_lock(&user->lock);
641 list_del(&ctx->node);
642 spin_unlock(&user->lock);
643 fastrpc_channel_ctx_put(cctx);
644 kfree(ctx->maps);
645 kfree(ctx->olaps);
646 kfree(ctx);
647
648 return ERR_PTR(ret);
649 }
650
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists