lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170831124730.27047-1-colin.king@canonical.com>
Date:   Thu, 31 Aug 2017 13:47:30 +0100
From:   Colin King <colin.king@...onical.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-input@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] input: byd: make array seq static, reduces object code size

From: Colin Ian King <colin.king@...onical.com>

Don't populate the array seq on the stack, instead make it static.
Makes the object code smaller by over 1100 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
   6152	   1216	     64	   7432	   1d08	drivers/input/mouse/byd.o

After:
   text	   data	    bss	    dec	    hex	filename
   4974	   1280	     64	   6318	   18ae	drivers/input/mouse/byd.o

Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/input/mouse/byd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/byd.c b/drivers/input/mouse/byd.c
index b27aa637f877..b64b81599f7e 100644
--- a/drivers/input/mouse/byd.c
+++ b/drivers/input/mouse/byd.c
@@ -344,7 +344,7 @@ static int byd_reset_touchpad(struct psmouse *psmouse)
 	u8 param[4];
 	size_t i;
 
-	const struct {
+	static const struct {
 		u16 command;
 		u8 arg;
 	} seq[] = {
-- 
2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ