Skip to contentSkip to conversation

drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

PATCH Superseded Chen Gang 2 participants 7 messages Jul 13, 2014 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/include/lustre_sec.h +1 -1
index 50d2f01..1b8ec11 100644
@@ -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);
drivers/staging/lustre/lustre/ptlrpc/sec.c +3 -3
index 28ac824..bb5b4b6 100644
@@ -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;
 }
 
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 23 lines · Chen Gang

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

Quoted 5 lines
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply to my tree, can you please refresh it against the staging-next branch of staging.git so that I can apply it?

thanks,

greg k-h

author
#2 lore raw
Quoted 24 lines · Greg Kroah-Hartman
Quoted 23 lines · Chen Gang

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

Quoted 9 lines
Quoted 5 lines
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply to my tree, can you please refresh it against the staging-next branch of staging.git so that I can apply it?

OK, I shall go to that tree and send patch for it (I shall finish within 2 days).

Thanks.

Signature · 3 lines
Chen Gang

Open share and attitude like air water and life which God blessed
author
#3 lore raw
Quoted 31 lines · Chen Gang
Quoted 30 lines · Greg Kroah-Hartman
Quoted 28 lines · Chen Gang

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Quoted 3 lines
Quoted 3 lines

This doesn't apply to my tree, can you please refresh it against the staging-next branch of staging.git so that I can apply it?

After checkout, I get the same patch, the related git link:

"git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".

The related new patch is in attachment, please check, thanks.

Quoted 3 lines

OK, I shall go to that tree and send patch for it (I shall finish within 2 days).

Thanks.

Signature · 3 lines
Chen Gang

Open share and attitude like air water and life which God blessed
Quoted 1 line

From 2c5239e3f52206f7a54814d39fc42aed4afe788f Mon Sep 17 00:00:00 2001

From: Chen Gang <[email protected]>
Date: Mon, 14 Jul 2014 06:21:57 +0800
Subject: [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/include/lustre_sec.h +1 -1
index bf3ee39..1b8ec11 100644
@@ -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);
drivers/staging/lustre/lustre/ptlrpc/sec.c +3 -3
index 28ac824..bb5b4b6 100644
@@ -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;
 }
 
Signature · 1 line
1.7.11.7
author
#4 lore raw
Quoted 32 lines · Chen Gang
Quoted 31 lines · Chen Gang
Quoted 30 lines · Greg Kroah-Hartman
Quoted 28 lines · Chen Gang

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

This doesn't apply to my tree, can you please refresh it against the staging-next branch of staging.git so that I can apply it?

After checkout, I get the same patch, the related git link:

"git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".

Oh, sorry, maybe I need:

"git clone -b staging-next git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"

And I shall try again, and finish within 2 days.

Thanks.

Quoted 11 lines

The related new patch is in attachment, please check, thanks.

Quoted 3 lines

OK, I shall go to that tree and send patch for it (I shall finish within 2 days).

Thanks.

Signature · 3 lines
Chen Gang

Open share and attitude like air water and life which God blessed
#5 lore raw
Quoted 40 lines · Chen Gang
Quoted 39 lines · Chen Gang
Quoted 31 lines · Chen Gang
Quoted 30 lines · Greg Kroah-Hartman
Quoted 28 lines · Chen Gang

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Quoted 3 lines
Quoted 3 lines

This doesn't apply to my tree, can you please refresh it against the staging-next branch of staging.git so that I can apply it?

After checkout, I get the same patch, the related git link:

Quoted 7 lines
Quoted 1 line

"git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".

Oh, sorry, maybe I need:

"git clone -b staging-next git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"

And I shall try again, and finish within 2 days.

Yes, you need the staging-next branch.

You can take your original clone of:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

and then just check out the staging-next branch in it:
git checkout -t -b staging-next origin/staging-next

no need to do another full clone.

thanks,

greg k-h

author
#6 lore raw
Quoted 51 lines · Greg Kroah-Hartman
Quoted 40 lines · Chen Gang
Quoted 39 lines · Chen Gang
Quoted 31 lines · Chen Gang
Quoted 30 lines · Greg Kroah-Hartman
Quoted 28 lines · Chen Gang

Some of architectures have already defined 'die' as macro, so can not use this common name as declaration in other modules, or will cause compiling issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

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

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Quoted 3 lines
Quoted 3 lines

This doesn't apply to my tree, can you please refresh it against the staging-next branch of staging.git so that I can apply it?

After checkout, I get the same patch, the related git link:

Quoted 7 lines
Quoted 1 line

"git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".

Oh, sorry, maybe I need:

"git clone -b staging-next git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"

And I shall try again, and finish within 2 days.

Yes, you need the staging-next branch.

Quoted 8 lines

You can take your original clone of:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

and then just check out the staging-next branch in it:
git checkout -t -b staging-next origin/staging-next

no need to do another full clone.

OK, thanks. I will finish it within this night (Chinese region).

Thanks.

Signature · 3 lines
Chen Gang

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