Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751546AbdG0MHF (ORCPT ); Thu, 27 Jul 2017 08:07:05 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34021 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbdG0MHD (ORCPT ); Thu, 27 Jul 2017 08:07:03 -0400 From: Arvind Yadav To: akpm@linux-foundation.org, mingo@kernel.org, minchan@kernel.org, imbrenda@linux.vnet.ibm.com, kirill.shutemov@linux.intel.com, mhocko@suse.com, aarcange@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] mm: ksm: constify attribute_group structures. Date: Thu, 27 Jul 2017 17:36:07 +0530 Message-Id: <1501157167-3706-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501157167-3706-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1501157167-3706-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 666 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/ksm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/ksm.c b/mm/ksm.c index 4dc92f1..0c927e3 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -3042,7 +3042,7 @@ static ssize_t full_scans_show(struct kobject *kobj, NULL, }; -static struct attribute_group ksm_attr_group = { +static const struct attribute_group ksm_attr_group = { .attrs = ksm_attrs, .name = "ksm", }; -- 1.9.1