From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751514AbdJATOz (ORCPT ); Sun, 1 Oct 2017 15:14:55 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36255 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdJATOy (ORCPT ); Sun, 1 Oct 2017 15:14:54 -0400 X-Google-Smtp-Source: AOwi7QBNbTrlu6zJk/4Zh5tQDc9USkR2DEa4TybvfBqB7aiYp2iisCr2CpcTd3z69kB7/dNo5pZttA== From: Bhumika Goyal To: julia.lawall@lip6.fr, hch@lst.de, keescook@chromium.org, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] nvme: make config_item_type __ro_after_init Date: Mon, 2 Oct 2017 00:44:38 +0530 Message-Id: <1506885278-9234-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 Make these __ro_after_init as they are only stored as a reference in the ci_type field of a config_item structure during the init phase in the function config_group_init_type_name. None of the fields of these structures are modified after the init phase, so they can be __ro_after_init. Structures found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal --- drivers/nvme/target/configfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c index b6aeb1d..075d9b5 100644 --- a/drivers/nvme/target/configfs.c +++ b/drivers/nvme/target/configfs.c @@ -767,7 +767,7 @@ static struct config_group *nvmet_subsys_make(struct config_group *group, .make_group = nvmet_subsys_make, }; -static struct config_item_type nvmet_subsystems_type = { +static struct config_item_type nvmet_subsystems_type __ro_after_init = { .ct_group_ops = &nvmet_subsystems_group_ops, .ct_owner = THIS_MODULE, }; @@ -921,7 +921,7 @@ static struct config_group *nvmet_ports_make(struct config_group *group, .make_group = nvmet_ports_make, }; -static struct config_item_type nvmet_ports_type = { +static struct config_item_type nvmet_ports_type __ro_after_init = { .ct_group_ops = &nvmet_ports_group_ops, .ct_owner = THIS_MODULE, }; @@ -963,7 +963,7 @@ static struct config_group *nvmet_hosts_make_group(struct config_group *group, .make_group = nvmet_hosts_make_group, }; -static struct config_item_type nvmet_hosts_type = { +static struct config_item_type nvmet_hosts_type __ro_after_init = { .ct_group_ops = &nvmet_hosts_group_ops, .ct_owner = THIS_MODULE, }; -- 1.9.1