From fb8d071b43d67f2f07e49df34a87cb2653001431 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 31 Mar 2010 13:26:55 +0300 Subject: [PATCH] locking: make "sometimes locked" messages depend on --spammy There is probably a better way to clean these up, but for now just turn them off. Signed-off-by: Dan Carpenter --- check_locking.c | 6 ++++-- validation/sm_implied4.c | 2 +- validation/sm_locking.c | 2 +- validation/sm_wine_locking.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/check_locking.c b/check_locking.c index ad28d2e7..42e58757 100644 --- a/check_locking.c +++ b/check_locking.c @@ -508,6 +508,9 @@ static void check_possible(struct sm_state *sm) int isunlocked = 0; int undef = 0; + if (!option_spammy) + return; + FOR_EACH_PTR(sm->possible, tmp) { if (tmp->state == &locked) islocked = 1; @@ -528,8 +531,7 @@ static void check_possible(struct sm_state *sm) undef = 1; // i don't think this is possible any more. } END_FOR_EACH_PTR(tmp); if ((islocked && isunlocked) || undef) - sm_msg("warn: '%s' is sometimes locked here and " - "sometimes unlocked.", sm->name); + sm_msg("warn: '%s' is sometimes locked here and sometimes unlocked.", sm->name); } static void match_return(struct expression *ret_value) diff --git a/validation/sm_implied4.c b/validation/sm_implied4.c index 0ddbdae4..cb815ee5 100644 --- a/validation/sm_implied4.c +++ b/validation/sm_implied4.c @@ -27,7 +27,7 @@ int func (void) /* * check-name: Smatch implied #4 - * check-command: smatch --project=kernel sm_implied4.c + * check-command: smatch --project=kernel --spammy sm_implied4.c * * check-output-start sm_implied4.c +22 func(14) warn: 'spin_lock:mylock' is sometimes locked here and sometimes unlocked. diff --git a/validation/sm_locking.c b/validation/sm_locking.c index 3c898e54..d167475b 100644 --- a/validation/sm_locking.c +++ b/validation/sm_locking.c @@ -27,7 +27,7 @@ int func (void) } /* * check-name: Smatch locking #1 - * check-command: smatch --project=kernel sm_locking.c + * check-command: smatch --project=kernel --spammy sm_locking.c * * check-output-start sm_locking.c +26 func(20) warn: 'spin_lock:mylock3' is sometimes locked here and sometimes unlocked. diff --git a/validation/sm_wine_locking.c b/validation/sm_wine_locking.c index 94b0fa2e..617c4241 100644 --- a/validation/sm_wine_locking.c +++ b/validation/sm_wine_locking.c @@ -34,7 +34,7 @@ void test1(void) } /* * check-name: WINE locking - * check-command: smatch -p=wine sm_wine_locking.c + * check-command: smatch -p=wine --spammy sm_wine_locking.c * * check-output-start sm_wine_locking.c +28 test1(18) error: double unlock 'create_window_handle:b' -- 2.11.4.GIT