From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 72489C433E7 for ; Sat, 17 Oct 2020 06:13:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31B6020760 for ; Sat, 17 Oct 2020 06:13:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437022AbgJQGNA (ORCPT ); Sat, 17 Oct 2020 02:13:00 -0400 Received: from smtprelay0076.hostedemail.com ([216.40.44.76]:54918 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2436889AbgJQGM7 (ORCPT ); Sat, 17 Oct 2020 02:12:59 -0400 Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave01.hostedemail.com (Postfix) with ESMTP id A74F018014A05; Sat, 17 Oct 2020 00:13:25 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id C580C1802926E; Sat, 17 Oct 2020 00:11:46 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: act27_2117f0927221 X-Filterd-Recvd-Size: 1735 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA; Sat, 17 Oct 2020 00:11:45 +0000 (UTC) Message-ID: <09cd7e609324d460afdf14829baf3c2f1a9cb9cd.camel@perches.com> Subject: Re: [PATCH] staging: wfx: make a const array static, makes object smaller From: Joe Perches To: Colin King , =?ISO-8859-1?Q?J=E9r=F4me?= Pouiller , Greg Kroah-Hartman , devel@driverdev.osuosl.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 16 Oct 2020 17:11:44 -0700 In-Reply-To: <20201016223303.687278-1-colin.king@canonical.com> References: <20201016223303.687278-1-colin.king@canonical.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-10-16 at 23:33 +0100, Colin King wrote: > From: Colin Ian King > > Don't populate const array filter_ies on the stack but instead > make it static. Makes the object code smaller by 261 bytes. > > Before: > text data bss dec hex filename > 21674 3166 448 25288 62c8 drivers/staging/wfx/sta.o > > After: > text data bss dec hex filename > 21349 3230 448 25027 61c3 drivers/staging/wfx/sta.o Thanks. It's odd to me it's so large a change as it's only 24 bytes of initialization. (3 entries, each 8 bytes) This line in the same function: hif_set_beacon_filter_table(wvif, 3, filter_ies); might as well use ARRAY_SIZE(filter_ies) instead of 3