From patchwork Wed Jul 12 11:43: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: 9836535 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 6BDC4602D8 for ; Wed, 12 Jul 2017 11:43:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AB93285A8 for ; Wed, 12 Jul 2017 11:43:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F22F285DB; Wed, 12 Jul 2017 11:43:55 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC54D285A8 for ; Wed, 12 Jul 2017 11:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756552AbdGLLnx (ORCPT ); Wed, 12 Jul 2017 07:43:53 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34799 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756401AbdGLLnw (ORCPT ); Wed, 12 Jul 2017 07:43:52 -0400 Received: by mail-pg0-f67.google.com with SMTP id j186so2734129pge.1; Wed, 12 Jul 2017 04:43:52 -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=OxFOyZpx0PIJS0jmaTnm7UIUbLRz9wOtXUNFV9M6MCM=; b=msKVOjmvx8w0vnXKPMs8HUNOPMyK1xjl7kwYRAprweRNvRgwc1YcEKKMbPclgsBFgC JCfU8jn9ZitQsafRN+znnYIahViU4hXrS+5D0TgsXYLo59I00s1M/N01SOsR+Xl+6vw8 ZUMtjrWRU5J/KCBOenKj/jqvVb7X//rL0JzFZKvzbRO1vPYQXcvY1Dt68pNvdBghok9F QirXx7gNQB8rUU5q77RhcEYvETySxYL/vKLj0C9QyyMJC/XX0MYy3iMn+ahgi6LtJyv1 dh+t9cqrkdSjxZf7FSOoTbUeGmDm7TY0esKmnUbaAiO6zAW+14GDPouSOD848cFTKdvB PGDw== 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=OxFOyZpx0PIJS0jmaTnm7UIUbLRz9wOtXUNFV9M6MCM=; b=aOl3+SF1EDle77ID5wfXpT5Jv8z3a7C+U9GjJHnXDK+eYvq34brOWj3QP0f1lYvAl3 on2VFJmQSbBMine6+paG66fVBlGSVrtTllk+p1DvG4W++C1d1SiMBcfN/k7cq5Nromwj IcQ7kq6wBZXGgRDmK1dZYtKK6alxtG5oxxAbJ66eI3Ia1OfEWiFI6UUjFRooWgRfbkKN ZUh98j10aOwXrpWxLYb2UHAa3jCKPPmQqHXcQTTb+gc79qltpPH7OkMOG4cjemNl9us+ P8BDPBZK0lHqD+qyxbNh0g90tcoLgFJVcpG5LWnotW1vNeaH6e5yjXNqMrP5NG2VlqPV qIiQ== X-Gm-Message-State: AIVw112C85lyUoG+whTsoKZTF/+NNY9gdTiTOogfhD29ilBDqYL6ejH1 Fn+hVbBln0NXlQ== X-Received: by 10.101.72.207 with SMTP id o15mr3459576pgs.73.1499859832212; Wed, 12 Jul 2017 04:43:52 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id w20sm4590306pgc.34.2017.07.12.04.43.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 04:43:50 -0700 (PDT) From: Arvind Yadav To: sre@kernel.org, sebastian.reichel@collabora.co.uk Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] power: supply: constify attribute_group structures. Date: Wed, 12 Jul 2017 17:13:22 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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 2673 400 0 3073 c01 power/supply/pcf50633-charger.o File size After adding 'const': text data bss dec hex filename 2737 336 0 3073 bed power/supply/pcf50633-charger.o Signed-off-by: Arvind Yadav --- drivers/power/supply/pcf50633-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/pcf50633-charger.c b/drivers/power/supply/pcf50633-charger.c index b3c1873..1ad7ccc 100644 --- a/drivers/power/supply/pcf50633-charger.c +++ b/drivers/power/supply/pcf50633-charger.c @@ -254,7 +254,7 @@ static ssize_t set_chglim(struct device *dev, NULL, }; -static struct attribute_group mbc_attr_group = { +static const struct attribute_group mbc_attr_group = { .name = NULL, /* put in device directory */ .attrs = pcf50633_mbc_sysfs_entries, };