Fix Spinlock compile errors
PATCH 2/3 Fix Spinlock compile errors
Remove extra parentheses in netif_tx_lock_bh and etif_tx_unlock_bh macros, as it caused problems when compiling against a SLES9 tree.
While at first glance - the existing code should work, these extraneous parentheses were causing build errors. It seems to me this was either a buggy kernel, or a buggy compiler, for this to fail.
However, this change, (though subtle) does fix the compile error, and does not cause any other problems in newer guest kernels.
Signed-off-by Ben Guthro <[email protected]>
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +2 -2
@@ -108,8 +108,8 @@ extern char *kasprintf(gfp_t gfp, const#endif #if defined(_LINUX_NETDEVICE_H) &&LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,18 ) -#define netif_tx_lock_bh (dev) (spin_lock_bh(&(dev)->xmit_lock)) -#define netif_tx_unlock_bh (dev) (spin_unlock_bh(&(dev)->xmit_lock)) +#define netif_tx_lock_bh (dev) spin_lock_bh(&(dev)->xmit_lock) +#define netif_tx_unlock_bh (dev) spin_unlock_bh(&(dev)->xmit_lock)#endif #if defined(__LINUX_SEQLOCK_H) && !defined(DEFINE_SEQLOCK )
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel