aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-ids.h
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-06-20 07:24:35 -0400
committerJiri Kosina <jkosina@suse.cz>2010-06-21 07:41:54 -0400
commitca9fe1588427f246ad4c389b0170b29a432804b6 (patch)
tree79a8faa2a25efe789fb06be64bff5034c8659f65 /drivers/hid/hid-ids.h
parent6e32819e12ffbd507eced11a1871700a387d5407 (diff)
HID: eliminate a double lock in debug code
The path around the loop ends with the lock held, so the call to mutex_lock is moved before the beginning of the loop. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @locked@ expression E1; position p; @@ read_lock(E1@p,...); @r exists@ expression x <= locked.E1; expression locked.E1; expression E2; identifier lock; position locked.p,p1,p2; @@ *lock@p1 (E1@p,...); ... when != E1 when != \(x = E2\|&x\) *lock@p2 (E1,...); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-ids.h')
0 files changed, 0 insertions, 0 deletions