Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9789068imu; Sun, 30 Dec 2018 05:27:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN7gGGaK6ha3myeI5IxTLxTpYc1r1ysa8XLuEX1PFgyBIhcERzr+MQpwI4S6Q3JxSfbpiloW X-Received: by 2002:a63:26c1:: with SMTP id m184mr4234242pgm.367.1546176472664; Sun, 30 Dec 2018 05:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546176472; cv=none; d=google.com; s=arc-20160816; b=meKUhU+WscwiyFybP9y8pqbRxMZ9pqeAimDJH7HjENskl3JBkMTxh7S5RN6OpVgiuJ gb32vAtDJ2i9ztaM7zmDYDm9OJXvAdr2XiGrB+le8IDLrmkaBxJPpxT8xFiYynImIX9G 253dx9+p8yIiGnLZE3Z95XaJrQZZrr2J3X2vCLwM0Wf5PYAMQR+3Qm1kgcuwIAm75H/d Dt/vwBv4KDmpqayUIUwgjYaZlF4icsZOC2XBCe+mooY9/kvFuBKt46U5YksR1DIGlmYB ADpw86u1gnjagAozwceVXmI9M+R/wl+puPaRbSY4aKSwKh0iKUPAGixcLHthJV4S03zd bNVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+y1fHx2mRKQZ7Xz0jvPVkIUkF7392OYboeflpDiHAEE=; b=oU6dXsiU2AVTohyyX7cSep+Xl5oTN06kop12m6soYKp+ii+DqESf6nXddNovfnG6BD lf6UGs578zCgV3P4dDo3f1epKsIdd/pYp/B9PjFkoj02v3CQE2OWGSLv4XY3mttTqlPj Dz52CbNvOyfDA/Lt3HvCLb+1qL3/qUhr/4Kj1qYsUnXo15pa+8Kq0a2XTQqdUhtPUtYx OIFU7SJCjYivTMNGMXUoEAd/AAyOqCpfYSpXYi1BBw1PMW1hqocR6Guiatotw7z1GZY4 1QHGqtz/FYxEQaEOhGLDRcTGM8OgxIFeEh9ds9aHOaxegjPtw4dqLizqAylK9g0+uX/6 dv/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si40702464plk.333.2018.12.30.05.27.36; Sun, 30 Dec 2018 05:27:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726156AbeL3N0s (ORCPT + 99 others); Sun, 30 Dec 2018 08:26:48 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:51028 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbeL3N0r (ORCPT ); Sun, 30 Dec 2018 08:26:47 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gdb73-0002Oz-B4; Sun, 30 Dec 2018 13:26:41 +0000 From: Colin King To: Felix Fietkau , Lorenzo Bianconi , Kalle Valo , "David S . Miller" , Matthias Brugger , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mt76: make const array 'data' static, shrinks object size Date: Sun, 30 Dec 2018 13:26:40 +0000 Message-Id: <20181230132640.6916-1-colin.king@canonical.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Don't populate the const array 'data' on the stack but instead make it static. Makes the object code smaller by 78 bytes: Before: text data bss dec hex filename 5438 1080 0 6518 1976 mediatek/mt76/mt76x2/usb_mcu.o After: text data bss dec hex filename 5296 1144 0 6440 1928 mediatek/mt76/mt76x2/usb_mcu.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King --- drivers/net/wireless/mediatek/mt76/mt76x2/usb_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_mcu.c index 45a95ee3a415..152d41fe9ff5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_mcu.c @@ -39,7 +39,7 @@ static void mt76x2u_mcu_load_ivb(struct mt76x02_dev *dev) static void mt76x2u_mcu_enable_patch(struct mt76x02_dev *dev) { struct mt76_usb *usb = &dev->mt76.usb; - const u8 data[] = { + static const u8 data[] = { 0x6f, 0xfc, 0x08, 0x01, 0x20, 0x04, 0x00, 0x00, 0x00, 0x09, 0x00, -- 2.19.1