From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [RFC 24/25] drm/i915: Zero fill the request structure Date: Sun, 19 Oct 2014 16:15:42 +0200 Message-ID: <20141019141542.GG26941@phenom.ffwll.local> References: <1412604925-11290-1-git-send-email-John.C.Harrison@Intel.com> <1412941272-6350-1-git-send-email-John.C.Harrison@Intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTP id B221489FF6 for ; Sun, 19 Oct 2014 07:15:34 -0700 (PDT) Received: by mail-wi0-f173.google.com with SMTP id fb4so5234444wid.0 for ; Sun, 19 Oct 2014 07:15:34 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1412941272-6350-1-git-send-email-John.C.Harrison@Intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: John.C.Harrison@Intel.com Cc: Intel-GFX@Lists.FreeDesktop.Org List-Id: intel-gfx@lists.freedesktop.org On Fri, Oct 10, 2014 at 12:41:12PM +0100, John.C.Harrison@Intel.com wrote: > From: John Harrison > > For: VIZ-4377 > Signed-off-by: John.C.Harrison@Intel.com I think this should be squashed (well, split first) into the relevant earlier patches. Generally I much prefer kzalloc, and we use that almost everywhere. Or does this silently fix some issue and doesn't tell? -Daniel > --- > drivers/gpu/drm/i915/intel_lrc.c | 3 +-- > drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c > index 97e6b92..5a75eb5 100644 > --- a/drivers/gpu/drm/i915/intel_lrc.c > +++ b/drivers/gpu/drm/i915/intel_lrc.c > @@ -802,13 +802,12 @@ static int logical_ring_alloc_request(struct intel_engine_cs *ring, > if (ring->outstanding_lazy_request) > return 0; > > - request = kmalloc(sizeof(*request), GFP_KERNEL); > + request = kzalloc(sizeof(*request), GFP_KERNEL); > if (request == NULL) > return -ENOMEM; > > kref_init(&request->ref); > request->ring = ring; > - request->complete = false; > > ret = i915_gem_get_seqno(ring->dev, &request->seqno); > if (ret) { > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c > index df9c7e3..0f2719d 100644 > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c > @@ -2017,13 +2017,12 @@ intel_ring_alloc_request(struct intel_engine_cs *ring) > if (ring->outstanding_lazy_request) > return 0; > > - request = kmalloc(sizeof(*request), GFP_KERNEL); > + request = kzalloc(sizeof(*request), GFP_KERNEL); > if (request == NULL) > return -ENOMEM; > > kref_init(&request->ref); > request->ring = ring; > - request->complete = false; > > ret = i915_gem_get_seqno(ring->dev, &request->seqno); > if (ret) { > -- > 1.7.9.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch