Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbdF2Khz (ORCPT ); Thu, 29 Jun 2017 06:37:55 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35696 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbdF2Khw (ORCPT ); Thu, 29 Jun 2017 06:37:52 -0400 From: Arvind Yadav To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: hda: constify attribute_group structures. Date: Thu, 29 Jun 2017 16:07:01 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1057 Lines: 32 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 995 608 0 1603 643 sound/pci/hda/hda_sysfs.o File size After adding 'const': text data bss dec hex filename 1035 544 0 1579 62b sound/pci/hda/hda_sysfs.o Signed-off-by: Arvind Yadav --- sound/pci/hda/hda_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_sysfs.c b/sound/pci/hda/hda_sysfs.c index 9739fce..9b7efec 100644 --- a/sound/pci/hda/hda_sysfs.c +++ b/sound/pci/hda/hda_sysfs.c @@ -761,7 +761,7 @@ int snd_hda_load_patch(struct hda_bus *bus, size_t fw_size, const void *fw_buf) NULL }; -static struct attribute_group hda_dev_attr_group = { +static const struct attribute_group hda_dev_attr_group = { .attrs = hda_dev_attrs, }; -- 1.9.1