Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp586759pxb; Thu, 19 Aug 2021 06:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzktZwWIEzBCBEiQY7XdpAldvWTdv0s+Rv7HpVJgqO6eMwiyenxVWABXEpQ3QCJ7QVGhtK5 X-Received: by 2002:a17:906:4fd6:: with SMTP id i22mr15976005ejw.92.1629380691785; Thu, 19 Aug 2021 06:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629380691; cv=none; d=google.com; s=arc-20160816; b=LogB6JjrqzxcEMFNUv43TNeE3d/aXcEyzuYq1bh4lw7j1lwL4CimLZjdpXE1tj98HQ tMo6LF7FUPCiQjauaxGPTGRIN0/EJPAioSh5cSGUOX/m5ogTRlzmRQHXxPExk3dZuJPq kwtAKSSFrGV9x6yXuBUoQ74Krfm9NyFPX011RCDopRzpMZoYzZKiStYn8xPucz4NujQA LQMjZeOtQ/jHZmvfbSlqdlV848FXpYqKu7Usi6JCNpRU3Zw71TZlkcdSUaiWLF8KhE6H MxngrmxMTE5/f5HzOEDQIQKNbFXxSKAbdX2Ui+54c93agCweatdlhr4IsAmVQi1JN5FW F44Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uDY6JrKLk8FztgRxaD2qoQzFWUTC3bULwnHL6dWM7q0=; b=Z5VsCNtmQSOJFrZpjzjKDVQwhWsfKEaas1buM5ISHqkd+0QZ49OUrzYeMEBTTnGrHN 4YzWkWUK18CWvHzWcaEzrGi/MC8/kMOZ2wWsd3oW+s6Q5zxXZuERd0td0ANQgrQ229X/ Xu9LTr6yuRq0gROyR7va7McKhIqvvpCHLnr0FbOoxPA9Kt3oNziUl5C6UakYCFEoKOIX oKvjTkw1EA0QCedH8LTXwMpxDlooBksWaxI2uySqUiPwgz5ccqWjOE6z71JgBItQWrvX /FuXW9mbPEfoUZiQ01eDLIET/oIXMul16xLiEG/lVaMuZLoOOSlhoDRjlFHQkNeCLCJ9 pQKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pKp4W5jJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ar2si3618377ejc.561.2021.08.19.06.44.09; Thu, 19 Aug 2021 06:44:51 -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; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pKp4W5jJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239919AbhHSNjS (ORCPT + 99 others); Thu, 19 Aug 2021 09:39:18 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:42712 "EHLO smtp-relay-canonical-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238463AbhHSNjR (ORCPT ); Thu, 19 Aug 2021 09:39:17 -0400 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 445B63F33E; Thu, 19 Aug 2021 13:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1629380320; bh=uDY6JrKLk8FztgRxaD2qoQzFWUTC3bULwnHL6dWM7q0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=pKp4W5jJWQh7i2c+8UZYOJcyQWX8Z2yW81NoyiyYlmjK8k7J6w+s2mzAtAEnzQXSJ dKzfSeinMyIJ62VG2JLd0mU8pPueIY24igg97mds7yQTSqRosIrZaP+lheQBmZ7qeg ko4ZdjGl5GaAloudfYu1Jpz93mA1Gq9MtbGEZZxzj5XBwELXY1ghtVWny1NGvnFZr0 mvz6MBALFiBlCX2J+D0hAPXTdBP1WG1Mm6467lgCwzQcDIOcGcttxgpZ4jHBrOHETc jtTED9P0XY1MqmK8GVJWsLuYk1WNTf5OE2HT33thN3vHH1OTreYNpm+S0gBx5UdnCw L5y/DYYKjxuBw== From: Colin King To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/bridge/tc358767: make the array ext_div static const, makes object smaller Date: Thu, 19 Aug 2021 14:38:39 +0100 Message-Id: <20210819133839.10745-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Don't populate the array ext_div on the stack but instead it static const. Makes the object code smaller by 118 bytes: Before: text data bss dec hex filename 39449 17500 128 57077 def5 ./drivers/gpu/drm/bridge/tc358767.o After: text data bss dec hex filename 39235 17596 128 56959 de7f ./drivers/gpu/drm/bridge/tc358767.o (gcc version 10.3.0) Signed-off-by: Colin Ian King --- drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 23a6f90b694b..599c23759400 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -468,7 +468,7 @@ static int tc_pxl_pll_en(struct tc_data *tc, u32 refclk, u32 pixelclock) int div, best_div = 1; int mul, best_mul = 1; int delta, best_delta; - int ext_div[] = {1, 2, 3, 5, 7}; + static const int ext_div[] = {1, 2, 3, 5, 7}; int best_pixelclock = 0; int vco_hi = 0; u32 pxl_pllparam; -- 2.32.0