Re: [PATCH 4/9] relay: allow the use of const callback structs

2020-11-24 Thread Jani Nikula
On Tue, 24 Nov 2020, Christoph Hellwig wrote: > Otherwise this looks good to me: v3 sent. > Reviewed-by: Christoph Hellwig Thanks for the reviews, appreciated. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH 4/9] relay: allow the use of const callback structs

2020-11-24 Thread Christoph Hellwig
> +/* subbuf_start callback wrapper */ > +static int cb_subbuf_start(struct rchan_buf *buf, void *subbuf, > +void *prev_subbuf, size_t prev_padding) I don't think the comment adds any information over just looking at the function and the two callers. I'd also name it

[PATCH 4/9] relay: allow the use of const callback structs

2020-11-23 Thread Jani Nikula
None of the relay users require the use of mutable structs for callbacks, however the relay code does. Instead of assigning the default callback for subbuf_start, add a wrapper to conditionally call the client callback if available, and fall back to default behaviour otherwise. This lets all