Re: [PATCH net-next v2 2/3] connector/cn_proc: Kunit tests for threads hash table

From: Liam R. Howlett
Date: Tue Oct 15 2024 - 20:32:33 EST


* Anjali Kulkarni <anjali.k.kulkarni@xxxxxxxxxx> [241015 17:11]:

...

> >> +MODULE_DESCRIPTION("KUnit test for the connector threads hashtable code");
> >> +MODULE_LICENSE("GPL");
> >> diff --git a/lib/cn_hash_test.h b/lib/cn_hash_test.h
> >> new file mode 100644
> >> index 000000000000..46fcda31b25c
> >> --- /dev/null
> >> +++ b/lib/cn_hash_test.h
> >> @@ -0,0 +1,12 @@
> >> +/* SPDX-License-Identifier: GPL-2.0+ */
> >> +/*
> >> + * Copyright (c) 2024 Oracle and/or its affiliates.
> >> + * Author: Anjali Kulkarni <anjali.k.kulkarni@xxxxxxxxxx>
> >> + */
> >> +extern int cn_display_hlist(pid_t pid, int max_len, int *hkey,
> >> + int *key_display);
> >> +extern int cn_del_elem(pid_t pid);
> >> +extern int cn_add_elem(__u32 uexit_code, pid_t pid);
> >> +extern __u32 cn_del_get_exval(pid_t pid);
> >> +extern int cn_get_exval(pid_t pid);
> >> +extern bool cn_table_empty(void);
> >
> > I think we are not adding externs to headers anymore.
>
> Ok, should I move it to the cn_hash_test.c file then? That is what I had
> initially but the checkpatch.pl gave a warning to move to .h file.

No, if you can drop the extern and still have it build then do that,
otherwise keep them in the header as they are.