mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:10:54 +07:00
scftorture: Check unexpected "switch" statement value
This commit adds a "default" case to the switch statement in scftorture_invoke_one() which contains a WARN_ON_ONCE() and an assignment to ->scfc_out to suppress knock-on warnings. These knock-on warnings could otherwise cause the user to think that there was a memory-ordering problem in smp_call_function() instead of a bug in scftorture.c itself. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
9a52a57467
commit
de77d4da54
@ -357,6 +357,10 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_ra
|
||||
}
|
||||
smp_call_function(scf_handler, scfcp, scfsp->scfs_wait);
|
||||
break;
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
if (scfcp)
|
||||
scfcp->scfc_out = true;
|
||||
}
|
||||
if (scfcp && scfsp->scfs_wait) {
|
||||
if (WARN_ON_ONCE(!scfcp->scfc_out))
|
||||
|
Loading…
Reference in New Issue
Block a user