Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752223AbdGaNmE (ORCPT ); Mon, 31 Jul 2017 09:42:04 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:38175 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbdGaNmC (ORCPT ); Mon, 31 Jul 2017 09:42:02 -0400 MIME-Version: 1.0 In-Reply-To: <5c9063817d021c487f3429a4fee60fa84e0e93d6.1499251467.git.arvind.yadav.cs@gmail.com> References: <5c9063817d021c487f3429a4fee60fa84e0e93d6.1499251467.git.arvind.yadav.cs@gmail.com> From: Linus Walleij Date: Mon, 31 Jul 2017 15:42:00 +0200 Message-ID: Subject: Re: [PATCH] input: keyboard: constify attribute_group structures. To: Arvind Yadav Cc: Dmitry Torokhov , Geert Uytterhoeven , Linux Input , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 737 Lines: 20 On Wed, Jul 5, 2017 at 12:46 PM, Arvind Yadav wrote: > attribute_groups are not supposed to change at runtime. All functions > working with attribute_groups provided by work with const > attribute_group. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 5693 464 0 6157 180d drivers/input/keyboard/gpio_keys.o > > File size After adding 'const': > text data bss dec hex filename > 5749 400 0 6149 1805 drivers/input/keyboard/gpio_keys.o > > Signed-off-by: Arvind Yadav Acked-by: Linus Walleij Yours, Linus Walleij