Print this page
12257 resync smatch to 0.6.1-rc1-il-4


  10         int lock;
  11         unsigned long flags;
  12 
  13         if (({
  14                 int __ret;
  15                 flags = arch_local_irq_save();
  16                 __ret = spin_trylock(&lock);
  17                 if (!__ret)
  18                         arch_local_irq_restore(flags);
  19                 __ret;
  20             }))
  21                 return;
  22         frob();
  23 }
  24 
  25 /*
  26  * check-name: smatch locking #7
  27  * check-command: smatch -p=kernel -I.. sm_locking7.c
  28  *
  29  * check-output-start
  30 sm_locking7.c:22 func() warn: inconsistent returns 'irqsave:flags'.
  31   Locked on:   line 21
  32   Unlocked on: line 22
  33 sm_locking7.c:22 func() warn: inconsistent returns 'spin_lock:&lock'.
  34   Locked on:   line 21
  35   Unlocked on: line 22
  36  * check-output-end
  37  */


  10         int lock;
  11         unsigned long flags;
  12 
  13         if (({
  14                 int __ret;
  15                 flags = arch_local_irq_save();
  16                 __ret = spin_trylock(&lock);
  17                 if (!__ret)
  18                         arch_local_irq_restore(flags);
  19                 __ret;
  20             }))
  21                 return;
  22         frob();
  23 }
  24 
  25 /*
  26  * check-name: smatch locking #7
  27  * check-command: smatch -p=kernel -I.. sm_locking7.c
  28  *
  29  * check-output-start
  30 sm_locking7.c:22 func() warn: inconsistent returns 'flags'.
  31   Locked on  : 21
  32   Unlocked on: 22
  33 sm_locking7.c:22 func() warn: inconsistent returns 'lock'.
  34   Locked on  : 21
  35   Unlocked on: 22
  36  * check-output-end
  37  */