Re: 2.6.8.1-mm4

From: William Lee Irwin III
Date: Tue Aug 24 2004 - 16:58:34 EST


On Tue, Aug 24, 2004 at 01:56:21PM -0700, William Lee Irwin III wrote:
> __builtin_return_address() with non-constant arguments is unsupported on
> various architectures.
> fs/reiser4/context.c: In function `get_context_ok':
> fs/reiser4/context.c:88: warning: unsupported arg to `__builtin_return_address'
> fs/reiser4/context.c:89: warning: unsupported arg to `__builtin_return_address'

s/non-constant/nonzero/

Anyway, get_context_ok() appears to be nowhere used in the reiser4 bits
in -mm. Hans, any chance you could filter out some of the non-portable
debug code in the -mm snapshots? Especially the bits not called in -mm.


-- wli

Index: mm4-2.6.8.1/fs/reiser4/context.c
===================================================================
--- mm4-2.6.8.1.orig/fs/reiser4/context.c 2004-08-23 16:11:19.000000000 -0700
+++ mm4-2.6.8.1/fs/reiser4/context.c 2004-08-24 14:39:29.257714400 -0700
@@ -59,58 +59,6 @@
/* REISER4_DEBUG_CONTEXTS */
#endif

-struct {
- void *task;
- void *context;
- void *path[16];
-} context_ok;
-
-
-
-reiser4_internal void get_context_ok(reiser4_context *ctx)
-{
- int i;
- void *addr = NULL, *frame = NULL;
-
-#define CTX_FRAME(nr) \
- case (nr): \
- addr = __builtin_return_address((nr)); \
- frame = __builtin_frame_address(nr); \
- break
-
- memset(&context_ok, 0, sizeof(context_ok));
-
- context_ok.task = current;
- context_ok.context = ctx;
- for (i = 0; i < 16; i ++) {
- switch(i) {
- CTX_FRAME(0);
- CTX_FRAME(1);
- CTX_FRAME(2);
- CTX_FRAME(3);
- CTX_FRAME(4);
- CTX_FRAME(5);
- CTX_FRAME(6);
- CTX_FRAME(7);
- CTX_FRAME(8);
- CTX_FRAME(9);
- CTX_FRAME(10);
- CTX_FRAME(11);
- CTX_FRAME(12);
- CTX_FRAME(13);
- CTX_FRAME(14);
- CTX_FRAME(15);
- default:
- impossible("", "");
- }
- if (frame > (void *)ctx)
- break;
- context_ok.path[i] = addr;
- }
-#undef CTX_FRAME
-}
-
-
/* initialise context and bind it to the current thread

This function should be called at the beginning of reiser4 part of
Index: mm4-2.6.8.1/fs/reiser4/context.h
===================================================================
--- mm4-2.6.8.1.orig/fs/reiser4/context.h 2004-08-23 16:11:19.000000000 -0700
+++ mm4-2.6.8.1/fs/reiser4/context.h 2004-08-24 14:40:11.708260936 -0700
@@ -205,10 +205,6 @@

extern int is_in_reiser4_context(void);

-/* return context associated with given thread */
-
-void get_context_ok(reiser4_context *);
-
/*
* return reiser4_context for the thread @tsk
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/