From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752860AbdJLKUM (ORCPT ); Thu, 12 Oct 2017 06:20:12 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33444 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbdJLKUK (ORCPT ); Thu, 12 Oct 2017 06:20:10 -0400 X-Google-Smtp-Source: AOwi7QB8UGU5A6TLVZBZeyPpFpGy3BOjPa0lCR0wIHhfKe0kjHF/gRO9IPRC0idcotZCrt2SmqiX2g== From: Bhumika Goyal To: julia.lawall@lip6.fr, shli@fb.com, axboe@kernel.dk, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] nullb: make config_item_type const Date: Thu, 12 Oct 2017 12:19:35 +0200 Message-Id: <1507803575-5749-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 This is a followup patch for: https://lkml.org/lkml/2017/10/11/375 and https://patchwork.kernel.org/patch/9999649/ Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccienlle. Signed-off-by: Bhumika Goyal --- drivers/block/null_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index bf2c8ca..46b6008 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -480,7 +480,7 @@ static void nullb_device_release(struct config_item *item) .release = nullb_device_release, }; -static struct config_item_type nullb_device_type = { +static const struct config_item_type nullb_device_type = { .ct_item_ops = &nullb_device_ops, .ct_attrs = nullb_device_attrs, .ct_owner = THIS_MODULE, @@ -532,7 +532,7 @@ static ssize_t memb_group_features_show(struct config_item *item, char *page) .drop_item = nullb_group_drop_item, }; -static struct config_item_type nullb_group_type = { +static const struct config_item_type nullb_group_type = { .ct_group_ops = &nullb_group_ops, .ct_attrs = nullb_group_attrs, .ct_owner = THIS_MODULE, -- 1.9.1