Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751601AbdI3Qb4 (ORCPT ); Sat, 30 Sep 2017 12:31:56 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34566 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbdI3Qby (ORCPT ); Sat, 30 Sep 2017 12:31:54 -0400 X-Google-Smtp-Source: AOwi7QAW9bB/kYq65B3Cz9aXQjUofizmNumS3odqIEJVr0l3IN+PhuQp7POYueKcGaKm1ItY+wFBLw== From: Bhumika Goyal To: julia.lawall@lip6.fr, dhowells@redhat.com, linux-cachefs@redhat.com, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] FS-Cache: make fscache_fsdef_netfs_def const Date: Sat, 30 Sep 2017 22:01:44 +0530 Message-Id: <1506789104-9155-1-git-send-email-bhumirks@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: 1347 Lines: 39 Make fscache_fsdef_netfs_def const as it is only stored in a const field of a fscache_cookie structure. Make the declaration const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal --- fs/fscache/fsdef.c | 2 +- fs/fscache/internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fscache/fsdef.c b/fs/fscache/fsdef.c index 5a117df..7c86f37 100644 --- a/fs/fscache/fsdef.c +++ b/fs/fscache/fsdef.c @@ -68,7 +68,7 @@ struct fscache_cookie fscache_fsdef_index = { * a specific netfs and only applicable to a particular version of the index * structure used by that netfs. */ -struct fscache_cookie_def fscache_fsdef_netfs_def = { +const struct fscache_cookie_def fscache_fsdef_netfs_def = { .name = "FSDEF.netfs", .type = FSCACHE_COOKIE_TYPE_INDEX, .get_key = fscache_fsdef_netfs_get_key, diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index 97ec451..d485473 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h @@ -55,7 +55,7 @@ extern struct fscache_cache *fscache_select_cache_for_object( * fsdef.c */ extern struct fscache_cookie fscache_fsdef_index; -extern struct fscache_cookie_def fscache_fsdef_netfs_def; +extern const struct fscache_cookie_def fscache_fsdef_netfs_def; /* * histogram.c -- 1.9.1