mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Thierry Escande <thierry.escande@collabora.com>
Cc: kbuild-all@01.org, Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] [media] v4l2: Add support for go2001 PCI codec driver
Date: Thu, 27 Jul 2017 14:33:24 +0800	[thread overview]
Message-ID: <201707271435.YjEyWlyp%fengguang.wu@intel.com> (raw)
In-Reply-To: <1501004422-8294-2-git-send-email-thierry.escande@collabora.com>

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

Hi Thierry,

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.13-rc2 next-20170726]
[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/Thierry-Escande/v4l2-Add-support-for-go2001-PCI-codec-driver/20170727-033126
base:   git://linuxtv.org/media_tree.git master
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/media/pci/go2001/go2001_driver.c: In function 'go2001_buf_init':
>> drivers/media/pci/go2001/go2001_driver.c:274:32: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'long unsigned int' [-Wformat=]
       go2001_err(gdev, "Plane address/size not aligned %d/%zu\n",
                                   ^~~~~~~~

vim +274 drivers/media/pci/go2001/go2001_driver.c

   240	
   241	static int go2001_buf_init(struct vb2_buffer *vb)
   242	{
   243		struct go2001_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
   244		struct go2001_dev *gdev = ctx->gdev;
   245		struct device *dev = &gdev->pdev->dev;
   246		struct go2001_buffer *gbuf = vb_to_go2001_buf(vb);
   247		struct go2001_dma_desc *dma_desc;
   248		struct go2001_mmap_list_entry *mmap_list;
   249		enum dma_data_direction dir;
   250		struct scatterlist *sg;
   251		struct sg_table *sgt;
   252		u64 dma_addr;
   253		u32 dma_len;
   254		int plane, sgi;
   255		int ret;
   256	
   257		go2001_trace(gdev);
   258	
   259		if (WARN_ON(gbuf->mapped))
   260			return -EINVAL;
   261	
   262		dir = V4L2_TYPE_IS_OUTPUT(vb->vb2_queue->type) ?
   263		      DMA_TO_DEVICE :
   264		      DMA_FROM_DEVICE;
   265	
   266		for (plane = 0; plane < vb->num_planes; ++plane) {
   267			dma_desc = &gbuf->dma_desc[plane];
   268			WARN_ON(!IS_ALIGNED(dma_desc->map_addr, 16));
   269	
   270			sgt = vb2_dma_sg_plane_desc(vb, plane);
   271	
   272			if (!IS_ALIGNED(sgt->sgl->offset, 8) ||
   273			    !IS_ALIGNED(vb2_plane_size(vb, plane), 8)) {
 > 274				go2001_err(gdev, "Plane address/size not aligned %d/%zu\n",
   275					   sgt->sgl->offset, vb2_plane_size(vb, plane));
   276	
   277				ret = -EINVAL;
   278				goto err;
   279			}
   280	
   281			dma_desc->num_entries = sgt->nents;
   282			dma_desc->list_size = dma_desc->num_entries *
   283					      sizeof(struct go2001_mmap_list_entry);
   284			dma_desc->mmap_list = dma_alloc_coherent(dev,
   285								 dma_desc->list_size,
   286								 &dma_desc->dma_addr,
   287								 GFP_KERNEL);
   288			if (!dma_desc->mmap_list) {
   289				go2001_err(gdev, "Failed allocating HW memory map\n");
   290	
   291				ret = -ENOMEM;
   292				goto err;
   293			}
   294	
   295			go2001_dbg(gdev, 3, "Plane %d: mmap list size: %zu\n", plane,
   296				   dma_desc->list_size);
   297	
   298			mmap_list = dma_desc->mmap_list;
   299			for_each_sg(sgt->sgl, sg, dma_desc->num_entries, sgi) {
   300				dma_addr = sg_dma_address(sg);
   301				dma_len = sg_dma_len(sg);
   302	
   303				mmap_list[sgi].dma_addr = cpu_to_le64(dma_addr);
   304				mmap_list[sgi].size = cpu_to_le32(dma_len);
   305	
   306				go2001_dbg(gdev, 4, "Chunk %d: 0x%08llx, size %d\n",
   307					   sgi, dma_addr, dma_len);
   308			}
   309		}
   310	
   311		ret = go2001_map_buffer(ctx, gbuf);
   312		if (ret) {
   313			go2001_err(ctx->gdev, "Failed mapping buffer in HW\n");
   314			goto err;
   315		}
   316	
   317		return 0;
   318	
   319	err:
   320		for (; plane > 0; --plane) {
   321			dma_desc = &gbuf->dma_desc[plane - 1];
   322			dma_free_coherent(dev, dma_desc->list_size, dma_desc->mmap_list,
   323					  dma_desc->dma_addr);
   324			memset(dma_desc, 0, sizeof(struct go2001_dma_desc));
   325		}
   326	
   327		return ret;
   328	}
   329	

---
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: 60416 bytes --]

  parent reply	other threads:[~2017-07-27  6:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 17:40 [PATCH v3] go2001 hardware codec support Thierry Escande
2017-07-25 17:40 ` [PATCH v3] [media] v4l2: Add support for go2001 PCI codec driver Thierry Escande
2017-07-25 19:18   ` Nicolas Dufresne
2017-07-27  6:33   ` kbuild test robot [this message]
2017-07-31 10:17   ` Hans Verkuil
2017-07-31  9:31 ` [PATCH v3] go2001 hardware codec support Hans Verkuil

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=201707271435.YjEyWlyp%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=thierry.escande@collabora.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®