Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3499458pxf; Mon, 22 Mar 2021 07:51:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLRd1eO+e3ncCyvfcasr1pwKvotyWzTabXzDmPG/W1nNG7idLOu2CsEBk1RUIaEZPGPceA X-Received: by 2002:aa7:dc15:: with SMTP id b21mr26178466edu.350.1616424673870; Mon, 22 Mar 2021 07:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616424673; cv=none; d=google.com; s=arc-20160816; b=yc6egtV+xV2ushQ0FdF6/aLtNczLIeSrcaYMxK61D+3fqgw8B2EUM/GZ4ESl+uDLSr P9VrIaBsCTuDF7P0rm2iDFwgzMmHfDPGaQGW0sXPGjxC1NffMtx330txghpYo1lpsea0 woe+V5iA5Ly+KczUapC438RseYLnq4AHBxc5bTa9jURN7d+pFGBw823N41KmKnSO2ZlD U+d2X971wiudMKiHb73/kALIBd+X5dek8TDHjTpPzHEumYsgurHJT9lwkU2x1vFWEqjx LCiCM/7gVhVRl/4qDUefHLT5xQunKoKbnnUy3ZeEfwyADm1PyU4ls2TX3feCghdiRzQf bPIg== 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=DL8AVTmf9iSXBGqCXBlaxDfi6RhGHF6XGYiOQgYSfgU=; b=XgxNV5g1epfnnwGk1kXSrLJ8GrU0gU7V8ku5VvY2Jj/wYe/vReytd+mnzNzYXkuTfs TVCd4MPUZv4by5f5L/KnI6X4I2kC+qsNj5Jt7L4kbzqHmSq9sTeFiJX8V7BmCKM/7UIw DRRbrfPmo9gHlGHRzf1ulctc80kVXbe1X5ziqnaFq6hMkpEK4BYDoiGaSj623C0uvswp EblFh3wWfukZUynznJJ5/AZCLY/RngSqLp8JtWs0AA/RzolssvqrtT6TlOn/EGzI6Xqg KQVgjwvZXpyQpVh4+PJ5OooaM+umjFyK+U7AE9/xTxk62B4Iu8UniYN2XnDhBWHUVBzS FiPQ== 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 w18si11037771ejy.196.2021.03.22.07.50.51; Mon, 22 Mar 2021 07:51:13 -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 S231377AbhCVOuF (ORCPT + 99 others); Mon, 22 Mar 2021 10:50:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbhCVOtB (ORCPT ); Mon, 22 Mar 2021 10:49:01 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C954BC0617AA for ; Mon, 22 Mar 2021 07:48:55 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:250b:f16c:c5e2:505d]) by albert.telenet-ops.be with bizsmtp id jSot240162HDxaV06Sot8F; Mon, 22 Mar 2021 15:48:53 +0100 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 1lOLrR-009ZWK-1B; Mon, 22 Mar 2021 15:48:53 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lOLrP-004T6F-NR; Mon, 22 Mar 2021 15:48:51 +0100 From: Geert Uytterhoeven To: Robin van der Gracht , Rob Herring , Miguel Ojeda , Paul Burton , Greg Kroah-Hartman Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 09/17] auxdisplay: ht16k33: Use HT16K33_FB_SIZE in ht16k33_initialize() Date: Mon, 22 Mar 2021 15:48:40 +0100 Message-Id: <20210322144848.1065067-10-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210322144848.1065067-1-geert@linux-m68k.org> References: <20210322144848.1065067-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 --- 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 1e69cc6d21a0dca2..6d39f12054618fa5 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