From patchwork Sat Jul 22 09:53:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 9858055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D17F9600F5 for ; Sat, 22 Jul 2017 09:55:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC5A2285ED for ; Sat, 22 Jul 2017 09:55:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B082B285F5; Sat, 22 Jul 2017 09:55:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 45849285ED for ; Sat, 22 Jul 2017 09:55:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FEAB6E1DA; Sat, 22 Jul 2017 09:55:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D7196E1C9; Sat, 22 Jul 2017 09:55:21 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id m75so3067135wmb.2; Sat, 22 Jul 2017 02:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zfFa1YEG3n6c41y+nuAMelH6dp7GkcczZ/pQHBcrvOk=; b=sjmJI+GLAndqYNWireKvJimSlg8sXSlbGR+cPtmA5YL9b/q/2PeSdNL+lcmpB00JjH X/CaDsyyAHYC/5dIIsTL7lwzzw7jCVuz8HO/3mdLr9y4P/BJ/Th2wyW2k9m/mpqNh1Bt 2kGCCNqYhW6kQMXZfKh7/5aInUWKq9EkWuMlbvVNM7GPTYXDSEu7ejY6Z9k/5Ct572Za mHJriTH6nowmTHk3GDhWKIKxM22XBmdsHWkBpMrW+qkxFR/B/QvKk85gTZeRbs+PHhOw SHoSNaSogj29Y4wjtVA3nkLw52FBY9wAoOtJUcI4jzsOVZy6EO6yJgF5/YdS05G8qBv0 lz/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zfFa1YEG3n6c41y+nuAMelH6dp7GkcczZ/pQHBcrvOk=; b=Er0+epqgEHVsnCMi0WiROZtFTGtknREC5XZA1ppAAKd4gkmO6gMF5Uh6cpflaImBan OgYgM+viMnX17kIx2ZdmS+H3CWdu/hwg9DIM95mje+Iq2bx1q7lXWFDEWzEDj2+Hg5hv 3RNrz3apJenGgdWhtyN2lWT1VaiUDiNm9aF32N6LAfB5YFWbLvtD9TJJjvR7sNZPhavi P0GS9Urpt1kHxZxCA3LCemm+IIdASFkuKH+TMLQ6rD5bP8slRxn11nhKOfj6YN17EI5p WhZwVKugt+twtyLRpWJwjnEYHupqEFuyWpYAAN7UglstSQqeKM/oUgbN3NmNK1k0FnAX uiSg== X-Gm-Message-State: AIVw111o1d3V6PynlWHgr5av4hxAHkHe8ttiK7AJh9/tRWSUC7p5iesR iZ0bkRwe8HdWcHcV X-Received: by 10.28.187.86 with SMTP id l83mr1022313wmf.162.1500717319729; Sat, 22 Jul 2017 02:55:19 -0700 (PDT) Received: from cp720.fritz.box (91-114-193-248.adsl.highway.telekom.at. [91.114.193.248]) by smtp.gmail.com with ESMTPSA id z192sm2544673wmz.44.2017.07.22.02.55.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jul 2017 02:55:18 -0700 (PDT) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 11/23] drm/etnaviv: clear alloced event Date: Sat, 22 Jul 2017 11:53:11 +0200 Message-Id: <20170722095323.9964-12-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170722095323.9964-1-christian.gmeiner@gmail.com> References: <20170722095323.9964-1-christian.gmeiner@gmail.com> Cc: linux+etnaviv@armlinux.org.uk, etnaviv@lists.freedesktop.org, cphealy@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Results in less code as the users do not set every struct member to 0/NULL. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index bc1b96b4c7e9..93e3f14c0599 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1163,6 +1163,7 @@ static int event_alloc(struct etnaviv_gpu *gpu, unsigned nr_events, int event = find_first_zero_bit(gpu->event_bitmap, ETNA_NR_EVENTS); events[i] = event; + memset(&gpu->event[event], 0, sizeof(struct etnaviv_event)); set_bit(event, gpu->event_bitmap); } @@ -1354,7 +1355,6 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu, } gpu->event[event].fence = fence; - gpu->event[event].sync_point = NULL; submit->fence = dma_fence_get(fence); gpu->active_fence = submit->fence->seqno;