public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: intel-gfx@lists.freedesktop.org,
	Mika Kuoppala <mika.kuoppala@intel.com>,
	benjamin.widawsky@intel.com
Subject: Re: drm/i915: Track GEN6 page table usage
Date: Tue, 24 Mar 2015 10:11:47 +0100	[thread overview]
Message-ID: <20150324091147.GA1349@phenom.ffwll.local> (raw)
In-Reply-To: <20150323155431.GA24038@mwanda>

On Mon, Mar 23, 2015 at 06:54:32PM +0300, Dan Carpenter wrote:
> Hello Ben Widawsky,
> 
> The patch 678d96fbb3b5: "drm/i915: Track GEN6 page table usage" from
> Mar 16, 2015, leads to the following static checker warning:
> 
> 	drivers/gpu/drm/i915/i915_gem_gtt.c:363 alloc_pt_single()
> 	error: passing non negative 1 to ERR_PTR

Adding Michel and Mika.

Michel can you pls also update the authorship in your dynamic ppgtt
patches? Of course still ack that they're based on work from Ben, but
given that Ben has left the team and isn't working on this any more not
updating authorship just causes trouble like this.

Thanks, Daniel

> 
> drivers/gpu/drm/i915/i915_gem_gtt.c
>    292  
>    293  /**
>    294   * i915_dma_map_single() - Create a dma mapping for a page table/dir/etc.
>    295   * @px: Page table/dir/etc to get a DMA map for
>    296   * @dev:        drm device
>    297   *
>    298   * Page table allocations are unified across all gens. They always require a
>    299   * single 4k allocation, as well as a DMA mapping. If we keep the structs
>    300   * symmetric here, the simple macro covers us for every page table type.
>    301   *
>    302   * Return: 0 if success.
>    303   */
>    304  #define i915_dma_map_single(px, dev) \
>    305          i915_dma_map_page_single((px)->page, (dev), &(px)->daddr)
>    306  
>    307  static inline int i915_dma_map_page_single(struct page *page,
>    308                                             struct drm_device *dev,
>    309                                             dma_addr_t *daddr)
>    310  {
>    311          struct device *device = &dev->pdev->dev;
>    312  
>    313          *daddr = dma_map_page(device, page, 0, 4096, PCI_DMA_BIDIRECTIONAL);
>    314          return dma_mapping_error(device, *daddr);
>                        ^^^^^^^^^^^^^^^^^
> This function returns 1 on failure but the callers expect a negative
> error code.
> 
>    315  }
> 
> regards,
> dan carpenter
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-03-24  9:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 15:54 drm/i915: Track GEN6 page table usage Dan Carpenter
2015-03-24  9:11 ` Daniel Vetter [this message]

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=20150324091147.GA1349@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=benjamin.widawsky@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@intel.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