panfrost: Kill a useless memset(0) in panfrost_create_context()
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 14 Sep 2019 06:05:46 +0000 (08:05 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 18 Sep 2019 08:27:47 +0000 (10:27 +0200)
ctx is allocated with rzalloc() which takes care of zero-ing the memory
region. No need to call memset(0) on top.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c

index 06a12662dd36f0e1c8131dca703dbfa8846fc24d..323a4809036589ea5cf1f90c7a3bb4d4f3434bc6 100644 (file)
@@ -2628,7 +2628,6 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
 {
         struct panfrost_context *ctx = rzalloc(screen, struct panfrost_context);
         struct panfrost_screen *pscreen = pan_screen(screen);
-        memset(ctx, 0, sizeof(*ctx));
         struct pipe_context *gallium = (struct pipe_context *) ctx;
 
         ctx->is_t6xx = pscreen->gpu_id < 0x0700; /* Literally, "earlier than T700" */