Thread (7 messages) 7 messages, 2 authors, 2024-09-13

Re: [PATCH net-next v3 2/2] netcons: Add udp send fail statistics to netconsole

From: Maksym Kutsevol <hidden>
Date: 2024-09-12 18:05:51
Also in: lkml

On Thu, Sep 12, 2024 at 1:58 PM Maksym Kutsevol [off-list ref] wrote:
Hey Breno,
Thanks for looking into this.

On Thu, Sep 12, 2024 at 1:49 PM Breno Leitao [off-list ref] wrote:
quoted
Hello Maksym,

Thanks for the patch, it is looking good. A few nits:

On Thu, Sep 12, 2024 at 10:28:52AM -0700, Maksym Kutsevol wrote:
quoted
+/**
+ * netpoll_send_udp_count_errs - Wrapper for netpoll_send_udp that counts errors
+ * @nt: target to send message to
+ * @msg: message to send
+ * @len: length of message
+ *
+ * Calls netpoll_send_udp and classifies the return value. If an error
+ * occurred it increments statistics in nt->stats accordingly.
+ * Only calls netpoll_send_udp if CONFIG_NETCONSOLE_DYNAMIC is disabled.
+ */
+static void netpoll_send_udp_count_errs(struct netconsole_target *nt, const char *msg, int len)
+{
+     int result = netpoll_send_udp(&nt->np, msg, len);
Would you get a "variable defined but not used" type of eror if
CONFIG_NETCONSOLE_DYNAMIC is disabled?
Most probably yes, I'll check. If so, I'll add __maybe_unused in the
next iteration.
No, there's no warning. As it's used and then optimized out by the compiler.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help