public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/5] drm/i915: Use kcalloc more
Date: Thu, 19 Sep 2013 13:53:53 +0200	[thread overview]
Message-ID: <20130919115353.GU32145@phenom.ffwll.local> (raw)
In-Reply-To: <20130919104655.GE6566@nuc-i3427.alporthouse.com>

On Thu, Sep 19, 2013 at 11:46:55AM +0100, Chris Wilson wrote:
> On Thu, Sep 19, 2013 at 12:18:33PM +0200, Daniel Vetter wrote:
> > No buffer overflows here, but better safe than sorry.
> 
> You are also introducing needless memsets.

Meh, somehow I've thought kcalloc won't zero. I'll drop the redundant
GFP_ZEROs that Jani spotted and switch kcalloc to kmalloc_array in the
place we care about speed and want to avoid the memset.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-09-19 11:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 10:18 [PATCH 1/5] drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern Daniel Vetter
2013-09-19 10:18 ` [PATCH 2/5] drm/i915: Use kcalloc more Daniel Vetter
2013-09-19 10:38   ` Jani Nikula
2013-09-19 10:50     ` Chris Wilson
2013-09-19 11:00       ` Jani Nikula
2013-09-19 11:12         ` Chris Wilson
2013-09-19 10:46   ` Chris Wilson
2013-09-19 11:53     ` Daniel Vetter [this message]
2013-09-19 12:06     ` [PATCH] " Daniel Vetter
2013-09-19 12:30       ` Chris Wilson
2013-09-19 12:35         ` Daniel Vetter
2013-09-19 12:41           ` Chris Wilson
2013-09-19 12:51             ` Daniel Vetter
2013-09-19 12:58               ` Chris Wilson
2013-09-20 22:37                 ` Daniel Vetter
2013-09-19 13:40       ` Jani Nikula
2013-09-19 10:18 ` [PATCH 3/5] drm/i915: Ditch INTELFB_CONN_LIMIT Daniel Vetter
2013-09-19 10:53   ` Jani Nikula
2013-09-19 12:05     ` [PATCH] " Daniel Vetter
2013-09-19 13:32       ` Jani Nikula
2013-09-19 10:18 ` [PATCH 4/5] drm/i915: check for allocation overflow in error state capture Daniel Vetter
2013-09-20 23:39   ` Ben Widawsky
2013-09-19 10:18 ` [PATCH 5/5] drm/i915: Use unsigned for overflow checks in execbuf Daniel Vetter
2013-09-19 10:44   ` Chris Wilson
2013-09-19 12:00     ` [PATCH] " Daniel Vetter
2013-09-19 12:53       ` Daniel Vetter
2013-09-19 13:05         ` Chris Wilson
2013-09-19 10:46   ` [PATCH 5/5] " Jani Nikula
2013-09-19 10:34 ` [PATCH 1/5] drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern Jani Nikula

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=20130919115353.GU32145@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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