public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue
@ 2014-07-14 11:59 Chen Gang
  2014-07-14 12:04 ` Chen Gang
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Gang @ 2014-07-14 11:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bergwolf, andreas.dilger, standby24x7, oleg.drokin,
	Andriy_Skulysh, denis.pithon, paf, devel,
	linux-kernel@vger.kernel.org

Some of architectures have already defined 'die' as macro, so can not
use it as declaration or definition in other modules, or it will cause
compiling issue.

So use more precise name 'force_die' (like 'wrap_bulk') instead of. And
the related error (with allmodconfig under score):

    CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'sptlrpc_cli_ctx_expire':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
    ctx->cc_ops->die(ctx, 0);
               ^
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
     req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
                            ^
  make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
  make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
  make[3]: *** [drivers/staging/lustre/lustre] Error 2
  make[2]: *** [drivers/staging/lustre] Error 2
  make[1]: *** [drivers/staging] Error 2
  make: *** [drivers] Error 2


Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h
index bf3ee39..1b8ec11 100644
--- a/drivers/staging/lustre/lustre/include/lustre_sec.h
+++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
 	/**
 	 * Force the \a ctx to die.
 	 */
-	void    (*die)	 (struct ptlrpc_cli_ctx *ctx,
+	void    (*force_die)   (struct ptlrpc_cli_ctx *ctx,
 				int grace);
 	int     (*display)     (struct ptlrpc_cli_ctx *ctx,
 				char *buf, int bufsize);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 28ac824..bb5b4b6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
  */
 void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
 {
-	LASSERT(ctx->cc_ops->die);
-	ctx->cc_ops->die(ctx, 0);
+	LASSERT(ctx->cc_ops->force_die);
+	ctx->cc_ops->force_die(ctx, 0);
 }
 EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
 
@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
 	 * later than the context refresh expire time.
 	 */
 	if (rc == 0)
-		req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
+		req->rq_cli_ctx->cc_ops->force_die(req->rq_cli_ctx, 0);
 	return rc;
 }
 
-- 
1.7.11.7

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

* Re: [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue
  2014-07-14 11:59 [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue Chen Gang
@ 2014-07-14 12:04 ` Chen Gang
  2014-07-15  1:40   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Gang @ 2014-07-14 12:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bergwolf, andreas.dilger, standby24x7, oleg.drokin,
	Andriy_Skulysh, denis.pithon, paf, devel,
	linux-kernel@vger.kernel.org


For drivers/staging/lustre/lustre/include/lustre_sec.h:391:

 - staging tree: use '\t   ' between 'die' and '('.

 - linux-next tree: use '   ' between 'die' and '('.

So the patch made under linux-next tree, can not apply to staging-next
or staging tree.


Thanks.

On 07/14/2014 07:59 PM, Chen Gang wrote:
> Some of architectures have already defined 'die' as macro, so can not
> use it as declaration or definition in other modules, or it will cause
> compiling issue.
> 
> So use more precise name 'force_die' (like 'wrap_bulk') instead of. And
> the related error (with allmodconfig under score):
> 
>     CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'sptlrpc_cli_ctx_expire':
>   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
>     ctx->cc_ops->die(ctx, 0);
>                ^
>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
>   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
>      req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
>                             ^
>   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>   make[3]: *** [drivers/staging/lustre/lustre] Error 2
>   make[2]: *** [drivers/staging/lustre] Error 2
>   make[1]: *** [drivers/staging] Error 2
>   make: *** [drivers] Error 2
> 
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
>  drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h
> index bf3ee39..1b8ec11 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_sec.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
> @@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
>  	/**
>  	 * Force the \a ctx to die.
>  	 */
> -	void    (*die)	 (struct ptlrpc_cli_ctx *ctx,
> +	void    (*force_die)   (struct ptlrpc_cli_ctx *ctx,
>  				int grace);
>  	int     (*display)     (struct ptlrpc_cli_ctx *ctx,
>  				char *buf, int bufsize);
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
> index 28ac824..bb5b4b6 100644
> --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
> +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
> @@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
>   */
>  void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
>  {
> -	LASSERT(ctx->cc_ops->die);
> -	ctx->cc_ops->die(ctx, 0);
> +	LASSERT(ctx->cc_ops->force_die);
> +	ctx->cc_ops->force_die(ctx, 0);
>  }
>  EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
>  
> @@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
>  	 * later than the context refresh expire time.
>  	 */
>  	if (rc == 0)
> -		req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
> +		req->rq_cli_ctx->cc_ops->force_die(req->rq_cli_ctx, 0);
>  	return rc;
>  }
>  
> 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

* Re: [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue
  2014-07-14 12:04 ` Chen Gang
@ 2014-07-15  1:40   ` Greg Kroah-Hartman
  2014-07-15  3:59     ` Chen Gang
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-07-15  1:40 UTC (permalink / raw)
  To: Chen Gang
  Cc: devel, oleg.drokin, paf, andreas.dilger, Andriy_Skulysh, bergwolf,
	linux-kernel@vger.kernel.org, denis.pithon

On Mon, Jul 14, 2014 at 08:04:15PM +0800, Chen Gang wrote:
> 
> For drivers/staging/lustre/lustre/include/lustre_sec.h:391:
> 
>  - staging tree: use '\t   ' between 'die' and '('.
> 
>  - linux-next tree: use '   ' between 'die' and '('.
> 
> So the patch made under linux-next tree, can not apply to staging-next
> or staging tree.

It seems to work just fine here, I don't see a problem...

thanks,

greg k-h

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

* Re: [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue
  2014-07-15  1:40   ` Greg Kroah-Hartman
@ 2014-07-15  3:59     ` Chen Gang
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2014-07-15  3:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, oleg.drokin, paf, andreas.dilger, Andriy_Skulysh, bergwolf,
	linux-kernel@vger.kernel.org, denis.pithon


在 2014年7月15日,上午9:40,Greg Kroah-Hartman <gregkh@linuxfoundation.org> 写道:

> On Mon, Jul 14, 2014 at 08:04:15PM +0800, Chen Gang wrote:
>> 
>> For drivers/staging/lustre/lustre/include/lustre_sec.h:391:
>> 
>> - staging tree: use '\t   ' between 'die' and '('.
>> 
>> - linux-next tree: use '   ' between 'die' and '('.
>> 
>> So the patch made under linux-next tree, can not apply to staging-next
>> or staging tree.
> 
> It seems to work just fine here, I don't see a problem...
> 


Yeah, the latest linux-next tree also uses ‘\t   “,  but the previous one not. :-)

Thanks.
—
Chen Gang
Open, share, and attitude like air, water, and life which God blessed

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

end of thread, other threads:[~2014-07-15  3:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14 11:59 [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue Chen Gang
2014-07-14 12:04 ` Chen Gang
2014-07-15  1:40   ` Greg Kroah-Hartman
2014-07-15  3:59     ` Chen Gang

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