From patchwork Mon Jul 10 05:37:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9832267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5DAD160363 for ; Mon, 10 Jul 2017 05:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F7322766D for ; Mon, 10 Jul 2017 05:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 330B12843B; Mon, 10 Jul 2017 05:38:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ABE6D2766D for ; Mon, 10 Jul 2017 05:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=kWn/5I4YEWPJ/sbSOOr3/ImAWBPhTcmsrPoU6EeZoK4=; b=rdY G9mvwNOVcYVECiw4hxhLEZJg+c8RO8j7dVUkCwwvAI54lJriAaJXRiHR3gJLwgiAmc9PR7Y7oV7wo xodVwEcw6Z8kOEBElrBFbhx8ufjO8JfaBKb04CYINjD8yOs/G5299ER4hCmJXNW5wH2IKiqsVwNn7 tOHKqI0l8Y47mxW8HlVq1i8wx4wrf3OBqkTsRUlDwUf/Rjc/ubE+F3xchoTSUdu0TbBXWRaXWDPlQ 70RkHcUkACug8lQQWJg5O8PcLVLs0BOTihgIl4Spjj5wVJqkvr+JrwAAxTfNvfX4IYHiJEEMGyyDa tkZ9qLIvPYQoxSJAnicMzKRWkryb31A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dUROi-0006J7-7c; Mon, 10 Jul 2017 05:38:16 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dUROe-0006IC-EQ for linux-arm-kernel@lists.infradead.org; Mon, 10 Jul 2017 05:38:14 +0000 Received: by mail-pf0-x241.google.com with SMTP id q85so13000902pfq.2 for ; Sun, 09 Jul 2017 22:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WhdZ4NEBvz7TJW9qxaxovqKswC6FGU6CwsQbc4SXk9k=; b=YpcZCUMa3JcokgnqHZuxw4iOnQrsYfNDxKpC/ztSkLJA1WYZ5wvJGfIzT3yYImuNhR 0ZijHMb3eSmUHuKjZNGt267w/IJ8UiZHyGr++TOa96rS0a9Ako0xhZFPamIvFz5weORk 959dnLW87ihzIjC5L3fNxDFcWCcM3WcC3G1l1S6VP1bZt+3QVlD1UCuJOzACDAldkKqY T3rXbCYoC/X+flg3Cf01q01na+DFWB72Uf8p9gC8qUPFk+fgqS1BevquUrlGD/2aiZuQ 862XCQIBBx9ZtE9aL9LwJQQbGUgPNXQw2Iz85OQe6ZWezpVutQ5+EcDrbGOV8EgGUytA 5ZJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WhdZ4NEBvz7TJW9qxaxovqKswC6FGU6CwsQbc4SXk9k=; b=LWQ0JCbQxUjHww/yGvbQyMRb5ueazG/U8ATvzOW06aj5/Z+qr+oWGfMOK8uo8NLNzz dFLppRsJ2a4RdXq/uEtBUUTqbMjfUkNTyPHKjiuiq54In+pQDYk388VD7B9BygMWyC2P jrvL058Bvkz64VODlHUcMPCZV8ZHPI1uEXM8Ukp6Z27KVaEyxuowmvt+lR0wfXxqhtiP Tx8rRvjdLKBgS8QQsguyOwgLRrFDjsvz9n1PSBbYjIa3ObwX5fTLc398yJxDc1QVWd3d uobHY3o5u2g0kq+ytMBEn9BfKBkCGd9GwyrYu3jDKrJm0MVDAumLu1G3zgZhCG/Esvh5 BTTw== X-Gm-Message-State: AIVw113H6K4tv6Vt6KxWhly53eUyWIZDhIE9TvZYKBCNvHrM2tnfLAGB 8j/k+ezasmqKLg== X-Received: by 10.99.122.81 with SMTP id j17mr12833418pgn.97.1499665071045; Sun, 09 Jul 2017 22:37:51 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id e131sm18648118pgc.64.2017.07.09.22.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 09 Jul 2017 22:37:49 -0700 (PDT) From: Arvind Yadav To: linus.walleij@linaro.org, lee.jones@linaro.org Subject: [PATCH] mfd: ab8500-core: constify attribute_group structures. Date: Mon, 10 Jul 2017 11:07:22 +0530 Message-Id: <82391b6661b206976c244dcef76946c45c6aac2d.1499664942.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170709_223812_541592_B12EA614 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 16298 1009 184 17491 4453 drivers/mfd/ab8500-core.o File size After adding 'const': text data bss dec hex filename 16490 817 184 17491 4453 drivers/mfd/ab8500-core.o Signed-off-by: Arvind Yadav --- drivers/mfd/ab8500-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 8511c06..30d09d1 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -1059,15 +1059,15 @@ static DEVICE_ATTR(dbbrstn, S_IRUGO | S_IWUSR, NULL, }; -static struct attribute_group ab8500_attr_group = { +static const struct attribute_group ab8500_attr_group = { .attrs = ab8500_sysfs_entries, }; -static struct attribute_group ab8505_attr_group = { +static const struct attribute_group ab8505_attr_group = { .attrs = ab8505_sysfs_entries, }; -static struct attribute_group ab9540_attr_group = { +static const struct attribute_group ab9540_attr_group = { .attrs = ab9540_sysfs_entries, };