All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-4.14 60/123] drivers/media/platform/coda/coda-common.c:1955:8: error: implicit declaration of function 'ida_alloc_max'; did you mean 'idr_alloc_ext'?
@ 2019-12-07  4:48 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-07  4:48 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6191 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.14
head:   7e1c436e89c0f3628aeeaebd9a13e59d06f4c110
commit: 0139af208d3499abd38af388a359691015e605a3 [60/123] media: coda: fix memory corruption in case more than 32 instances are opened
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0139af208d3499abd38af388a359691015e605a3
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/media/platform/coda/coda-common.c: In function 'coda_open':
>> drivers/media/platform/coda/coda-common.c:1955:8: error: implicit declaration of function 'ida_alloc_max'; did you mean 'idr_alloc_ext'? [-Werror=implicit-function-declaration]
     idx = ida_alloc_max(&dev->ida, max, GFP_KERNEL);
           ^~~~~~~~~~~~~
           idr_alloc_ext
>> drivers/media/platform/coda/coda-common.c:2068:2: error: implicit declaration of function 'ida_free'; did you mean 'pgd_free'? [-Werror=implicit-function-declaration]
     ida_free(&dev->ida, ctx->idx);
     ^~~~~~~~
     pgd_free
   cc1: some warnings being treated as errors

vim +1955 drivers/media/platform/coda/coda-common.c

  1934	
  1935	/*
  1936	 * File operations
  1937	 */
  1938	
  1939	static int coda_open(struct file *file)
  1940	{
  1941		struct video_device *vdev = video_devdata(file);
  1942		struct coda_dev *dev = video_get_drvdata(vdev);
  1943		struct coda_ctx *ctx;
  1944		unsigned int max = ~0;
  1945		char *name;
  1946		int ret;
  1947		int idx;
  1948	
  1949		ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
  1950		if (!ctx)
  1951			return -ENOMEM;
  1952	
  1953		if (dev->devtype->product == CODA_DX6)
  1954			max = CODADX6_MAX_INSTANCES - 1;
> 1955		idx = ida_alloc_max(&dev->ida, max, GFP_KERNEL);
  1956		if (idx < 0) {
  1957			ret = idx;
  1958			goto err_coda_max;
  1959		}
  1960	
  1961		name = kasprintf(GFP_KERNEL, "context%d", idx);
  1962		if (!name) {
  1963			ret = -ENOMEM;
  1964			goto err_coda_name_init;
  1965		}
  1966	
  1967		ctx->debugfs_entry = debugfs_create_dir(name, dev->debugfs_root);
  1968		kfree(name);
  1969	
  1970		ctx->cvd = to_coda_video_device(vdev);
  1971		ctx->inst_type = ctx->cvd->type;
  1972		ctx->ops = ctx->cvd->ops;
  1973		ctx->use_bit = !ctx->cvd->direct;
  1974		init_completion(&ctx->completion);
  1975		INIT_WORK(&ctx->pic_run_work, coda_pic_run_work);
  1976		if (ctx->ops->seq_end_work)
  1977			INIT_WORK(&ctx->seq_end_work, ctx->ops->seq_end_work);
  1978		v4l2_fh_init(&ctx->fh, video_devdata(file));
  1979		file->private_data = &ctx->fh;
  1980		v4l2_fh_add(&ctx->fh);
  1981		ctx->dev = dev;
  1982		ctx->idx = idx;
  1983		switch (dev->devtype->product) {
  1984		case CODA_960:
  1985			/*
  1986			 * Enabling the BWB when decoding can hang the firmware with
  1987			 * certain streams. The issue was tracked as ENGR00293425 by
  1988			 * Freescale. As a workaround, disable BWB for all decoders.
  1989			 * The enable_bwb module parameter allows to override this.
  1990			 */
  1991			if (enable_bwb || ctx->inst_type == CODA_INST_ENCODER)
  1992				ctx->frame_mem_ctrl = CODA9_FRAME_ENABLE_BWB;
  1993			/* fallthrough */
  1994		case CODA_7541:
  1995			ctx->reg_idx = 0;
  1996			break;
  1997		default:
  1998			ctx->reg_idx = idx;
  1999		}
  2000		if (ctx->dev->vdoa && !disable_vdoa) {
  2001			ctx->vdoa = vdoa_context_create(dev->vdoa);
  2002			if (!ctx->vdoa)
  2003				v4l2_warn(&dev->v4l2_dev,
  2004					  "Failed to create vdoa context: not using vdoa");
  2005		}
  2006		ctx->use_vdoa = false;
  2007	
  2008		/* Power up and upload firmware if necessary */
  2009		ret = pm_runtime_get_sync(&dev->plat_dev->dev);
  2010		if (ret < 0) {
  2011			v4l2_err(&dev->v4l2_dev, "failed to power up: %d\n", ret);
  2012			goto err_pm_get;
  2013		}
  2014	
  2015		ret = clk_prepare_enable(dev->clk_per);
  2016		if (ret)
  2017			goto err_clk_per;
  2018	
  2019		ret = clk_prepare_enable(dev->clk_ahb);
  2020		if (ret)
  2021			goto err_clk_ahb;
  2022	
  2023		set_default_params(ctx);
  2024		ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx,
  2025						    ctx->ops->queue_init);
  2026		if (IS_ERR(ctx->fh.m2m_ctx)) {
  2027			ret = PTR_ERR(ctx->fh.m2m_ctx);
  2028	
  2029			v4l2_err(&dev->v4l2_dev, "%s return error (%d)\n",
  2030				 __func__, ret);
  2031			goto err_ctx_init;
  2032		}
  2033	
  2034		ret = coda_ctrls_setup(ctx);
  2035		if (ret) {
  2036			v4l2_err(&dev->v4l2_dev, "failed to setup coda controls\n");
  2037			goto err_ctrls_setup;
  2038		}
  2039	
  2040		ctx->fh.ctrl_handler = &ctx->ctrls;
  2041	
  2042		mutex_init(&ctx->bitstream_mutex);
  2043		mutex_init(&ctx->buffer_mutex);
  2044		INIT_LIST_HEAD(&ctx->buffer_meta_list);
  2045		spin_lock_init(&ctx->buffer_meta_lock);
  2046	
  2047		coda_lock(ctx);
  2048		list_add(&ctx->list, &dev->instances);
  2049		coda_unlock(ctx);
  2050	
  2051		v4l2_dbg(1, coda_debug, &dev->v4l2_dev, "Created instance %d (%p)\n",
  2052			 ctx->idx, ctx);
  2053	
  2054		return 0;
  2055	
  2056	err_ctrls_setup:
  2057		v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
  2058	err_ctx_init:
  2059		clk_disable_unprepare(dev->clk_ahb);
  2060	err_clk_ahb:
  2061		clk_disable_unprepare(dev->clk_per);
  2062	err_clk_per:
  2063		pm_runtime_put_sync(&dev->plat_dev->dev);
  2064	err_pm_get:
  2065		v4l2_fh_del(&ctx->fh);
  2066		v4l2_fh_exit(&ctx->fh);
  2067	err_coda_name_init:
> 2068		ida_free(&dev->ida, ctx->idx);
  2069	err_coda_max:
  2070		kfree(ctx);
  2071		return ret;
  2072	}
  2073	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47367 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-07  4:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07  4:48 [sashal-linux-stable:queue-4.14 60/123] drivers/media/platform/coda/coda-common.c:1955:8: error: implicit declaration of function 'ida_alloc_max'; did you mean 'idr_alloc_ext'? kbuild 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.