From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/5] drm/i915: Use kcalloc more Date: Thu, 19 Sep 2013 13:53:53 +0200 Message-ID: <20130919115353.GU32145@phenom.ffwll.local> References: <1379585916-6521-1-git-send-email-daniel.vetter@ffwll.ch> <1379585916-6521-2-git-send-email-daniel.vetter@ffwll.ch> <20130919104655.GE6566@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 42FC8E78C7 for ; Thu, 19 Sep 2013 04:53:40 -0700 (PDT) Received: by mail-ea0-f172.google.com with SMTP id r16so4134142ead.3 for ; Thu, 19 Sep 2013 04:53:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130919104655.GE6566@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org 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