Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp736680pxb; Tue, 14 Sep 2021 07:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9/BjqIN9wCrMSzO/zBG2c6dM0XsANLRH7xZVDyYZXCtFhSG/yNNb628oKK1IvXe091prP X-Received: by 2002:a05:6512:1105:: with SMTP id l5mr5548351lfg.30.1631630530887; Tue, 14 Sep 2021 07:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631630530; cv=none; d=google.com; s=arc-20160816; b=irrC6NatbMVkVbRmZdOIRmXhiVyCSHpR+cL1V1i58YKOv996PUFog2+2M4TZ+XFiVi xwo+sr7ZBP8bjwSb39dx03jHGnp4a8ckVv+pXjyLVqKPdFi+BG3O6PQDvY6zqkMfY3kQ WcujGzcZN3ZicC1N4eZoWKCrn/Uvbwm70SNEgc2GQjuqMiPTCegp/xR3nUAYfIcTcsWp f0GkEAfG87Wu15cihOnOj6CBvsD8XEgecYrAbRa9Mz22W1sDrI61zkxamH8tIC5DKJkJ JphOWVvCeGEQA0NRS7VavPNsm7dQlx4qpn3hAu2+zQOmBRy/2Y5/KiFJg13ahl5lOzR1 7wPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ve2UvodPd/ERxvUNbdjftni0/tRn4cOAty/C4CukpLM=; b=uv64I/ZDbk4iX5sN5J8HVYpdAiNiRHQf/8EZT+S6x29Dz3L9qoumNjIkQtfTR9/Km1 BctiE09IoRCWFlIHjG8XLC/IMsUHL29U2wlIe1iZOhP9ErRom8j62gtwks81RxuaU1mc Ez9+QbxGiTN1rlV/OnS7TZDCYBB7/EPizNMwTu8CRAyGDSGRktU/JkyuYVWjpmzWH41U QuMt7hquCfpfJ20wtbksg+P28FzVvJEvepvfTQaVPDQD6TYRwCmyikzjE3QkhMzADNms x+BDOkwjOQr22hVncILKcrNN0+ip+XMSV+6ZBlfzqjUV9vt4fgtXlNwrcApX7/M26biq gq8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si11521349ljf.575.2021.09.14.07.41.43; Tue, 14 Sep 2021 07:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233713AbhINOkf (ORCPT + 99 others); Tue, 14 Sep 2021 10:40:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233934AbhINOkI (ORCPT ); Tue, 14 Sep 2021 10:40:08 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8785AC0617AB for ; Tue, 14 Sep 2021 07:38:44 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:d46f:7eb5:4a37:9d14]) by baptiste.telenet-ops.be with bizsmtp id tqeg250092aSKa101qeghD; Tue, 14 Sep 2021 16:38:42 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mQ9a3-004VGv-Ml; Tue, 14 Sep 2021 16:38:39 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mQ9a2-0028yv-OB; Tue, 14 Sep 2021 16:38:38 +0200 From: Geert Uytterhoeven To: Robin van der Gracht , Miguel Ojeda , Rob Herring , Paul Burton Cc: Greg Kroah-Hartman , Pavel Machek , Marek Behun , devicetree@vger.kernel.org, linux-leds@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v6 10/19] auxdisplay: ht16k33: Use HT16K33_FB_SIZE in ht16k33_initialize() Date: Tue, 14 Sep 2021 16:38:26 +0200 Message-Id: <20210914143835.511051-11-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210914143835.511051-1-geert@linux-m68k.org> References: <20210914143835.511051-1-geert@linux-m68k.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the existing HT16K33_FB_SIZE definition instead of open-coding the same calculation using an hardcoded value. While at it, restore reverse Christmas tree variable declaration order. Signed-off-by: Geert Uytterhoeven Acked-by: Robin van der Gracht --- v6: - No changes, v5: - No changes, v4: - No changes, v3: - No changes, v2: - Add Acked-by. --- drivers/auxdisplay/ht16k33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index 2b630e194570f6e5..99daf1974980b435 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -168,9 +168,9 @@ static void ht16k33_fb_update(struct work_struct *work) static int ht16k33_initialize(struct ht16k33_priv *priv) { + uint8_t data[HT16K33_FB_SIZE]; uint8_t byte; int err; - uint8_t data[HT16K33_MATRIX_LED_MAX_COLS * 2]; /* Clear RAM (8 * 16 bits) */ memset(data, 0, sizeof(data)); -- 2.25.1