Skip to content

Commit abebef9

Browse files
leitaokuba-moo
authored andcommitted
netconsole: rename functions to better reflect their purpose
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ccc7edf commit abebef9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

drivers/net/netconsole.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static void netconsole_process_cleanups_core(void)
278278
mutex_unlock(&target_cleanup_list_lock);
279279
}
280280

281-
static void netpoll_print_options(struct netpoll *np)
281+
static void netconsole_print_banner(struct netpoll *np)
282282
{
283283
np_info(np, "local port %d\n", np->local_port);
284284
if (np->ipv6)
@@ -551,10 +551,10 @@ static ssize_t enabled_store(struct config_item *item,
551551
}
552552

553553
/*
554-
* Skip netpoll_parse_options() -- all the attributes are
554+
* Skip netconsole_parser_cmdline() -- all the attributes are
555555
* already configured via configfs. Just print them out.
556556
*/
557-
netpoll_print_options(&nt->np);
557+
netconsole_print_banner(&nt->np);
558558

559559
ret = netpoll_setup(&nt->np);
560560
if (ret)
@@ -1696,11 +1696,12 @@ static int netpoll_parse_ip_addr(const char *str, union inet_addr *addr)
16961696
return -1;
16971697
}
16981698

1699-
static int netpoll_parse_options(struct netpoll *np, char *opt)
1699+
static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
17001700
{
1701-
char *cur=opt, *delim;
1702-
int ipv6;
17031701
bool ipversion_set = false;
1702+
char *cur = opt;
1703+
char *delim;
1704+
int ipv6;
17041705

17051706
if (*cur != '@') {
17061707
if ((delim = strchr(cur, '@')) == NULL)
@@ -1775,7 +1776,7 @@ static int netpoll_parse_options(struct netpoll *np, char *opt)
17751776
goto parse_failed;
17761777
}
17771778

1778-
netpoll_print_options(np);
1779+
netconsole_print_banner(np);
17791780

17801781
return 0;
17811782

@@ -1813,7 +1814,7 @@ static struct netconsole_target *alloc_param_target(char *target_config,
18131814
}
18141815

18151816
/* Parse parameters and setup netpoll */
1816-
err = netpoll_parse_options(&nt->np, target_config);
1817+
err = netconsole_parser_cmdline(&nt->np, target_config);
18171818
if (err)
18181819
goto fail;
18191820

0 commit comments

Comments
 (0)