]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: hv: Move the contents of logging.h to hyperv.h
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:34:23 +0000 (19:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 18:46:17 +0000 (11:46 -0700)
Move the contents of logging.h to hyperv.h.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 files changed:
drivers/staging/hv/blkvsc_drv.c
drivers/staging/hv/channel.c
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/connection.c
drivers/staging/hv/hv.c
drivers/staging/hv/hv_kvp.c
drivers/staging/hv/hv_mouse.c
drivers/staging/hv/hv_util.c
drivers/staging/hv/hyperv.h
drivers/staging/hv/logging.h [deleted file]
drivers/staging/hv/netvsc.c
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/ring_buffer.c
drivers/staging/hv/rndis_filter.c
drivers/staging/hv/storvsc.c
drivers/staging/hv/storvsc_drv.c
drivers/staging/hv/vmbus_drv.c

index 039bc633d223209eec7c589b47748f82f279bd21..5059e448ca6cb336d3cb8d8769f5b70a91e507d9 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus.h"
 #include "storvsc_api.h"
 
index 071556268d949f05d7954eee626e0d43fdf51363..21cdfdea914a21836788309f210cfdbb973d5a46 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus_private.h"
 
 #define NUM_PAGES_SPANNED(addr, len) \
index 1184fffce0d1091b9977d39890255569c80473fb..ed1883fbc7e6f206a0e2313cfadc27e3f0db96f3 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus_private.h"
 #include "utils.h"
 
index 0128b50f5a9dc4d0df3e0379bfbe0d3174d099cc..6ebc10618ff18dc1719bdf069e52b81dd0c369ec 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus_private.h"
 
 
index a28fc31ca850646cf7070e581eb8ae80a301f9dc..2ceced20a266a9494cb23dc885498e080248f14d 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus_private.h"
 
 /* The one and only */
index c4f49d68af0ad50b61ee474c0bee4c3fc8139a47..237a42dd22659ffbe3c0a048e12611426a278de0 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/workqueue.h>
 
 #include "hyperv.h"
-#include "logging.h"
 #include "hv_api.h"
 #include "vmbus.h"
 #include "vmbus_private.h"
index 7b82bae41c588847a0ba6bf645aefbb5bfb80ee5..fbe3536996a9bad238eda048391cc78c7a1fd92f 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus.h"
 #include "vmbus_api.h"
 
index 31e067274ccddc1e9b7bdabd053acdd9f01cfe29..2e2ea5d29f20ed634ce54e220f7990d865af9907 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/pci.h>
 
 #include "hyperv.h"
-#include "logging.h"
 #include "hv_api.h"
 #include "vmbus.h"
 #include "vmbus_private.h"
index 45c45f2bb6ea9d4da88ed7f5019b38818dc21662..a596039d02ab8a50018764897a48b262ddaab77d 100644 (file)
@@ -689,4 +689,72 @@ extern void vmbus_get_debug_info(struct vmbus_channel *channel,
 
 extern void vmbus_ontimer(unsigned long data);
 
+
+#define LOWORD(dw) ((unsigned short)(dw))
+#define HIWORD(dw) ((unsigned short)(((unsigned int) (dw) >> 16) & 0xFFFF))
+
+
+#define VMBUS                          0x0001
+#define STORVSC                                0x0002
+#define NETVSC                         0x0004
+#define INPUTVSC                       0x0008
+#define BLKVSC                         0x0010
+#define VMBUS_DRV                      0x0100
+#define STORVSC_DRV                    0x0200
+#define NETVSC_DRV                     0x0400
+#define INPUTVSC_DRV           0x0800
+#define BLKVSC_DRV                     0x1000
+
+#define ALL_MODULES                    (VMBUS          |\
+                                                       STORVSC         |\
+                                                       NETVSC          |\
+                                                       INPUTVSC        |\
+                                                       BLKVSC          |\
+                                                       VMBUS_DRV       |\
+                                                       STORVSC_DRV     |\
+                                                       NETVSC_DRV      |\
+                                                       INPUTVSC_DRV|\
+                                                       BLKVSC_DRV)
+
+/* Logging Level */
+#define ERROR_LVL                              3
+#define WARNING_LVL                            4
+#define INFO_LVL                               6
+#define DEBUG_LVL                              7
+#define DEBUG_LVL_ENTEREXIT                    8
+#define DEBUG_RING_LVL                         9
+
+extern unsigned int vmbus_loglevel;
+
+#define DPRINT(mod, lvl, fmt, args...) do {\
+       if ((mod & (HIWORD(vmbus_loglevel))) && \
+           (lvl <= LOWORD(vmbus_loglevel)))    \
+               printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
+       } while (0)
+
+#define DPRINT_DBG(mod, fmt, args...) do {\
+       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
+           (DEBUG_LVL <= LOWORD(vmbus_loglevel)))      \
+               printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
+       } while (0)
+
+#define DPRINT_INFO(mod, fmt, args...) do {\
+       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
+           (INFO_LVL <= LOWORD(vmbus_loglevel)))       \
+               printk(KERN_INFO #mod": " fmt "\n", ## args);\
+       } while (0)
+
+#define DPRINT_WARN(mod, fmt, args...) do {\
+       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
+           (WARNING_LVL <= LOWORD(vmbus_loglevel)))    \
+               printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\
+       } while (0)
+
+#define DPRINT_ERR(mod, fmt, args...) do {\
+       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
+           (ERROR_LVL <= LOWORD(vmbus_loglevel)))      \
+               printk(KERN_ERR #mod": %s() ERROR!! " fmt "\n", \
+                      __func__, ## args);\
+       } while (0)
+
 #endif /* _HYPERV_H */
diff --git a/drivers/staging/hv/logging.h b/drivers/staging/hv/logging.h
deleted file mode 100644 (file)
index 1799951..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-
-
-#ifndef _LOGGING_H_
-#define _LOGGING_H_
-
-#define LOWORD(dw) ((unsigned short)(dw))
-#define HIWORD(dw) ((unsigned short)(((unsigned int) (dw) >> 16) & 0xFFFF))
-
-/* #include <linux/init.h> */
-/* #include <linux/module.h> */
-
-
-#define VMBUS                          0x0001
-#define STORVSC                                0x0002
-#define NETVSC                         0x0004
-#define INPUTVSC                       0x0008
-#define BLKVSC                         0x0010
-#define VMBUS_DRV                      0x0100
-#define STORVSC_DRV                    0x0200
-#define NETVSC_DRV                     0x0400
-#define INPUTVSC_DRV           0x0800
-#define BLKVSC_DRV                     0x1000
-
-#define ALL_MODULES                    (VMBUS          |\
-                                                       STORVSC         |\
-                                                       NETVSC          |\
-                                                       INPUTVSC        |\
-                                                       BLKVSC          |\
-                                                       VMBUS_DRV       |\
-                                                       STORVSC_DRV     |\
-                                                       NETVSC_DRV      |\
-                                                       INPUTVSC_DRV|\
-                                                       BLKVSC_DRV)
-
-/* Logging Level */
-#define ERROR_LVL                              3
-#define WARNING_LVL                            4
-#define INFO_LVL                               6
-#define DEBUG_LVL                              7
-#define DEBUG_LVL_ENTEREXIT                    8
-#define DEBUG_RING_LVL                         9
-
-extern unsigned int vmbus_loglevel;
-
-#define DPRINT(mod, lvl, fmt, args...) do {\
-       if ((mod & (HIWORD(vmbus_loglevel))) && \
-           (lvl <= LOWORD(vmbus_loglevel)))    \
-               printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
-       } while (0)
-
-#define DPRINT_DBG(mod, fmt, args...) do {\
-       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
-           (DEBUG_LVL <= LOWORD(vmbus_loglevel)))      \
-               printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
-       } while (0)
-
-#define DPRINT_INFO(mod, fmt, args...) do {\
-       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
-           (INFO_LVL <= LOWORD(vmbus_loglevel)))       \
-               printk(KERN_INFO #mod": " fmt "\n", ## args);\
-       } while (0)
-
-#define DPRINT_WARN(mod, fmt, args...) do {\
-       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
-           (WARNING_LVL <= LOWORD(vmbus_loglevel)))    \
-               printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\
-       } while (0)
-
-#define DPRINT_ERR(mod, fmt, args...) do {\
-       if ((mod & (HIWORD(vmbus_loglevel))) &&         \
-           (ERROR_LVL <= LOWORD(vmbus_loglevel)))      \
-               printk(KERN_ERR #mod": %s() ERROR!! " fmt "\n", \
-                      __func__, ## args);\
-       } while (0)
-
-#endif /* _LOGGING_H_ */
index 3a0a67e08dbfda13ed5b89569814c35892f48ae0..447cca75ea7f47fa0cc33973f4a78f0a32381058 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "netvsc.h"
 #include "rndis_filter.h"
 
index 3b04cfaa2e5eb8123d0ecee0aea01270acb0f9aa..6f4aeebcc82438f0f06ad3a26a36181b57945e3b 100644 (file)
@@ -41,7 +41,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus.h"
 #include "netvsc_api.h"
 
index 809bce28aea7c179cc9dfbdfa905d99d10a37d73..60aa1c63f6a2ccb1009daaec75174410a97cd166 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/mm.h>
 
 #include "hyperv.h"
-#include "logging.h"
 #include "ring_buffer.h"
 
 
index 5eff454bf585332dcb18ec609b90cb59ab9d8909..c6cb810a511c3d27f0ef46be4151e0b967da50e0 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/netdevice.h>
 
 #include "hyperv.h"
-#include "logging.h"
 #include "hv_api.h"
 #include "netvsc_api.h"
 #include "rndis_filter.h"
index 10db64dd0152ed3a81136457fe40daf509b3c5c8..b594fbf397200be0c1d79175d99a9bae55c5dec9 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "storvsc_api.h"
 #include "vstorage.h"
 
index 165d266b2374a1636a714aa5a6625b5cfc4839f7..852cf632c6883e75434807f4de60c810506b8964 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus.h"
 #include "storvsc_api.h"
 #include "vstorage.h"
index d6c08c55e2fe70d9b01d93ffc6a70f2fe629c197..935fab3a8940cb120316bb8f8b971b84a15b6dd3 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "hyperv.h"
 #include "hv_api.h"
-#include "logging.h"
 #include "vmbus.h"
 #include "vmbus_private.h"