Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1697921
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/5] mm: slub: constify attribute_group structures. |
| Date | Thu, 27 Jul 2017 14:10:01 +0200 |
| Message-ID | <u7PM5-5VR-9@gated-at.bofh.it> (permalink) |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GDo7pbHOTaIU1F+VIoSDe3RGR26h/JhCxCywRxxcZGM=; b=loWv3AKGyD+S8tYUYIIMyNpJGGK580SEgUoILZ1AkO/EsDHbOoiFWN5Ac8HSfeF/Wr aTLwe7eGUoifcMxr9yEp8V2AsdWGK2s3weJ1yrDOHCh1Ioj7MCbJWArGx5jJmeD6RW4D rq/gDZsoR3v1fmMlhtrbqacLc/kwI26UXqJmkT6KUrR+kE0lOEY0poUSDQ78c+t6RX+r RFpNnRv4vW5lNS/a+UXww9vE5nN4+Y2NvSY523uwaDJzOjKFCMHi0rNUhlnDLBaYs6wU lt0/nivKp5sPGUDi3fsV2C2Trq4VBZSwM0Jc4LF0HMRSIuAakUMCe7HsgZVPRdlkqbNs QEQA== |
| 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=GDo7pbHOTaIU1F+VIoSDe3RGR26h/JhCxCywRxxcZGM=; b=ZYj/+ChfwrPw3ZZPJuyiDIVD2b9rJfNxpJhR4CF2EwvTISp/IaaYGHywYeOoFfL5nd /wD5UGKDqAnTThIRU/iZ0dhlGv8D0JsH5enGGaENT/Zfg73ZX0Jcdzy70LI+MJgJV8FU WdZnOz1SorImslgNv54CrhZ7XjgBIvDj0JpFBViaiRjQVJj8sZdPXGCi1ndd4SmJ3ftB /w/GAMI7VnevpXkZLNYH+El3zKynRJ6KFhkTB2+9LWrxqOWRjWb9w31pM+wBxt+u9GXW iRTFkhhc8HWEYnIxMfa+z5PWvMY8ncKW35R16X1fynvqyRxhAUHdmvqvJVcvFVFeLu6V 90eg== |
| X-Gm-Message-State | AIVw110M/q84ubDMz6UrLAwKq/EqI0qseuBPE89ywMBWMtkJVU1bTVfy 8n34KGc1PJeR6w== |
| X-Received | by 10.99.132.195 with SMTP id k186mr3883976pgd.127.1501157236021; Thu, 27 Jul 2017 05:07:16 -0700 (PDT) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 24 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-mm@kvack.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Thu, 27 Jul 2017 17:36:26 +0530 |
| X-Original-Message-ID | <1501157186-3749-1-git-send-email-arvind.yadav.cs@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1697921 |
Show key headers only | View raw
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/5] mm: slub: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-27 14:10 +0200 Re: [PATCH 2/5] mm: slub: constify attribute_group structures. Christopher Lameter <cl@linux.com> - 2017-07-27 16:40 +0200
csiph-web