Rename netpoll_parse_options() to netconsole_parser_cmdline() and
netpoll_print_options() to netconsole_print_banner() to better
describe what these functions actually do within the netconsole
context.

Also fix minor code style issues including variable declaration
ordering and spacing.

These functions are specific to netconsole functionality rather
than general netpoll operations, so the new names better reflect
their actual purpose.

Signed-off-by: Breno Leitao <lei...@debian.org>
---
 drivers/net/netconsole.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 18e482b28c427..3406a5cbdc11a 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -273,7 +273,7 @@ static void netconsole_process_cleanups_core(void)
        mutex_unlock(&target_cleanup_list_lock);
 }
 
-static void netpoll_print_options(struct netpoll *np)
+static void netconsole_print_banner(struct netpoll *np)
 {
        np_info(np, "local port %d\n", np->local_port);
        if (np->ipv6)
@@ -509,10 +509,10 @@ static ssize_t enabled_store(struct config_item *item,
                        register_console(&netconsole_ext);
 
                /*
-                * Skip netpoll_parse_options() -- all the attributes are
+                * Skip netconsole_parser_cmdline() -- all the attributes are
                 * already configured via configfs. Just print them out.
                 */
-               netpoll_print_options(&nt->np);
+               netconsole_print_banner(&nt->np);
 
                ret = netpoll_setup(&nt->np);
                if (ret)
@@ -1651,11 +1651,12 @@ static int netpoll_parse_ip_addr(const char *str, union 
inet_addr *addr)
        return -1;
 }
 
-static int netpoll_parse_options(struct netpoll *np, char *opt)
+static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
 {
-       char *cur=opt, *delim;
-       int ipv6;
        bool ipversion_set = false;
+       char *cur = opt;
+       char *delim;
+       int ipv6;
 
        if (*cur != '@') {
                if ((delim = strchr(cur, '@')) == NULL)
@@ -1730,7 +1731,7 @@ static int netpoll_parse_options(struct netpoll *np, char 
*opt)
                        goto parse_failed;
        }
 
-       netpoll_print_options(np);
+       netconsole_print_banner(np);
 
        return 0;
 
@@ -1768,7 +1769,7 @@ static struct netconsole_target *alloc_param_target(char 
*target_config,
        }
 
        /* Parse parameters and setup netpoll */
-       err = netpoll_parse_options(&nt->np, target_config);
+       err = netconsole_parser_cmdline(&nt->np, target_config);
        if (err)
                goto fail;
 

-- 
2.47.1


Reply via email to