aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/vmxnet3/vmxnet3_int.h
diff options
context:
space:
mode:
authorstephen hemminger2010-10-15 11:06:20 +0000
committerDavid S. Miller2010-10-21 03:09:44 -0700
commitae316bb57d25d73ae9c1ddc9c59fe56d733849bf (patch)
tree8840e2675b2d2c04ccaf35390227272c14cb6dd7 /drivers/net/vmxnet3/vmxnet3_int.h
parent379b7383413d883ffc4db55914626ca303e6f7f5 (diff)
vmxnet3: make bit twiddle routines inline
Gcc doesn't usually handle inline across compilation units, and the functions don't have to be global in scope. Move the set/reset flag functions int the existing vmxnet3 header. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_int.h')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_int.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index 2121c735cabd..c88ea5cbba0d 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -353,9 +353,20 @@ struct vmxnet3_adapter {
#define VMXNET3_MAX_ETH_HDR_SIZE 22
#define VMXNET3_MAX_SKB_BUF_SIZE (3*1024)
-void set_flag_le16(__le16 *data, u16 flag);
-void set_flag_le64(__le64 *data, u64 flag);
-void reset_flag_le64(__le64 *data, u64 flag);
+static inline void set_flag_le16(__le16 *data, u16 flag)
+{
+ *data = cpu_to_le16(le16_to_cpu(*data) | flag);
+}
+
+static inline void set_flag_le64(__le64 *data, u64 flag)
+{
+ *data = cpu_to_le64(le64_to_cpu(*data) | flag);
+}
+
+static inline void reset_flag_le64(__le64 *data, u64 flag)
+{
+ *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
+}
int
vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter);