public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h
@ 2013-12-18 18:24 Rashika Kheria
  2013-12-18 18:26 ` [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c Rashika Kheria
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Rashika Kheria @ 2013-12-18 18:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Nicholas A. Bellinger, linux-scsi, target-devel, josh

Move prototype declaration of function
spc_parse_naa_6h_vendor_specific() from target_core_xcopy.c to header
file target_core_pr.h because it is used by more than one file.

This eliminates the following warning in target_core_spc.c:
drivers/target/target_core_spc.c:138:6: warning: no previous prototype for ‘spc_parse_naa_6h_vendor_specific’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/target/target_core_pr.h    |    5 +++++
 drivers/target/target_core_xcopy.c |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/target/target_core_pr.h b/drivers/target/target_core_pr.h
index ed75cdd..2ee2936 100644
--- a/drivers/target/target_core_pr.h
+++ b/drivers/target/target_core_pr.h
@@ -43,6 +43,11 @@
 #define PR_APTPL_MAX_IPORT_LEN			256
 #define PR_APTPL_MAX_TPORT_LEN			256
 
+/*
+ *  Function defined in target_core_spc.c
+ */
+void spc_parse_naa_6h_vendor_specific(struct se_device *, unsigned char *);
+
 extern struct kmem_cache *t10_pr_reg_cache;
 
 extern void core_pr_dump_initiator_port(struct t10_pr_registration *,
diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c
index 6b88a99..669c536 100644
--- a/drivers/target/target_core_xcopy.c
+++ b/drivers/target/target_core_xcopy.c
@@ -40,10 +40,6 @@
 
 static struct workqueue_struct *xcopy_wq = NULL;
 /*
- * From target_core_spc.c
- */
-extern void spc_parse_naa_6h_vendor_specific(struct se_device *, unsigned char *);
-/*
  * From target_core_device.c
  */
 extern struct mutex g_device_mutex;
-- 
1.7.9.5


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

* [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c
  2013-12-18 18:24 [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h Rashika Kheria
@ 2013-12-18 18:26 ` Rashika Kheria
  2013-12-18 18:38   ` josh
  2013-12-19  0:11   ` Nicholas A. Bellinger
  2013-12-18 18:32 ` [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c Rashika Kheria
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Rashika Kheria @ 2013-12-18 18:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Nicholas A. Bellinger, linux-scsi, target-devel, josh

Mark function iblock_get_write_cache() as static in target_core_iblock.c
because it is not used outside this file.

This eliminates the following warning in target_core_iblock.c:
drivers/target/target_core_iblock.c:766:6: warning: no previous prototype for ‘iblock_get_write_cache’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/target/target_core_iblock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index c87959f..15d9121 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -763,7 +763,7 @@ iblock_parse_cdb(struct se_cmd *cmd)
 	return sbc_parse_cdb(cmd, &iblock_sbc_ops);
 }
 
-bool iblock_get_write_cache(struct se_device *dev)
+static bool iblock_get_write_cache(struct se_device *dev)
 {
 	struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
 	struct block_device *bd = ib_dev->ibd_bd;
-- 
1.7.9.5


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

* [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c
  2013-12-18 18:24 [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h Rashika Kheria
  2013-12-18 18:26 ` [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c Rashika Kheria
@ 2013-12-18 18:32 ` Rashika Kheria
  2013-12-18 18:39   ` josh
  2013-12-19  0:11   ` Nicholas A. Bellinger
  2013-12-18 18:35 ` [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c Rashika Kheria
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Rashika Kheria @ 2013-12-18 18:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Nicholas A. Bellinger, Hannes Reinecke, Andy Grover, Joern Engel,
	Rashika Kheria, linux-scsi, target-devel, josh

Mark functions tcm_loop_make_naa_tpg(), tcm_loop_drop_naa_tpg(),
tcm_loop_make_scsi_hba() and tcm_loop_drop_scsi_hba() as static in
loopback/tcm_loop.c because they are not used outside this file.

This eliminates the following warning in loopback/tcm_loop.c:
drivers/target/loopback/tcm_loop.c:1231:25: warning: no previous prototype for ‘tcm_loop_make_naa_tpg’ [-Wmissing-prototypes]
drivers/target/loopback/tcm_loop.c:1276:6: warning: no previous prototype for ‘tcm_loop_drop_naa_tpg’ [-Wmissing-prototypes]
drivers/target/loopback/tcm_loop.c:1308:16: warning: no previous prototype for ‘tcm_loop_make_scsi_hba’ [-Wmissing-prototypes]
drivers/target/loopback/tcm_loop.c:1378:6: warning: no previous prototype for ‘tcm_loop_drop_scsi_hba’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/target/loopback/tcm_loop.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 1b41e67..763ee45 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -1228,7 +1228,7 @@ static struct configfs_attribute *tcm_loop_tpg_attrs[] = {
 
 /* Start items for tcm_loop_naa_cit */
 
-struct se_portal_group *tcm_loop_make_naa_tpg(
+static struct se_portal_group *tcm_loop_make_naa_tpg(
 	struct se_wwn *wwn,
 	struct config_group *group,
 	const char *name)
@@ -1273,7 +1273,7 @@ struct se_portal_group *tcm_loop_make_naa_tpg(
 	return &tl_tpg->tl_se_tpg;
 }
 
-void tcm_loop_drop_naa_tpg(
+static void tcm_loop_drop_naa_tpg(
 	struct se_portal_group *se_tpg)
 {
 	struct se_wwn *wwn = se_tpg->se_tpg_wwn;
@@ -1305,7 +1305,7 @@ void tcm_loop_drop_naa_tpg(
 
 /* Start items for tcm_loop_cit */
 
-struct se_wwn *tcm_loop_make_scsi_hba(
+static struct se_wwn *tcm_loop_make_scsi_hba(
 	struct target_fabric_configfs *tf,
 	struct config_group *group,
 	const char *name)
@@ -1375,7 +1375,7 @@ out:
 	return ERR_PTR(ret);
 }
 
-void tcm_loop_drop_scsi_hba(
+static void tcm_loop_drop_scsi_hba(
 	struct se_wwn *wwn)
 {
 	struct tcm_loop_hba *tl_hba = container_of(wwn,
-- 
1.7.9.5


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

* [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c
  2013-12-18 18:24 [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h Rashika Kheria
  2013-12-18 18:26 ` [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c Rashika Kheria
  2013-12-18 18:32 ` [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c Rashika Kheria
@ 2013-12-18 18:35 ` Rashika Kheria
  2013-12-18 18:40   ` josh
  2013-12-19  0:12   ` Nicholas A. Bellinger
  2013-12-18 18:37 ` [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h josh
  2013-12-19  0:11 ` Nicholas A. Bellinger
  4 siblings, 2 replies; 12+ messages in thread
From: Rashika Kheria @ 2013-12-18 18:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Nicholas A. Bellinger, Jingoo Han, Andy Grover, Rashika Kheria,
	Christoph Hellwig, linux-scsi, target-devel, josh

Mark functions ft_tpg_alloc_fabric_acl(), ft_register_configfs() and
ft_deregister_configfs() as static in tcm_fc/tfc_conf.c because they are
not used outside this file.

This eliminates the following warnings in tcm_fc/tfc_conf.c:
drivers/target/tcm_fc/tfc_conf.c:270:21: warning: no previous prototype for ‘ft_tpg_alloc_fabric_acl’ [-Wmissing-prototypes]
drivers/target/tcm_fc/tfc_conf.c:555:5: warning: no previous prototype for ‘ft_register_configfs’ [-Wmissing-prototypes]
drivers/target/tcm_fc/tfc_conf.c:602:6: warning: no previous prototype for ‘ft_deregister_configfs’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/target/tcm_fc/tfc_conf.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index c6932fb..e879da8 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -267,7 +267,7 @@ struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata)
 	return found;
 }
 
-struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg)
+static struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg)
 {
 	struct ft_node_acl *acl;
 
@@ -552,7 +552,7 @@ static struct target_core_fabric_ops ft_fabric_ops = {
 	.fabric_drop_nodeacl =		&ft_del_acl,
 };
 
-int ft_register_configfs(void)
+static int ft_register_configfs(void)
 {
 	struct target_fabric_configfs *fabric;
 	int ret;
@@ -599,7 +599,7 @@ int ft_register_configfs(void)
 	return 0;
 }
 
-void ft_deregister_configfs(void)
+static void ft_deregister_configfs(void)
 {
 	if (!ft_configfs)
 		return;
-- 
1.7.9.5


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

* Re: [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h
  2013-12-18 18:24 [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h Rashika Kheria
                   ` (2 preceding siblings ...)
  2013-12-18 18:35 ` [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c Rashika Kheria
@ 2013-12-18 18:37 ` josh
  2013-12-19  0:11 ` Nicholas A. Bellinger
  4 siblings, 0 replies; 12+ messages in thread
From: josh @ 2013-12-18 18:37 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Nicholas A. Bellinger, linux-scsi, target-devel

On Wed, Dec 18, 2013 at 11:54:32PM +0530, Rashika Kheria wrote:
> Move prototype declaration of function
> spc_parse_naa_6h_vendor_specific() from target_core_xcopy.c to header
> file target_core_pr.h because it is used by more than one file.
> 
> This eliminates the following warning in target_core_spc.c:
> drivers/target/target_core_spc.c:138:6: warning: no previous prototype for ‘spc_parse_naa_6h_vendor_specific’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/target/target_core_pr.h    |    5 +++++
>  drivers/target/target_core_xcopy.c |    4 ----
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/target/target_core_pr.h b/drivers/target/target_core_pr.h
> index ed75cdd..2ee2936 100644
> --- a/drivers/target/target_core_pr.h
> +++ b/drivers/target/target_core_pr.h
> @@ -43,6 +43,11 @@
>  #define PR_APTPL_MAX_IPORT_LEN			256
>  #define PR_APTPL_MAX_TPORT_LEN			256
>  
> +/*
> + *  Function defined in target_core_spc.c
> + */
> +void spc_parse_naa_6h_vendor_specific(struct se_device *, unsigned char *);
> +
>  extern struct kmem_cache *t10_pr_reg_cache;
>  
>  extern void core_pr_dump_initiator_port(struct t10_pr_registration *,
> diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c
> index 6b88a99..669c536 100644
> --- a/drivers/target/target_core_xcopy.c
> +++ b/drivers/target/target_core_xcopy.c
> @@ -40,10 +40,6 @@
>  
>  static struct workqueue_struct *xcopy_wq = NULL;
>  /*
> - * From target_core_spc.c
> - */
> -extern void spc_parse_naa_6h_vendor_specific(struct se_device *, unsigned char *);
> -/*
>   * From target_core_device.c
>   */
>  extern struct mutex g_device_mutex;
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c
  2013-12-18 18:26 ` [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c Rashika Kheria
@ 2013-12-18 18:38   ` josh
  2013-12-19  0:11   ` Nicholas A. Bellinger
  1 sibling, 0 replies; 12+ messages in thread
From: josh @ 2013-12-18 18:38 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Nicholas A. Bellinger, linux-scsi, target-devel

On Wed, Dec 18, 2013 at 11:56:44PM +0530, Rashika Kheria wrote:
> Mark function iblock_get_write_cache() as static in target_core_iblock.c
> because it is not used outside this file.
> 
> This eliminates the following warning in target_core_iblock.c:
> drivers/target/target_core_iblock.c:766:6: warning: no previous prototype for ‘iblock_get_write_cache’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/target/target_core_iblock.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
> index c87959f..15d9121 100644
> --- a/drivers/target/target_core_iblock.c
> +++ b/drivers/target/target_core_iblock.c
> @@ -763,7 +763,7 @@ iblock_parse_cdb(struct se_cmd *cmd)
>  	return sbc_parse_cdb(cmd, &iblock_sbc_ops);
>  }
>  
> -bool iblock_get_write_cache(struct se_device *dev)
> +static bool iblock_get_write_cache(struct se_device *dev)
>  {
>  	struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
>  	struct block_device *bd = ib_dev->ibd_bd;
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c
  2013-12-18 18:32 ` [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c Rashika Kheria
@ 2013-12-18 18:39   ` josh
  2013-12-19  0:11   ` Nicholas A. Bellinger
  1 sibling, 0 replies; 12+ messages in thread
From: josh @ 2013-12-18 18:39 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Nicholas A. Bellinger, Hannes Reinecke, Andy Grover,
	Joern Engel, linux-scsi, target-devel

On Thu, Dec 19, 2013 at 12:02:54AM +0530, Rashika Kheria wrote:
> Mark functions tcm_loop_make_naa_tpg(), tcm_loop_drop_naa_tpg(),
> tcm_loop_make_scsi_hba() and tcm_loop_drop_scsi_hba() as static in
> loopback/tcm_loop.c because they are not used outside this file.
> 
> This eliminates the following warning in loopback/tcm_loop.c:
> drivers/target/loopback/tcm_loop.c:1231:25: warning: no previous prototype for ‘tcm_loop_make_naa_tpg’ [-Wmissing-prototypes]
> drivers/target/loopback/tcm_loop.c:1276:6: warning: no previous prototype for ‘tcm_loop_drop_naa_tpg’ [-Wmissing-prototypes]
> drivers/target/loopback/tcm_loop.c:1308:16: warning: no previous prototype for ‘tcm_loop_make_scsi_hba’ [-Wmissing-prototypes]
> drivers/target/loopback/tcm_loop.c:1378:6: warning: no previous prototype for ‘tcm_loop_drop_scsi_hba’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/target/loopback/tcm_loop.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> index 1b41e67..763ee45 100644
> --- a/drivers/target/loopback/tcm_loop.c
> +++ b/drivers/target/loopback/tcm_loop.c
> @@ -1228,7 +1228,7 @@ static struct configfs_attribute *tcm_loop_tpg_attrs[] = {
>  
>  /* Start items for tcm_loop_naa_cit */
>  
> -struct se_portal_group *tcm_loop_make_naa_tpg(
> +static struct se_portal_group *tcm_loop_make_naa_tpg(
>  	struct se_wwn *wwn,
>  	struct config_group *group,
>  	const char *name)
> @@ -1273,7 +1273,7 @@ struct se_portal_group *tcm_loop_make_naa_tpg(
>  	return &tl_tpg->tl_se_tpg;
>  }
>  
> -void tcm_loop_drop_naa_tpg(
> +static void tcm_loop_drop_naa_tpg(
>  	struct se_portal_group *se_tpg)
>  {
>  	struct se_wwn *wwn = se_tpg->se_tpg_wwn;
> @@ -1305,7 +1305,7 @@ void tcm_loop_drop_naa_tpg(
>  
>  /* Start items for tcm_loop_cit */
>  
> -struct se_wwn *tcm_loop_make_scsi_hba(
> +static struct se_wwn *tcm_loop_make_scsi_hba(
>  	struct target_fabric_configfs *tf,
>  	struct config_group *group,
>  	const char *name)
> @@ -1375,7 +1375,7 @@ out:
>  	return ERR_PTR(ret);
>  }
>  
> -void tcm_loop_drop_scsi_hba(
> +static void tcm_loop_drop_scsi_hba(
>  	struct se_wwn *wwn)
>  {
>  	struct tcm_loop_hba *tl_hba = container_of(wwn,
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c
  2013-12-18 18:35 ` [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c Rashika Kheria
@ 2013-12-18 18:40   ` josh
  2013-12-19  0:12   ` Nicholas A. Bellinger
  1 sibling, 0 replies; 12+ messages in thread
From: josh @ 2013-12-18 18:40 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Nicholas A. Bellinger, Jingoo Han, Andy Grover,
	Christoph Hellwig, linux-scsi, target-devel

On Thu, Dec 19, 2013 at 12:05:59AM +0530, Rashika Kheria wrote:
> Mark functions ft_tpg_alloc_fabric_acl(), ft_register_configfs() and
> ft_deregister_configfs() as static in tcm_fc/tfc_conf.c because they are
> not used outside this file.
> 
> This eliminates the following warnings in tcm_fc/tfc_conf.c:
> drivers/target/tcm_fc/tfc_conf.c:270:21: warning: no previous prototype for ‘ft_tpg_alloc_fabric_acl’ [-Wmissing-prototypes]
> drivers/target/tcm_fc/tfc_conf.c:555:5: warning: no previous prototype for ‘ft_register_configfs’ [-Wmissing-prototypes]
> drivers/target/tcm_fc/tfc_conf.c:602:6: warning: no previous prototype for ‘ft_deregister_configfs’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/target/tcm_fc/tfc_conf.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
> index c6932fb..e879da8 100644
> --- a/drivers/target/tcm_fc/tfc_conf.c
> +++ b/drivers/target/tcm_fc/tfc_conf.c
> @@ -267,7 +267,7 @@ struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata)
>  	return found;
>  }
>  
> -struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg)
> +static struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg)
>  {
>  	struct ft_node_acl *acl;
>  
> @@ -552,7 +552,7 @@ static struct target_core_fabric_ops ft_fabric_ops = {
>  	.fabric_drop_nodeacl =		&ft_del_acl,
>  };
>  
> -int ft_register_configfs(void)
> +static int ft_register_configfs(void)
>  {
>  	struct target_fabric_configfs *fabric;
>  	int ret;
> @@ -599,7 +599,7 @@ int ft_register_configfs(void)
>  	return 0;
>  }
>  
> -void ft_deregister_configfs(void)
> +static void ft_deregister_configfs(void)
>  {
>  	if (!ft_configfs)
>  		return;
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h
  2013-12-18 18:24 [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h Rashika Kheria
                   ` (3 preceding siblings ...)
  2013-12-18 18:37 ` [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h josh
@ 2013-12-19  0:11 ` Nicholas A. Bellinger
  4 siblings, 0 replies; 12+ messages in thread
From: Nicholas A. Bellinger @ 2013-12-19  0:11 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, linux-scsi, target-devel, josh

On Wed, 2013-12-18 at 23:54 +0530, Rashika Kheria wrote:
> Move prototype declaration of function
> spc_parse_naa_6h_vendor_specific() from target_core_xcopy.c to header
> file target_core_pr.h because it is used by more than one file.
> 
> This eliminates the following warning in target_core_spc.c:
> drivers/target/target_core_spc.c:138:6: warning: no previous prototype for ‘spc_parse_naa_6h_vendor_specific’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> ---
>  drivers/target/target_core_pr.h    |    5 +++++
>  drivers/target/target_core_xcopy.c |    4 ----
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 

Applied to target-pending/for-next.

--nab

> diff --git a/drivers/target/target_core_pr.h b/drivers/target/target_core_pr.h
> index ed75cdd..2ee2936 100644
> --- a/drivers/target/target_core_pr.h
> +++ b/drivers/target/target_core_pr.h
> @@ -43,6 +43,11 @@
>  #define PR_APTPL_MAX_IPORT_LEN			256
>  #define PR_APTPL_MAX_TPORT_LEN			256
>  
> +/*
> + *  Function defined in target_core_spc.c
> + */
> +void spc_parse_naa_6h_vendor_specific(struct se_device *, unsigned char *);
> +
>  extern struct kmem_cache *t10_pr_reg_cache;
>  
>  extern void core_pr_dump_initiator_port(struct t10_pr_registration *,
> diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c
> index 6b88a99..669c536 100644
> --- a/drivers/target/target_core_xcopy.c
> +++ b/drivers/target/target_core_xcopy.c
> @@ -40,10 +40,6 @@
>  
>  static struct workqueue_struct *xcopy_wq = NULL;
>  /*
> - * From target_core_spc.c
> - */
> -extern void spc_parse_naa_6h_vendor_specific(struct se_device *, unsigned char *);
> -/*
>   * From target_core_device.c
>   */
>  extern struct mutex g_device_mutex;



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

* Re: [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c
  2013-12-18 18:26 ` [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c Rashika Kheria
  2013-12-18 18:38   ` josh
@ 2013-12-19  0:11   ` Nicholas A. Bellinger
  1 sibling, 0 replies; 12+ messages in thread
From: Nicholas A. Bellinger @ 2013-12-19  0:11 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, linux-scsi, target-devel, josh

On Wed, 2013-12-18 at 23:56 +0530, Rashika Kheria wrote:
> Mark function iblock_get_write_cache() as static in target_core_iblock.c
> because it is not used outside this file.
> 
> This eliminates the following warning in target_core_iblock.c:
> drivers/target/target_core_iblock.c:766:6: warning: no previous prototype for ‘iblock_get_write_cache’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> ---
>  drivers/target/target_core_iblock.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to target-pending/for-next.

--nab

> diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
> index c87959f..15d9121 100644
> --- a/drivers/target/target_core_iblock.c
> +++ b/drivers/target/target_core_iblock.c
> @@ -763,7 +763,7 @@ iblock_parse_cdb(struct se_cmd *cmd)
>  	return sbc_parse_cdb(cmd, &iblock_sbc_ops);
>  }
>  
> -bool iblock_get_write_cache(struct se_device *dev)
> +static bool iblock_get_write_cache(struct se_device *dev)
>  {
>  	struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
>  	struct block_device *bd = ib_dev->ibd_bd;



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

* Re: [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c
  2013-12-18 18:32 ` [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c Rashika Kheria
  2013-12-18 18:39   ` josh
@ 2013-12-19  0:11   ` Nicholas A. Bellinger
  1 sibling, 0 replies; 12+ messages in thread
From: Nicholas A. Bellinger @ 2013-12-19  0:11 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Hannes Reinecke, Andy Grover, Joern Engel,
	linux-scsi, target-devel, josh

On Thu, 2013-12-19 at 00:02 +0530, Rashika Kheria wrote:
> Mark functions tcm_loop_make_naa_tpg(), tcm_loop_drop_naa_tpg(),
> tcm_loop_make_scsi_hba() and tcm_loop_drop_scsi_hba() as static in
> loopback/tcm_loop.c because they are not used outside this file.
> 
> This eliminates the following warning in loopback/tcm_loop.c:
> drivers/target/loopback/tcm_loop.c:1231:25: warning: no previous prototype for ‘tcm_loop_make_naa_tpg’ [-Wmissing-prototypes]
> drivers/target/loopback/tcm_loop.c:1276:6: warning: no previous prototype for ‘tcm_loop_drop_naa_tpg’ [-Wmissing-prototypes]
> drivers/target/loopback/tcm_loop.c:1308:16: warning: no previous prototype for ‘tcm_loop_make_scsi_hba’ [-Wmissing-prototypes]
> drivers/target/loopback/tcm_loop.c:1378:6: warning: no previous prototype for ‘tcm_loop_drop_scsi_hba’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> ---
>  drivers/target/loopback/tcm_loop.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to target-pending/for-next.

--nab

> diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> index 1b41e67..763ee45 100644
> --- a/drivers/target/loopback/tcm_loop.c
> +++ b/drivers/target/loopback/tcm_loop.c
> @@ -1228,7 +1228,7 @@ static struct configfs_attribute *tcm_loop_tpg_attrs[] = {
>  
>  /* Start items for tcm_loop_naa_cit */
>  
> -struct se_portal_group *tcm_loop_make_naa_tpg(
> +static struct se_portal_group *tcm_loop_make_naa_tpg(
>  	struct se_wwn *wwn,
>  	struct config_group *group,
>  	const char *name)
> @@ -1273,7 +1273,7 @@ struct se_portal_group *tcm_loop_make_naa_tpg(
>  	return &tl_tpg->tl_se_tpg;
>  }
>  
> -void tcm_loop_drop_naa_tpg(
> +static void tcm_loop_drop_naa_tpg(
>  	struct se_portal_group *se_tpg)
>  {
>  	struct se_wwn *wwn = se_tpg->se_tpg_wwn;
> @@ -1305,7 +1305,7 @@ void tcm_loop_drop_naa_tpg(
>  
>  /* Start items for tcm_loop_cit */
>  
> -struct se_wwn *tcm_loop_make_scsi_hba(
> +static struct se_wwn *tcm_loop_make_scsi_hba(
>  	struct target_fabric_configfs *tf,
>  	struct config_group *group,
>  	const char *name)
> @@ -1375,7 +1375,7 @@ out:
>  	return ERR_PTR(ret);
>  }
>  
> -void tcm_loop_drop_scsi_hba(
> +static void tcm_loop_drop_scsi_hba(
>  	struct se_wwn *wwn)
>  {
>  	struct tcm_loop_hba *tl_hba = container_of(wwn,



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

* Re: [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c
  2013-12-18 18:35 ` [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c Rashika Kheria
  2013-12-18 18:40   ` josh
@ 2013-12-19  0:12   ` Nicholas A. Bellinger
  1 sibling, 0 replies; 12+ messages in thread
From: Nicholas A. Bellinger @ 2013-12-19  0:12 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Jingoo Han, Andy Grover, Christoph Hellwig,
	linux-scsi, target-devel, josh

On Thu, 2013-12-19 at 00:05 +0530, Rashika Kheria wrote:
> Mark functions ft_tpg_alloc_fabric_acl(), ft_register_configfs() and
> ft_deregister_configfs() as static in tcm_fc/tfc_conf.c because they are
> not used outside this file.
> 
> This eliminates the following warnings in tcm_fc/tfc_conf.c:
> drivers/target/tcm_fc/tfc_conf.c:270:21: warning: no previous prototype for ‘ft_tpg_alloc_fabric_acl’ [-Wmissing-prototypes]
> drivers/target/tcm_fc/tfc_conf.c:555:5: warning: no previous prototype for ‘ft_register_configfs’ [-Wmissing-prototypes]
> drivers/target/tcm_fc/tfc_conf.c:602:6: warning: no previous prototype for ‘ft_deregister_configfs’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> ---
>  drivers/target/tcm_fc/tfc_conf.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Applied to target-pending/for-next.

Thanks Rashika + Josh!

--nab

> diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
> index c6932fb..e879da8 100644
> --- a/drivers/target/tcm_fc/tfc_conf.c
> +++ b/drivers/target/tcm_fc/tfc_conf.c
> @@ -267,7 +267,7 @@ struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata)
>  	return found;
>  }
>  
> -struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg)
> +static struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg)
>  {
>  	struct ft_node_acl *acl;
>  
> @@ -552,7 +552,7 @@ static struct target_core_fabric_ops ft_fabric_ops = {
>  	.fabric_drop_nodeacl =		&ft_del_acl,
>  };
>  
> -int ft_register_configfs(void)
> +static int ft_register_configfs(void)
>  {
>  	struct target_fabric_configfs *fabric;
>  	int ret;
> @@ -599,7 +599,7 @@ int ft_register_configfs(void)
>  	return 0;
>  }
>  
> -void ft_deregister_configfs(void)
> +static void ft_deregister_configfs(void)
>  {
>  	if (!ft_configfs)
>  		return;



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

end of thread, other threads:[~2013-12-19  0:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 18:24 [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h Rashika Kheria
2013-12-18 18:26 ` [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c Rashika Kheria
2013-12-18 18:38   ` josh
2013-12-19  0:11   ` Nicholas A. Bellinger
2013-12-18 18:32 ` [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c Rashika Kheria
2013-12-18 18:39   ` josh
2013-12-19  0:11   ` Nicholas A. Bellinger
2013-12-18 18:35 ` [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c Rashika Kheria
2013-12-18 18:40   ` josh
2013-12-19  0:12   ` Nicholas A. Bellinger
2013-12-18 18:37 ` [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h josh
2013-12-19  0:11 ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox