2020-11-23 18:04:05

by Jani Nikula

[permalink] [raw]
Subject: [PATCH 9/9] blktrace: make relay callbacks const

Now that relay_open() accepts const callbacks, make relay callbacks
const.

Cc: Jens Axboe <[email protected]>
Cc: [email protected]
Signed-off-by: Jani Nikula <[email protected]>
---
kernel/trace/blktrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index f1022945e346..b5c4b9ade960 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -449,7 +449,7 @@ static struct dentry *blk_create_buf_file_callback(const char *filename,
&relay_file_operations);
}

-static struct rchan_callbacks blk_relay_callbacks = {
+static const struct rchan_callbacks blk_relay_callbacks = {
.subbuf_start = blk_subbuf_start_callback,
.create_buf_file = blk_create_buf_file_callback,
.remove_buf_file = blk_remove_buf_file_callback,
--
2.20.1


2020-11-24 20:34:43

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 9/9] blktrace: make relay callbacks const

On Mon, Nov 23, 2020 at 07:59:29PM +0200, Jani Nikula wrote:
> Now that relay_open() accepts const callbacks, make relay callbacks
> const.

Looks good,

Reviewed-by: Christoph Hellwig <[email protected]>