From patchwork Thu Jun 29 11:28:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9816453 X-Patchwork-Delegate: rjw@sisk.pl 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 94C19603D7 for ; Thu, 29 Jun 2017 11:29:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8774828689 for ; Thu, 29 Jun 2017 11:29:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BFC5286F4; Thu, 29 Jun 2017 11:29:34 +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 1CD2C28689 for ; Thu, 29 Jun 2017 11:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbdF2L3c (ORCPT ); Thu, 29 Jun 2017 07:29:32 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33711 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdF2L3c (ORCPT ); Thu, 29 Jun 2017 07:29:32 -0400 Received: by mail-pf0-f193.google.com with SMTP id e199so12786113pfh.0; Thu, 29 Jun 2017 04:29:31 -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=xGfpI7+PZ+6am4lxSoDlKLdK4TYaZVmlgHfTHObY/Jk=; b=UXB5DNA6i3rDhtFtlFa/gG9o9LrG0M452wjIGg2cDNhbK9n070/fqjlYVBokUqBtIj qp2QZaw2PrFrY+GL3SNHO0isOdzujIl0ImsMdUoCaDy8BIDz0rxtZtRABDNCFBEOilG5 GapLD/upf5qQc7jlx3kvRwHqBtno/7ok+8nObmJD7SJojkc2r5MGaIst31iwRpJfFwm8 k4NuUc2kuTJJfmj13h9vJSRhOVLJ2AzUrQhzWyu6LGqkILLwqVirNRlOhJzVwHTdsDuL j4xSfiGZ3gtS8p4W4SZqOmHwQPY9bVYQiVuOgK+sHcN/v6zCeKrbXFjWyUp+LUpPsngt woig== 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=xGfpI7+PZ+6am4lxSoDlKLdK4TYaZVmlgHfTHObY/Jk=; b=OBZKXWv7E0RZSPOVZZ+0aLv7uhS3iKCzEIuYpoOtYCGyF1JA8PA8+RNXiPw3+8A1/a I9yPzKjFFB74D9JHPgF559vYHlz4ONliLlIr3PCQIDNMBtV4fXiKFlkOZdAxVUbezrGc nbHyxoSzLwq/q6EPEdGv8sMHxbFhosval/Ji1DFicFK94f+woEfgNs2yXT4hK5NN2ZRp T6wlEk+FsMpWZcILZeztco/qya0Xo0JsTblu7lH0h5QRl6GXm8RrlkTQVI/X03BxjAcp peWIcjeXxs+I4+tbSx0Y1dlbySnCsK2+r6CjAtzw0/jrI1RSYxXGwuWTQsZ3En63GiC1 UgCA== X-Gm-Message-State: AKS2vOzH/zv5wi5jR58Mcy9uFQ4eOGpgot4C1z5nKZZO/s1Ua3OzKuFv Pfp15vN+WxenWQ== X-Received: by 10.84.218.8 with SMTP id q8mr17257561pli.59.1498735771436; Thu, 29 Jun 2017 04:29:31 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id k73sm12449604pge.13.2017.06.29.04.29.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 04:29:30 -0700 (PDT) From: Arvind Yadav To: rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PM: hibernate: constify attribute_group structures. Date: Thu, 29 Jun 2017 16:58:40 +0530 Message-Id: <06cb04785b169107e86016267fd52b414e46efaa.1498735541.git.arvind.yadav.cs@gmail.com> 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 6332 488 308 7128 1bd8 kernel/power/hibernate.o File size After adding 'const': text data bss dec hex filename 6396 424 308 7128 1bd8 kernel/power/hibernate.o Signed-off-by: Arvind Yadav Acked-by: Pavel Machek --- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index a8b978c..e1914c7 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -1108,7 +1108,7 @@ static ssize_t reserved_size_store(struct kobject *kobj, }; -static struct attribute_group attr_group = { +static const struct attribute_group attr_group = { .attrs = g, };