Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751113AbdG0MHx (ORCPT ); Thu, 27 Jul 2017 08:07:53 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34823 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbdG0MHw (ORCPT ); Thu, 27 Jul 2017 08:07:52 -0400 From: Arvind Yadav To: akpm@linux-foundation.org, minchan@kernel.org, vbabka@suse.cz, kirill.shutemov@linux.intel.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] mm: page_idle: constify attribute_group structures. Date: Thu, 27 Jul 2017 17:37:01 +0530 Message-Id: <1501157221-3832-1-git-send-email-arvind.yadav.cs@gmail.com> 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: 752 Lines: 24 attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- mm/page_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_idle.c b/mm/page_idle.c index 1b0f48c..4bd03a8 100644 --- a/mm/page_idle.c +++ b/mm/page_idle.c @@ -204,7 +204,7 @@ static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, NULL, }; -static struct attribute_group page_idle_attr_group = { +static const struct attribute_group page_idle_attr_group = { .bin_attrs = page_idle_bin_attrs, .name = "page_idle", }; -- 1.9.1