From patchwork Fri Aug 25 09:07:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 9921467 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 8F7F1608B9 for ; Fri, 25 Aug 2017 09:08:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8203026D05 for ; Fri, 25 Aug 2017 09:08:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7613E27F88; Fri, 25 Aug 2017 09:08:57 +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 88D7427E71 for ; Fri, 25 Aug 2017 09:08:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 815A76E82F; Fri, 25 Aug 2017 09:08:00 +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 5A2166E829; Fri, 25 Aug 2017 09:07:55 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id b189so1902269wmd.4; Fri, 25 Aug 2017 02:07:55 -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=n2xRTXINrB5jjIhYk5CzQuk3RJPyu/FKFeOuNhlB/dg=; b=SMHWksMDpkD5t21wL3+h17PTMk9wpK5qC8VwGpLLzosJFrTwVDbuWdBJtrmz+6FmzD xbq7QhPZ73YThWugWro0dcCD6M+uaP7P7bN9R3yg5qQpzVesNQKXxgzv4gEr7P/JK5ct P9bWswFLKl/vLZeSSqUZnwtpM6/UyHPzr8CI1ATfEv3ZdCVAwAwPUrYNa5WtuhShWv2L dsZOtmKIUWga0djx/Id1KurP3xLX2ZPHXfaT0UgdC8WDmBwdDvOCDIbs9fdKTOG41snc Xbfei5CRpTFIM8rnwfDR9XiCgskafOZLaRWxw5dhWqPINhv4Sb2YZM3/ZvUBUtWOhNwj ONWw== 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=n2xRTXINrB5jjIhYk5CzQuk3RJPyu/FKFeOuNhlB/dg=; b=fpdBFqjyZpf+PLAuDSXq5PYZuOT6bXuxZHY/vHvQM5nH5v4s5SXWcn/5vZibC5QELQ VPeXHXFhaaboYzarroTJVDyX0t+lXn0yddXFmlzWo4c9j2t1NGmBLoI3FqgK6RY++l1a RLeqlB2LSzdhJjNetOwS4JOzzOPokj93NR+5UPH2o7qPvrX06TXd/7duBcS7V46t0fLF MakZh2I5x/x1TDbozAtVNhHsoUCXMnvi6dvw8eRjIG9A2OAs02CZ5Ca536XYV0X+aX5r KVLWLvs5gqzN8fPcIw9OS4bOdjNZf8gAZI0GPM3mvL/KBQ7VLxEkrzYUll34q1bCR6F1 uFzA== X-Gm-Message-State: AHYfb5gQcH5tper2PS7pdG+gfhsRF1a7KvRsHXz/mhKPWv4hFXt6klee fQUMFtqaF6msJnua X-Received: by 10.28.169.65 with SMTP id s62mr1037382wme.189.1503652073590; Fri, 25 Aug 2017 02:07:53 -0700 (PDT) Received: from localhost.localdomain (93-82-124-36.adsl.highway.telekom.at. [93.82.124.36]) by smtp.gmail.com with ESMTPSA id 52sm5782547wrt.38.2017.08.25.02.07.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Aug 2017 02:07:52 -0700 (PDT) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH V3 11/23] drm/etnaviv: clear alloced event Date: Fri, 25 Aug 2017 11:07:10 +0200 Message-Id: <20170825090722.14745-12-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170825090722.14745-1-christian.gmeiner@gmail.com> References: <20170825090722.14745-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 1f5e6b3e1027..b65d7b9d247a 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1164,6 +1164,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); } @@ -1360,7 +1361,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;