[ofw] [Patches 15/26][Core] Adjust code to remove Prefast errors and warning
Smith, Stan
stan.smith at intel.com
Thu Jun 23 09:10:05 PDT 2011
>Sorry, probably I missed this email. Can you please note the number of patch or resend it ?
Duplicate defines in l2w_spinlock.h and mt_spinlock.h ?
l2w_spinlock.h
-#define read_lock_irqsave spin_lock_irqsave
-#define read_unlock_irqrestore spin_unlock_irqrestore
+#define read_lock_irqsave(lock, flags) cl_spinlock_acquire(lock)
+#define read_unlock_irqrestore(lock, flags) cl_spinlock_release(lock)
#define write_lock_irq spin_lock_irq
#define write_unlock_irq spin_unlock_irq
mt_spinlock.h
+#define spin_lock_irqsave (lock, flags) cl_spinlock_acquire(lock)
+#define spin_unlock_irqrestore (lock, flags) cl_spinlock_release(lock)
+
/* Windows doesn't support such kind of spinlocks so far, but may be tomorrow ... */
-#define rwlock_init spin_lock_init
-#define read_lock_irqsave spin_lock_irqsave
-#define read_unlock_irqrestore spin_unlock_irqrestore
-#define write_lock_irq spin_lock_irq
+#define rwlock_init spin_lock_init
+#define read_lock_irqsave(lock, flags) cl_spinlock_acquire(lock)
+#define read_unlock_irqrestore(lock, flags) cl_spinlock_release(lock)
+#define write_lock_irq spin_lock_irq
>
>-----Original Message-----
>From: Smith, Stan [mailto:stan.smith at intel.com]
>Sent: Wednesday, June 22, 2011 9:15 PM
>To: Alex Naslednikov; ofw at lists.openfabrics.org
>Subject: RE: [ofw] [Patches 15/26][Core] Adjust code to remove Prefast errors and warning
>
>See previous email on duplicate definitions...
>
>-#define spin_lock_irq spin_lock
>-#define spin_unlock_irq spin_unlock
>+#define spin_lock_irq(_lock_) cl_spinlock_acquire((cl_spinlock_t *)(_lock_))
>+#define spin_unlock_irq(_lock_) cl_spinlock_release((cl_spinlock_t *)(_lock_))
> #define spin_lock_nested(a,b) spin_lock(a)
>
>
>>-----Original Message-----
>>From: Alex Naslednikov [mailto:xalex at mellanox.co.il]
>>Sent: Sunday, June 19, 2011 5:32 AM
>>To: Alex Naslednikov; ofw at lists.openfabrics.org; Smith, Stan
>>Subject: RE: [ofw] [Patches 15/26][Core] Adjust code to remove Prefast errors and warning
>>
>>
>>Prefast: more robust macro definitions
>>
>>
>>
>>
>>Alexander (XaleX) Naslednikov
>>SW Networking Team
>>Mellanox Technologies
More information about the ofw
mailing list