Refactor send_msg_udp() to take a struct nbcon_write_context pointer instead of separate msg and len parameters. This makes its signature consistent with send_ext_msg_udp() and prepares the function for future use of execution context information from wctxt. No functional change. Signed-off-by: Breno Leitao --- drivers/net/netconsole.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index d89ff01bc9658..ab547a0da5e0d 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -1713,16 +1713,16 @@ static void send_ext_msg_udp(struct netconsole_target *nt, sysdata_len); } -static void send_msg_udp(struct netconsole_target *nt, const char *msg, - unsigned int len) +static void send_msg_udp(struct netconsole_target *nt, + struct nbcon_write_context *wctxt) { - const char *tmp = msg; - int frag, left = len; + const char *msg = wctxt->outbuf; + int frag, left = wctxt->len; while (left > 0) { frag = min(left, MAX_PRINT_CHUNK); - send_udp(nt, tmp, frag); - tmp += frag; + send_udp(nt, msg, frag); + msg += frag; left -= frag; } } @@ -1756,7 +1756,7 @@ static void netconsole_write(struct nbcon_write_context *wctxt, bool extended) if (extended) send_ext_msg_udp(nt, wctxt); else - send_msg_udp(nt, wctxt->outbuf, wctxt->len); + send_msg_udp(nt, wctxt); nbcon_exit_unsafe(wctxt); } -- 2.47.3