From patchwork Wed Jul 3 03:20:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 11028863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 668531398 for ; Wed, 3 Jul 2019 03:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59A0828515 for ; Wed, 3 Jul 2019 03:20:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AC0327F85; Wed, 3 Jul 2019 03:20:32 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 D8D9527F85 for ; Wed, 3 Jul 2019 03:20:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 15BFC6E0C9; Wed, 3 Jul 2019 03:20:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B6406E0C9 for ; Wed, 3 Jul 2019 03:20:28 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id h21so929069qtn.13 for ; Tue, 02 Jul 2019 20:20:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=7uVNIuX8TZXF1pUQf2mXIeFwzdD8EjOAncb++sJiJNU=; b=K+Nt8sV7vhb0HCnKIu/kcla15avutaepxbV+xEm3ex46aBUrggdDwe4rSRPh1Dbc8p 1yKiaHTbsozXtbULkW1tWz2a85oOOWFrmMlcUMoUzwUk1pDyvr1CEPAkAULVXc4pDrJz 5oIIw29ff8rMq4nxNwGpcW3EBOxQ2e9lMAIWUeWQUUb8iEWksBOUeRnEyZTfrphPV/yV IVXn6s/30Mg2qVVSgYgPVYavVGPfnoUj1JSCRYGC34Ygr2sKlvf/ZVDRkTGzu7RwKLlq MUaJrRaZ/4xowm873lveazVI0DPZ6kd6wZdFWg0OxBPHf07Kqc1ZtFmFYhf3j3z2Y2bS gpDQ== X-Gm-Message-State: APjAAAVu3d4I6q5Qc7WjgXxMEv5n8HBI5iuENx8YK6i8+wM3qE8DiZX5 Ix488Oph3bvulXTcbTOhjafpy8L3 X-Google-Smtp-Source: APXvYqyGGJMehi8oviI/S+Y4JLLN/jdSLYbUUQ2L3Cx4qSjijeLtMbueurEXmXVyUztLVrZRdsXq2g== X-Received: by 2002:aed:2961:: with SMTP id s88mr28140095qtd.120.1562124027065; Tue, 02 Jul 2019 20:20:27 -0700 (PDT) Received: from athos.hellosponsor.com (pool-173-68-20-215.nycmny.fios.verizon.net. [173.68.20.215]) by smtp.gmail.com with ESMTPSA id f132sm360426qke.88.2019.07.02.20.20.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2019 20:20:26 -0700 (PDT) From: Ilia Mirkin To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] tests/util: fix incorrect memset argument order Date: Tue, 2 Jul 2019 23:20:23 -0400 Message-Id: <20190703032023.22232-1-imirkin@alum.mit.edu> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7uVNIuX8TZXF1pUQf2mXIeFwzdD8EjOAncb++sJiJNU=; b=MDv1ihxjLPkQpJJZe+umH6SlTNbPN0wc8xXT2mtVVP5qiSq3K2bY83S6FhppomN2yd Bt8yWMzt4PC+69CJCTCHFIg1TCaPzHyMHcZR94QhRiJMooIKirDh9C+2QGOCW/ohcTrx UPSOaiTVCy4lpDIbvH2Tu6ia4+/0gxZMqUrAZBlvZZA6CuQ2YfTj3+weYk8EgtQgwLVB jqmFUuHh1apO0bFn4ZbzLIjatV4i9NGTJYM2aCCq7NASXfr+dMeyIpyojqQGFOH5471J 7KwS/h8ZdlSMG0XXB8HdpQRD/Dmpo1i2oPMxjdy7DF7CS6D0g1q45swSFe+ji8Bq7saV Spqw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Airlie Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make it actually clear the LUT. Reported-by: Dave Airlie Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie --- tests/util/pattern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/pattern.c b/tests/util/pattern.c index 42a0e5c7..bf1797d4 100644 --- a/tests/util/pattern.c +++ b/tests/util/pattern.c @@ -643,7 +643,7 @@ void util_smpte_c8_gamma(unsigned size, struct drm_color_lut *lut) printf("Error: gamma too small: %d < %d\n", size, 7 + 7 + 8); return; } - memset(lut, size * sizeof(struct drm_color_lut), 0); + memset(lut, 0, size * sizeof(struct drm_color_lut)); #define FILL_COLOR(idx, r, g, b) \ lut[idx].red = (r) << 8; \