* + relay-allow-the-use-of-const-callback-structs-v3.patch added to -mm tree
@ 2020-11-26 0:07 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-11-26 0:07 UTC (permalink / raw)
To: axboe, hch, jani.nikula, kvalo, mm-commits
The patch titled
Subject: relay-allow-the-use-of-const-callback-structs-v3
has been added to the -mm tree. Its filename is
relay-allow-the-use-of-const-callback-structs-v3.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/relay-allow-the-use-of-const-callback-structs-v3.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/relay-allow-the-use-of-const-callback-structs-v3.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Jani Nikula <jani.nikula@intel.com>
Subject: relay-allow-the-use-of-const-callback-structs-v3
cleanups, per Christoph
Link: https://lkml.kernel.org/r/20201124115412.32402-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/relay.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
--- a/kernel/relay.c~relay-allow-the-use-of-const-callback-structs-v3
+++ a/kernel/relay.c
@@ -252,18 +252,14 @@ EXPORT_SYMBOL_GPL(relay_buf_full);
* High-level relay kernel API and associated functions.
*/
-/* subbuf_start callback wrapper */
-static int cb_subbuf_start(struct rchan_buf *buf, void *subbuf,
- void *prev_subbuf, size_t prev_padding)
-{
- if (buf->chan->cb->subbuf_start)
- return buf->chan->cb->subbuf_start(buf, subbuf,
- prev_subbuf, prev_padding);
-
- if (relay_buf_full(buf))
- return 0;
+static int relay_subbuf_start(struct rchan_buf *buf, void *subbuf,
+ void *prev_subbuf, size_t prev_padding)
+{
+ if (!buf->chan->cb->subbuf_start)
+ return !relay_buf_full(buf);
- return 1;
+ return buf->chan->cb->subbuf_start(buf, subbuf,
+ prev_subbuf, prev_padding);
}
/**
@@ -309,7 +305,7 @@ static void __relay_reset(struct rchan_b
for (i = 0; i < buf->chan->n_subbufs; i++)
buf->padding[i] = 0;
- cb_subbuf_start(buf, buf->data, NULL, 0);
+ relay_subbuf_start(buf, buf->data, NULL, 0);
}
/**
@@ -699,7 +695,7 @@ size_t relay_switch_subbuf(struct rchan_
new_subbuf = buf->subbufs_produced % buf->chan->n_subbufs;
new = buf->start + new_subbuf * buf->chan->subbuf_size;
buf->offset = 0;
- if (!cb_subbuf_start(buf, new, old, buf->prev_padding)) {
+ if (!relay_subbuf_start(buf, new, old, buf->prev_padding)) {
buf->offset = buf->chan->subbuf_size + 1;
return 0;
}
_
Patches currently in -mm which might be from jani.nikula@intel.com are
relay-remove-unused-buf_mapped-and-buf_unmapped-callbacks.patch
relay-require-non-null-callbacks-in-relay_open.patch
relay-make-create_buf_file-and-remove_buf_file-callbacks-mandatory.patch
relay-allow-the-use-of-const-callback-structs.patch
relay-allow-the-use-of-const-callback-structs-v3.patch
drm-i915-make-relay-callbacks-const.patch
ath10k-make-relay-callbacks-const.patch
ath11k-make-relay-callbacks-const.patch
ath9k-make-relay-callbacks-const.patch
blktrace-make-relay-callbacks-const.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-26 0:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 0:07 + relay-allow-the-use-of-const-callback-structs-v3.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).