Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbdG0MHR (ORCPT ); Thu, 27 Jul 2017 08:07:17 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34075 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbdG0MHQ (ORCPT ); Thu, 27 Jul 2017 08:07:16 -0400 From: Arvind Yadav To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] mm: slub: constify attribute_group structures. Date: Thu, 27 Jul 2017 17:36:26 +0530 Message-Id: <1501157186-3749-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: 669 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/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 1d3f983..72af363 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5423,7 +5423,7 @@ static void clear_stat(struct kmem_cache *s, enum stat_item si) NULL }; -static struct attribute_group slab_attr_group = { +static const struct attribute_group slab_attr_group = { .attrs = slab_attrs, }; -- 1.9.1