lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 23 Feb 2021 04:42:52 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mirela Rabulea <mirela.rabulea@....nxp.com>, mchehab@...nel.org,
        hverkuil-cisco@...all.nl, shawnguo@...nel.org, robh+dt@...nel.org,
        p.zabel@...gutronix.de
Cc:     kbuild-all@...ts.01.org, paul.kocialkowski@...tlin.com,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-imx@....com, s.hauer@...gutronix.de
Subject: Re: [PATCH v8 3/9] media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG
 Encoder/Decoder

Hi Mirela,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on robh/for-next linus/master v5.11 next-20210222]
[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]

url:    https://github.com/0day-ci/linux/commits/Mirela-Rabulea/Add-V4L2-driver-for-i-MX8-JPEG-Encoder-Decoder/20210223-031832
base:   git://linuxtv.org/media_tree.git master
config: i386-randconfig-s001-20210222 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-229-g60c1f270-dirty
        # https://github.com/0day-ci/linux/commit/6e821067180472a0ae64a91440bd234c86040310
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mirela-Rabulea/Add-V4L2-driver-for-i-MX8-JPEG-Encoder-Decoder/20210223-031832
        git checkout 6e821067180472a0ae64a91440bd234c86040310
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from drivers/media/platform/imx-jpeg/mxc-jpeg.c:43:
   drivers/media/platform/imx-jpeg/mxc-jpeg.c: In function 'mxc_jpeg_config_enc_desc':
>> drivers/media/platform/imx-jpeg/mxc-jpeg.c:891:21: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
     891 |  dev_dbg(jpeg->dev, "cfg_desc - 0x%llx:\n", cfg_desc_handle);
         |                     ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
     129 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
     161 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/media/platform/imx-jpeg/mxc-jpeg.c:891:2: note: in expansion of macro 'dev_dbg'
     891 |  dev_dbg(jpeg->dev, "cfg_desc - 0x%llx:\n", cfg_desc_handle);
         |  ^~~~~~~
   drivers/media/platform/imx-jpeg/mxc-jpeg.c:891:38: note: format string is defined here
     891 |  dev_dbg(jpeg->dev, "cfg_desc - 0x%llx:\n", cfg_desc_handle);
         |                                   ~~~^
         |                                      |
         |                                      long long unsigned int
         |                                   %x
   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from drivers/media/platform/imx-jpeg/mxc-jpeg.c:43:
   drivers/media/platform/imx-jpeg/mxc-jpeg.c:893:21: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
     893 |  dev_dbg(jpeg->dev, "enc desc - 0x%llx:\n", desc_handle);
         |                     ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
     129 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
     161 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/media/platform/imx-jpeg/mxc-jpeg.c:893:2: note: in expansion of macro 'dev_dbg'
     893 |  dev_dbg(jpeg->dev, "enc desc - 0x%llx:\n", desc_handle);
         |  ^~~~~~~
   drivers/media/platform/imx-jpeg/mxc-jpeg.c:893:38: note: format string is defined here
     893 |  dev_dbg(jpeg->dev, "enc desc - 0x%llx:\n", desc_handle);
         |                                   ~~~^
         |                                      |
         |                                      long long unsigned int
         |                                   %x
   drivers/media/platform/imx-jpeg/mxc-jpeg.c: In function 'mxc_jpeg_probe':
>> drivers/media/platform/imx-jpeg/mxc-jpeg.c:2086:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    2086 |  mode = (int)(u64)of_id->data;
         |              ^


vim +891 drivers/media/platform/imx-jpeg/mxc-jpeg.c

   840	
   841	static void mxc_jpeg_config_enc_desc(struct vb2_buffer *out_buf,
   842					     struct mxc_jpeg_ctx *ctx,
   843					     struct vb2_buffer *src_buf,
   844					     struct vb2_buffer *dst_buf)
   845	{
   846		struct mxc_jpeg_dev *jpeg = ctx->mxc_jpeg;
   847		void __iomem *reg = jpeg->base_reg;
   848		unsigned int slot = ctx->slot;
   849		struct mxc_jpeg_desc *desc = jpeg->slot_data[slot].desc;
   850		struct mxc_jpeg_desc *cfg_desc = jpeg->slot_data[slot].cfg_desc;
   851		dma_addr_t desc_handle = jpeg->slot_data[slot].desc_handle;
   852		dma_addr_t cfg_desc_handle = jpeg->slot_data[slot].cfg_desc_handle;
   853		void *cfg_stream_vaddr = jpeg->slot_data[slot].cfg_stream_vaddr;
   854		struct mxc_jpeg_q_data *q_data;
   855		enum mxc_jpeg_image_format img_fmt;
   856		int w, h;
   857	
   858		q_data = mxc_jpeg_get_q_data(ctx, src_buf->vb2_queue->type);
   859	
   860		jpeg->slot_data[slot].cfg_stream_size =
   861				mxc_jpeg_setup_cfg_stream(cfg_stream_vaddr,
   862							  q_data->fmt->fourcc,
   863							  q_data->w_adjusted,
   864							  q_data->h_adjusted);
   865	
   866		/* chain the config descriptor with the encoding descriptor */
   867		cfg_desc->next_descpt_ptr = desc_handle | MXC_NXT_DESCPT_EN;
   868	
   869		cfg_desc->buf_base0 = jpeg->slot_data[slot].cfg_stream_handle;
   870		cfg_desc->buf_base1 = 0;
   871		cfg_desc->line_pitch = 0;
   872		cfg_desc->stm_bufbase = 0; /* no output expected */
   873		cfg_desc->stm_bufsize = 0x0;
   874		cfg_desc->imgsize = 0;
   875		cfg_desc->stm_ctrl = STM_CTRL_CONFIG_MOD(1);
   876	
   877		desc->next_descpt_ptr = 0; /* end of chain */
   878	
   879		/* use adjusted resolution for CAST IP job */
   880		w = q_data->w_adjusted;
   881		h = q_data->h_adjusted;
   882		mxc_jpeg_set_res(desc, w, h);
   883		mxc_jpeg_set_line_pitch(desc, w * (q_data->fmt->depth / 8));
   884		mxc_jpeg_set_bufsize(desc, desc->line_pitch * h);
   885		img_fmt = mxc_jpeg_fourcc_to_imgfmt(q_data->fmt->fourcc);
   886		if (img_fmt == MXC_JPEG_INVALID)
   887			dev_err(jpeg->dev, "No valid image format detected\n");
   888		desc->stm_ctrl = STM_CTRL_CONFIG_MOD(0) |
   889				 STM_CTRL_IMAGE_FORMAT(img_fmt);
   890		mxc_jpeg_addrs(desc, src_buf, dst_buf, 0);
 > 891		dev_dbg(jpeg->dev, "cfg_desc - 0x%llx:\n", cfg_desc_handle);
   892		print_descriptor_info(jpeg->dev, cfg_desc);
   893		dev_dbg(jpeg->dev, "enc desc - 0x%llx:\n", desc_handle);
   894		print_descriptor_info(jpeg->dev, desc);
   895		print_wrapper_info(jpeg->dev, reg);
   896		print_cast_status(jpeg->dev, reg, MXC_JPEG_ENCODE);
   897	
   898		/* validate the configuration descriptor */
   899		mxc_jpeg_set_desc(cfg_desc_handle, reg, slot);
   900	}
   901	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (34262 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ