WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/3] Fix Spinlock compile errors

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2/3] Fix Spinlock compile errors
From: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Date: Wed, 29 Aug 2007 14:14:42 -0400
Delivery-date: Wed, 29 Aug 2007 11:21:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.5 (X11/20070719)
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 <bguthro@xxxxxxxxxxxxxxx>
diff -r e9f35dc18ae9 
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Aug 
15 16:15:06 2007 -0400
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Aug 
15 16:15:28 2007 -0400
@@ -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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 2/3] Fix Spinlock compile errors, Ben Guthro <=