From patchwork Thu Jan 24 20:45:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Tull X-Patchwork-Id: 10780133 X-Patchwork-Delegate: atull@kernel.org 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 8A26514E5 for ; Thu, 24 Jan 2019 20:46:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 791F82F966 for ; Thu, 24 Jan 2019 20:46:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CF252F97C; Thu, 24 Jan 2019 20:46:15 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F03612F966 for ; Thu, 24 Jan 2019 20:46:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727771AbfAXUqI (ORCPT ); Thu, 24 Jan 2019 15:46:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:52546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727664AbfAXUqE (ORCPT ); Thu, 24 Jan 2019 15:46:04 -0500 Received: from atull-730U3E-740U3E.fm.intel.com (unknown [192.55.54.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22871218F0; Thu, 24 Jan 2019 20:46:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548362763; bh=33B3tHv3KBJZmutUadt0ldtSw/Pke2WuM4YHA/JcnuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7gl8auOYSxqSpqQbwnOXoMHj421HiAtkVQeaVr4ltVK3GRXq7CEcLIfUX2iC285J DVT0BAyPhBTZtKZan8p231mMpBevE5HELMHG/+DGobGxwWWcMAeXbPHOPinHU9sLKQ EQdsPwsVBxCf3ApVYuobDopokAmA4DW2QPc9ehEk= From: Alan Tull To: Greg Kroah-Hartman Cc: Moritz Fischer , Dinh Nguyen , Alan Tull , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, Colin Ian King Subject: [PATCH 3/3] fpga: mgr: altera-ps-spi: make array dummy static, shrinks object size Date: Thu, 24 Jan 2019 14:45:54 -0600 Message-Id: <20190124204554.5438-4-atull@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124204554.5438-1-atull@kernel.org> References: <20190124204554.5438-1-atull@kernel.org> MIME-Version: 1.0 Sender: linux-fpga-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King Don't populate the const array dummy on the stack but instead make it static. Makes the object code smaller by 26 bytes: Before: text data bss dec hex filename 7371 2032 0 9403 24bb drivers/fpga/altera-ps-spi.o After: text data bss dec hex filename 7281 2096 0 9377 24a1 drivers/fpga/altera-ps-spi.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Acked-by: Alan Tull Acked-by: Moritz Fischer --- drivers/fpga/altera-ps-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fpga/altera-ps-spi.c b/drivers/fpga/altera-ps-spi.c index 8c18bee..678d011 100644 --- a/drivers/fpga/altera-ps-spi.c +++ b/drivers/fpga/altera-ps-spi.c @@ -205,7 +205,7 @@ static int altera_ps_write_complete(struct fpga_manager *mgr, struct fpga_image_info *info) { struct altera_ps_conf *conf = mgr->priv; - const char dummy[] = {0}; + static const char dummy[] = {0}; int ret; if (gpiod_get_value_cansleep(conf->status)) {