All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/iscsi: make config_item_type const
@ 2017-10-12 13:48 ` Bhumika Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-10-12 13:48 UTC (permalink / raw)
  To: julia.lawall, nab, linux-scsi, target-devel, linux-kernel; +Cc: Bhumika Goyal

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 <bhumirks@gmail.com>
---
 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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] target/iscsi: make config_item_type const
@ 2017-10-12 13:48 ` Bhumika Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-10-12 13:48 UTC (permalink / raw)
  To: julia.lawall, nab, linux-scsi, target-devel, linux-kernel; +Cc: Bhumika Goyal

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 <bhumirks@gmail.com>
---
 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
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] target/iscsi: make config_item_type const
  2017-10-12 13:48 ` Bhumika Goyal
@ 2017-10-12 15:02   ` Bhumika Goyal
  -1 siblings, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-10-12 15:02 UTC (permalink / raw)
  To: Julia Lawall, nab, linux-scsi, target-devel, Linux Kernel Mailing List
  Cc: Bhumika Goyal

On Thu, Oct 12, 2017 at 3:48 PM, Bhumika Goyal <bhumirks@gmail.com> wrote:
> 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 <bhumirks@gmail.com>
> ---

Hello,

This patch is dependent on the patch in the link
https://patchwork.kernel.org/patch/9999649/. Therefore, this patch
won't be correct unless the patch in this links gets applied.

Thanks,
Bhumika

>  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
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] target/iscsi: make config_item_type const
@ 2017-10-12 15:02   ` Bhumika Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-10-12 15:02 UTC (permalink / raw)
  To: Julia Lawall, nab, linux-scsi, target-devel, Linux Kernel Mailing List
  Cc: Bhumika Goyal

On Thu, Oct 12, 2017 at 3:48 PM, Bhumika Goyal <bhumirks@gmail.com> wrote:
> 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 <bhumirks@gmail.com>
> ---

Hello,

This patch is dependent on the patch in the link
https://patchwork.kernel.org/patch/9999649/. Therefore, this patch
won't be correct unless the patch in this links gets applied.

Thanks,
Bhumika

>  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
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-12 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12 13:48 [PATCH] target/iscsi: make config_item_type const Bhumika Goyal
2017-10-12 13:48 ` Bhumika Goyal
2017-10-12 15:02 ` Bhumika Goyal
2017-10-12 15:02   ` Bhumika Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.