From patchwork Thu Oct 12 13:48:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10002063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46C8F603B5 for ; Thu, 12 Oct 2017 13:49:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 386EA28DE7 for ; Thu, 12 Oct 2017 13:49:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D28128DE3; Thu, 12 Oct 2017 13:49:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD85E28DE7 for ; Thu, 12 Oct 2017 13:49:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751370AbdJLNsy (ORCPT ); Thu, 12 Oct 2017 09:48:54 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38070 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbdJLNsx (ORCPT ); Thu, 12 Oct 2017 09:48:53 -0400 Received: by mail-wm0-f65.google.com with SMTP id q124so4013221wmb.5; Thu, 12 Oct 2017 06:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WrcRsHwiMbXtHSa/NtCTlg8X3xr06HjXE8xavJIfki4=; b=aJ7vRaFWYBtGPk6lEKf1+2L7+BL0x8Ji08lW+5Z5XsXYGjqaah3b7CixF0iKzzdTXm Sw4w4Dg9E6ygrSeuQf3hJBHoAGUH9UjHR6/CVL1JscIGgP900cg4yV6zjGWSAb2H+s91 S9jd1vtGPOK/9Y06z2x/dphR04oxicVTKNalrRChCUWPoSyD0py5KTrB0/UvaJMYc9RL 0yEjEDpyDM7Wnc6zwwboUSookMY+fhwGUiCHsyR4Bly0ZGzBo5jkltzZwOZNoNYRdfjl S4KW70zh9BOxHzJFpD9sw69ml0c10sFXpRgY/pOGk9gWdWQpVaGKMH+loGZ+8BiFKkEb WmNQ== 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=WrcRsHwiMbXtHSa/NtCTlg8X3xr06HjXE8xavJIfki4=; b=IIsHSljtAPRG3Ce+KF2bY/JNyaYfaVl397yARdzOy2SKbTjXKKqqiB86YYyn56YpU6 zb8uAc3VpyLoH7+AC01lzHkxfrQOBvOeqwKbOqmgUydCtWckBRfyqxgXauONasO1ZD8q BVhfro+rbKLFJgo/twJMwGrdyVvXf7AvvrRBbL8GO0Czsah/C9SgYEzWWkKoMQL36O4S 713Kr1B8LMlGhGH2w2lFdsAfjo93MB52SHPuu8gLrY/NP6zNv3vdpfbxVf4UQQVZwdIa /wbPvB2e/2QlR99EcUwzci4DCPGFaB5LN+czgdYqA58qu9UuvPhpnLl7Kfp6wApfDDkK RD5A== X-Gm-Message-State: AMCzsaWvgp2ITBzHvOR4hqqCedYUd+KNawt0M5Tcg8KWJayX1bGzJdKj XCjW4MLxzuJ3Qm4lUg1lIOOuGjGH X-Google-Smtp-Source: AOwi7QB+Fm+xwqWgYkrqY+P6rck4WqVkYf3CLuz0/YEB/3iijtdYtMN8UmYgAL8yU3PvTwEgvYlurQ== X-Received: by 10.223.136.44 with SMTP id d41mr2580993wrd.68.1507816132104; Thu, 12 Oct 2017 06:48:52 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id p77sm336205wmd.28.2017.10.12.06.48.49 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Oct 2017 06:48:51 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Thu, 12 Oct 2017 15:48:49 +0200 From: Bhumika Goyal To: julia.lawall@lip6.fr, nab@linux-iscsi.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] target/iscsi: make config_item_type const Date: Thu, 12 Oct 2017 15:48:21 +0200 Message-Id: <1507816101-16427-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a followup patch for: https://patchwork.kernel.org/patch/9999649/ Make config_item_type structures const as they are only passed to the functions having the argument as const. Make the declaration const too. Signed-off-by: Bhumika Goyal --- drivers/target/iscsi/iscsi_target_stat.c | 12 ++++++------ include/target/iscsi/iscsi_target_stat.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c index 411cb26..df0a398 100644 --- a/drivers/target/iscsi/iscsi_target_stat.c +++ b/drivers/target/iscsi/iscsi_target_stat.c @@ -187,7 +187,7 @@ static ssize_t iscsi_stat_instance_version_show(struct config_item *item, NULL, }; -struct config_item_type iscsi_stat_instance_cit = { +const struct config_item_type iscsi_stat_instance_cit = { .ct_attrs = iscsi_stat_instance_attrs, .ct_owner = THIS_MODULE, }; @@ -249,7 +249,7 @@ static ssize_t iscsi_stat_sess_err_format_errors_show(struct config_item *item, NULL, }; -struct config_item_type iscsi_stat_sess_err_cit = { +const struct config_item_type iscsi_stat_sess_err_cit = { .ct_attrs = iscsi_stat_sess_err_attrs, .ct_owner = THIS_MODULE, }; @@ -390,7 +390,7 @@ static ssize_t iscsi_stat_tgt_attr_fail_intr_addr_show(struct config_item *item, NULL, }; -struct config_item_type iscsi_stat_tgt_attr_cit = { +const struct config_item_type iscsi_stat_tgt_attr_cit = { .ct_attrs = iscsi_stat_tgt_attr_attrs, .ct_owner = THIS_MODULE, }; @@ -522,7 +522,7 @@ static ssize_t iscsi_stat_login_negotiate_fails_show(struct config_item *item, NULL, }; -struct config_item_type iscsi_stat_login_cit = { +const struct config_item_type iscsi_stat_login_cit = { .ct_attrs = iscsi_stat_login_stats_attrs, .ct_owner = THIS_MODULE, }; @@ -579,7 +579,7 @@ static ssize_t iscsi_stat_logout_abnormal_logouts_show(struct config_item *item, NULL, }; -struct config_item_type iscsi_stat_logout_cit = { +const struct config_item_type iscsi_stat_logout_cit = { .ct_attrs = iscsi_stat_logout_stats_attrs, .ct_owner = THIS_MODULE, }; @@ -801,7 +801,7 @@ static ssize_t iscsi_stat_sess_conn_timeout_errors_show( NULL, }; -struct config_item_type iscsi_stat_sess_cit = { +const struct config_item_type iscsi_stat_sess_cit = { .ct_attrs = iscsi_stat_sess_stats_attrs, .ct_owner = THIS_MODULE, }; diff --git a/include/target/iscsi/iscsi_target_stat.h b/include/target/iscsi/iscsi_target_stat.h index c27dd47..36e9c9a 100644 --- a/include/target/iscsi/iscsi_target_stat.h +++ b/include/target/iscsi/iscsi_target_stat.h @@ -8,16 +8,16 @@ /* * For struct iscsi_tiqn->tiqn_wwn default groups */ -extern struct config_item_type iscsi_stat_instance_cit; -extern struct config_item_type iscsi_stat_sess_err_cit; -extern struct config_item_type iscsi_stat_tgt_attr_cit; -extern struct config_item_type iscsi_stat_login_cit; -extern struct config_item_type iscsi_stat_logout_cit; +extern const struct config_item_type iscsi_stat_instance_cit; +extern const struct config_item_type iscsi_stat_sess_err_cit; +extern const struct config_item_type iscsi_stat_tgt_attr_cit; +extern const struct config_item_type iscsi_stat_login_cit; +extern const struct config_item_type iscsi_stat_logout_cit; /* * For struct iscsi_session->se_sess default groups */ -extern struct config_item_type iscsi_stat_sess_cit; +extern const struct config_item_type iscsi_stat_sess_cit; /* iSCSI session error types */ #define ISCSI_SESS_ERR_UNKNOWN 0