[PATCH 985/985] Staging: RT2860: Fixed All errors in rt_linux.h

Previous thread: Resend: [PATCH] blkdev: fix blkdev_issue_zeroout return value by Dmitry Monakhov on Friday, August 6, 2010 - 3:42 am. (5 messages)

Next thread: [git pull] fuse: add store and retrieve support by Miklos Szeredi on Friday, August 6, 2010 - 3:51 am. (1 message)
From: Neil Munro
Date: Friday, August 6, 2010 - 3:49 am

From: Niadh <neilmunro@gmail.com>

Removed all errors from this file the warnings however remain.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
---
 drivers/staging/rt2860/rt_linux.h |  126 +++++++++++++++++-------------------
 1 files changed, 60 insertions(+), 66 deletions(-)

diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
index b370fb2..80a7ed8 100644
--- a/drivers/staging/rt2860/rt_linux.h
+++ b/drivers/staging/rt2860/rt_linux.h
@@ -101,20 +101,19 @@ extern const struct iw_handler_def rt28xx_iw_handler_def;
 /***********************************************************************************
  *	OS Specific definitions and data structures
  ***********************************************************************************/
-typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb,
-				     struct net_device * net_dev);
+typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff *skb,
+				     struct net_device *net_dev);

 #ifdef RTMP_MAC_PCI
 #ifndef PCI_DEVICE
-#define PCI_DEVICE(vend,dev) \
+#define PCI_DEVICE(vend, dev) \
 	.vendor = (vend), .device = (dev), \
 	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
 #endif /* PCI_DEVICE // */
 #endif /* RTMP_MAC_PCI // */

 #define RT_MOD_INC_USE_COUNT() \
-	if (!try_module_get(THIS_MODULE)) \
-	{ \
+	if (!try_module_get(THIS_MODULE)) {\
 		DBGPRINT(RT_DEBUG_ERROR, ("%s: cannot reserve module\n", __func__)); \
 		return -1; \
 	}
@@ -142,8 +141,8 @@ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev);
 #define NDIS_STATUS_INVALID_DATA				0x02
 #define NDIS_STATUS_RESOURCES                   0x03

-#define NDIS_SET_PACKET_STATUS(_p, _status)			do{} while(0)
-#define NdisWriteErrorLogEntry(_a, _b, _c, _d)		do{} while(0)
+#define NDIS_SET_PACKET_STATUS (_p, _status)			do {} while (0)
+#define NdisWriteErrorLogEntry (_a, _b, _c, _d)		do {} while (0)

 /* statistics counter */
 #define STATS_INC_RX_PACKETS(_pAd, _dev)
@@ -207,7 +206,7 @@ struct ...
From: Greg KH
Date: Tuesday, August 31, 2010 - 11:56 am

This patch breaks the build:
drivers/staging/rt2860/sta/rtmp_data.c: In function ‘STASendPackets’:
drivers/staging/rt2860/sta/rtmp_data.c:885:5: error: ‘_p’ undeclared (first use in this function)
drivers/staging/rt2860/sta/rtmp_data.c:885:5: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/rt2860/sta/rtmp_data.c:885:5: error: ‘_status’ undeclared (first use in this function)
drivers/staging/rt2860/sta/rtmp_data.c:885:5: warning: left-hand operand of comma expression has no effect
drivers/staging/rt2860/sta/rtmp_data.c:885:5: error: expected ‘;’ before ‘do’

Please always test your patches before you send them out.

I've dropped this one.

thanks,

greg k-h
--

Previous thread: Resend: [PATCH] blkdev: fix blkdev_issue_zeroout return value by Dmitry Monakhov on Friday, August 6, 2010 - 3:42 am. (5 messages)

Next thread: [git pull] fuse: add store and retrieve support by Miklos Szeredi on Friday, August 6, 2010 - 3:51 am. (1 message)