From patchwork Sun Aug 1 15:22:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 490638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6840EC4320A for ; Sun, 1 Aug 2021 15:22:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DEE1610CC for ; Sun, 1 Aug 2021 15:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232168AbhHAPWZ (ORCPT ); Sun, 1 Aug 2021 11:22:25 -0400 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]:57044 "EHLO smtp-relay-canonical-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbhHAPWY (ORCPT ); Sun, 1 Aug 2021 11:22:24 -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-1.canonical.com (Postfix) with ESMTPSA id 5D2693F070; Sun, 1 Aug 2021 15:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627831335; bh=w+wGUm1NI/CIm3eVzRJyzEgQ0VdS9CAG+ZtRdqquIQo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=JOkVQxFYQSpxpfrVUkdH7muU3m4A3mfIlCo5olfFPQKSu+HimSI/ce29TnadKGH43 rvOavqDKh6ozCAyhbPdG6Rb3oChuhj5E4SNPNvy5SiVs6JB+rq3+ngzWVVB6/4g3LO TOW2Z9uTQhesWJ86Vj1Z5efqgZPZcWUsMkZ9mWn1sGwa706OscboQVC9HB5OgAPRTc n+ie77fGyDOhBsSJszwpI3FHOj6GTVy7cEW7H1tmuPs5LEKFQTRHkYxH0rW8UW6zWf FSydWUIIX0+9TH1i55oJAcbOAkXSTth0oVyLG8zAn35+oMHwT/X5b8gb8bRPfs7vOk qaAUHW4oSdY3g== From: Colin King To: Ioana Ciornei , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dpaa2-eth: make the array faf_bits static const, makes object smaller Date: Sun, 1 Aug 2021 16:22:09 +0100 Message-Id: <20210801152209.146359-1-colin.king@canonical.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Colin Ian King Don't populate the array faf_bits on the stack but instead it static const. Makes the object code smaller by 175 bytes. Before: text data bss dec hex filename 9645 4552 0 14197 3775 ../freescale/dpaa2/dpaa2-eth-devlink.o After: text data bss dec hex filename 9406 4616 0 14022 36c6 ../freescale/dpaa2/dpaa2-eth-devlink.o (gcc version 10.2.0) Signed-off-by: Colin Ian King --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c index 833696245565..8e09f65ea295 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c @@ -68,7 +68,7 @@ dpaa2_eth_dl_trap_item_lookup(struct dpaa2_eth_priv *priv, u16 trap_id) struct dpaa2_eth_trap_item *dpaa2_eth_dl_get_trap(struct dpaa2_eth_priv *priv, struct dpaa2_fapr *fapr) { - struct dpaa2_faf_error_bit { + static const struct dpaa2_faf_error_bit { int position; enum devlink_trap_generic_id trap_id; } faf_bits[] = {