Christoph Lameter said, at 2012/11/10 4:15:
> On Fri, 9 Nov 2012, Shan Wei wrote:
>
>> -return buffer->buffer;
>> +return (char *)this_cpu_ptr(_buffer->buffer);
>> }
>
> Add a comment to explain the cast?
typeof() is a pointer to array of 1024 char, or char (*)[1024].
But, typeof([0])
Christoph Lameter said, at 2012/11/10 4:15:
On Fri, 9 Nov 2012, Shan Wei wrote:
-return buffer-buffer;
+return (char *)this_cpu_ptr(percpu_buffer-buffer);
}
Add a comment to explain the cast?
typeof(buffer) is a pointer to array of 1024 char, or char (*)[1024].
But,
On Fri, 9 Nov 2012, Shan Wei wrote:
> - return buffer->buffer;
> + return (char *)this_cpu_ptr(_buffer->buffer);
> }
Add a comment to explain the cast?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More
On Fri, 9 Nov 2012, Shan Wei wrote:
- return buffer-buffer;
+ return (char *)this_cpu_ptr(percpu_buffer-buffer);
}
Add a comment to explain the cast?
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
From: Shan Wei
Signed-off-by: Shan Wei
---
v3:
directly return member address of per-cpu variable.
---
kernel/trace/blktrace.c |2 +-
kernel/trace/trace.c|5 +
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
From: Shan Wei davids...@tencent.com
Signed-off-by: Shan Wei davids...@tencent.com
---
v3:
directly return member address of per-cpu variable.
---
kernel/trace/blktrace.c |2 +-
kernel/trace/trace.c|5 +
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git
6 matches
Mail list logo