* [LTP] [PATCH 0/2] Two small fixes for LTP-003
@ 2021-11-30 10:50 Cyril Hrubis
2021-11-30 10:50 ` [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions Cyril Hrubis
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Cyril Hrubis @ 2021-11-30 10:50 UTC (permalink / raw)
To: ltp
This fixes false possitives for tst_fuzzy_sync.h
Cyril Hrubis (2):
include/tst_fuzzy_sync.h: Add inline to static fucntions
sparse: Do not report static inline functions
include/tst_fuzzy_sync.h | 14 +++++++-------
tools/sparse/sparse-ltp.c | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
--
2.32.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions
2021-11-30 10:50 [LTP] [PATCH 0/2] Two small fixes for LTP-003 Cyril Hrubis
@ 2021-11-30 10:50 ` Cyril Hrubis
2021-11-30 11:18 ` Petr Vorel
2021-12-01 7:07 ` Li Wang
2021-11-30 10:50 ` [LTP] [PATCH 2/2] sparse: Do not report static inline functions Cyril Hrubis
2021-11-30 14:18 ` [LTP] [PATCH 0/2] Two small fixes for LTP-003 Richard Palethorpe
2 siblings, 2 replies; 7+ messages in thread
From: Cyril Hrubis @ 2021-11-30 10:50 UTC (permalink / raw)
To: ltp
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
include/tst_fuzzy_sync.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/tst_fuzzy_sync.h b/include/tst_fuzzy_sync.h
index 8f97bb8f6..bc3450294 100644
--- a/include/tst_fuzzy_sync.h
+++ b/include/tst_fuzzy_sync.h
@@ -210,7 +210,7 @@ struct tst_fzsync_pair {
*
* @sa tst_fzsync_pair_reset()
*/
-static void tst_fzsync_pair_init(struct tst_fzsync_pair *pair)
+static inline void tst_fzsync_pair_init(struct tst_fzsync_pair *pair)
{
CHK(avg_alpha, 0, 1, 0.25);
CHK(min_samples, 20, INT_MAX, 1024);
@@ -230,7 +230,7 @@ static void tst_fzsync_pair_init(struct tst_fzsync_pair *pair)
*
* Call this from your cleanup function.
*/
-static void tst_fzsync_pair_cleanup(struct tst_fzsync_pair *pair)
+static inline void tst_fzsync_pair_cleanup(struct tst_fzsync_pair *pair)
{
if (pair->thread_b) {
/* Revoke thread B if parent hits accidental break */
@@ -254,7 +254,7 @@ struct tst_fzsync_run_thread {
* Wrap run_b for tst_fzsync_pair_reset to enable pthread cancel
* at the start of the thread B.
*/
-static void *tst_fzsync_thread_wrapper(void *run_thread)
+static inline void *tst_fzsync_thread_wrapper(void *run_thread)
{
struct tst_fzsync_run_thread t = *(struct tst_fzsync_run_thread *)run_thread;
@@ -268,7 +268,7 @@ static void *tst_fzsync_thread_wrapper(void *run_thread)
*
* @relates tst_fzsync_stat
*/
-static void tst_init_stat(struct tst_fzsync_stat *s)
+static inline void tst_init_stat(struct tst_fzsync_stat *s)
{
s->avg = 0;
s->avg_dev = 0;
@@ -292,7 +292,7 @@ static void tst_init_stat(struct tst_fzsync_stat *s)
*
* @sa tst_fzsync_pair_init()
*/
-static void tst_fzsync_pair_reset(struct tst_fzsync_pair *pair,
+static inline void tst_fzsync_pair_reset(struct tst_fzsync_pair *pair,
void *(*run_b)(void *))
{
tst_fzsync_pair_cleanup(pair);
@@ -340,7 +340,7 @@ static inline void tst_fzsync_stat_info(struct tst_fzsync_stat stat,
*
* @relates tst_fzsync_pair
*/
-static void tst_fzsync_pair_info(struct tst_fzsync_pair *pair)
+static inline void tst_fzsync_pair_info(struct tst_fzsync_pair *pair)
{
tst_res(TINFO, "loop = %d, delay_bias = %d",
pair->exec_loop, pair->delay_bias);
@@ -493,7 +493,7 @@ static inline void tst_upd_diff_stat(struct tst_fzsync_stat *s,
*
* @relates tst_fzsync_pair
*/
-static void tst_fzsync_pair_update(struct tst_fzsync_pair *pair)
+static inline void tst_fzsync_pair_update(struct tst_fzsync_pair *pair)
{
float alpha = pair->avg_alpha;
float per_spin_time, time_delay;
--
2.32.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/2] sparse: Do not report static inline functions
2021-11-30 10:50 [LTP] [PATCH 0/2] Two small fixes for LTP-003 Cyril Hrubis
2021-11-30 10:50 ` [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions Cyril Hrubis
@ 2021-11-30 10:50 ` Cyril Hrubis
2021-11-30 11:21 ` Petr Vorel
2021-11-30 14:18 ` [LTP] [PATCH 0/2] Two small fixes for LTP-003 Richard Palethorpe
2 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2021-11-30 10:50 UTC (permalink / raw)
To: ltp
Since these are part of the library API and can be prefixed with tst_
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
tools/sparse/sparse-ltp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/sparse/sparse-ltp.c b/tools/sparse/sparse-ltp.c
index 2f32bfa38..b1677d336 100644
--- a/tools/sparse/sparse-ltp.c
+++ b/tools/sparse/sparse-ltp.c
@@ -98,7 +98,7 @@ static void check_symbol_visibility(const struct symbol *const sym)
if (!(mod & MOD_TOPLEVEL))
return;
- if (has_lib_prefix && (mod & MOD_STATIC)) {
+ if (has_lib_prefix && (mod & MOD_STATIC) && !(mod & MOD_INLINE)) {
warning(sym->pos,
"LTP-003: Symbol '%s' has the LTP public library prefix, but is static (private).",
name);
--
2.32.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions
2021-11-30 10:50 ` [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions Cyril Hrubis
@ 2021-11-30 11:18 ` Petr Vorel
2021-12-01 7:07 ` Li Wang
1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-11-30 11:18 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
obviously correct, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 2/2] sparse: Do not report static inline functions
2021-11-30 10:50 ` [LTP] [PATCH 2/2] sparse: Do not report static inline functions Cyril Hrubis
@ 2021-11-30 11:21 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-11-30 11:21 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril, Richie,
> Since these are part of the library API and can be prefixed with tst_
Make sense, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 0/2] Two small fixes for LTP-003
2021-11-30 10:50 [LTP] [PATCH 0/2] Two small fixes for LTP-003 Cyril Hrubis
2021-11-30 10:50 ` [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions Cyril Hrubis
2021-11-30 10:50 ` [LTP] [PATCH 2/2] sparse: Do not report static inline functions Cyril Hrubis
@ 2021-11-30 14:18 ` Richard Palethorpe
2 siblings, 0 replies; 7+ messages in thread
From: Richard Palethorpe @ 2021-11-30 14:18 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hello,
Pushed, Thanks!
Cyril Hrubis <chrubis@suse.cz> writes:
> This fixes false possitives for tst_fuzzy_sync.h
>
> Cyril Hrubis (2):
> include/tst_fuzzy_sync.h: Add inline to static fucntions
> sparse: Do not report static inline functions
>
> include/tst_fuzzy_sync.h | 14 +++++++-------
> tools/sparse/sparse-ltp.c | 2 +-
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> --
> 2.32.0
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions
2021-11-30 10:50 ` [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions Cyril Hrubis
2021-11-30 11:18 ` Petr Vorel
@ 2021-12-01 7:07 ` Li Wang
1 sibling, 0 replies; 7+ messages in thread
From: Li Wang @ 2021-12-01 7:07 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: LTP List
[-- Attachment #1.1: Type: text/plain, Size: 79 bytes --]
For the series:
Reviewed-by: Li Wang <liwang@redhat.com>
--
Regards,
Li Wang
[-- Attachment #1.2: Type: text/html, Size: 458 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-01 7:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 10:50 [LTP] [PATCH 0/2] Two small fixes for LTP-003 Cyril Hrubis
2021-11-30 10:50 ` [LTP] [PATCH 1/2] include/tst_fuzzy_sync.h: Add inline to static fucntions Cyril Hrubis
2021-11-30 11:18 ` Petr Vorel
2021-12-01 7:07 ` Li Wang
2021-11-30 10:50 ` [LTP] [PATCH 2/2] sparse: Do not report static inline functions Cyril Hrubis
2021-11-30 11:21 ` Petr Vorel
2021-11-30 14:18 ` [LTP] [PATCH 0/2] Two small fixes for LTP-003 Richard Palethorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.