diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-15 07:06:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 06:09:44 -0400 |
commit | ae316bb57d25d73ae9c1ddc9c59fe56d733849bf (patch) | |
tree | 8840e2675b2d2c04ccaf35390227272c14cb6dd7 /drivers/net/vmxnet3 | |
parent | 379b7383413d883ffc4db55914626ca303e6f7f5 (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')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 17 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_int.h | 17 |
2 files changed, 14 insertions, 20 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index b1de73b1bf1a..3f60e0e3097b 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -1548,23 +1548,6 @@ vmxnet3_free_irqs(struct vmxnet3_adapter *adapter) | |||
1548 | } | 1548 | } |
1549 | } | 1549 | } |
1550 | 1550 | ||
1551 | |||
1552 | inline void set_flag_le16(__le16 *data, u16 flag) | ||
1553 | { | ||
1554 | *data = cpu_to_le16(le16_to_cpu(*data) | flag); | ||
1555 | } | ||
1556 | |||
1557 | inline void set_flag_le64(__le64 *data, u64 flag) | ||
1558 | { | ||
1559 | *data = cpu_to_le64(le64_to_cpu(*data) | flag); | ||
1560 | } | ||
1561 | |||
1562 | inline void reset_flag_le64(__le64 *data, u64 flag) | ||
1563 | { | ||
1564 | *data = cpu_to_le64(le64_to_cpu(*data) & ~flag); | ||
1565 | } | ||
1566 | |||
1567 | |||
1568 | static void | 1551 | static void |
1569 | vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | 1552 | vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) |
1570 | { | 1553 | { |
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 { | |||
353 | #define VMXNET3_MAX_ETH_HDR_SIZE 22 | 353 | #define VMXNET3_MAX_ETH_HDR_SIZE 22 |
354 | #define VMXNET3_MAX_SKB_BUF_SIZE (3*1024) | 354 | #define VMXNET3_MAX_SKB_BUF_SIZE (3*1024) |
355 | 355 | ||
356 | void set_flag_le16(__le16 *data, u16 flag); | 356 | static inline void set_flag_le16(__le16 *data, u16 flag) |
357 | void set_flag_le64(__le64 *data, u64 flag); | 357 | { |
358 | void reset_flag_le64(__le64 *data, u64 flag); | 358 | *data = cpu_to_le16(le16_to_cpu(*data) | flag); |
359 | } | ||
360 | |||
361 | static inline void set_flag_le64(__le64 *data, u64 flag) | ||
362 | { | ||
363 | *data = cpu_to_le64(le64_to_cpu(*data) | flag); | ||
364 | } | ||
365 | |||
366 | static inline void reset_flag_le64(__le64 *data, u64 flag) | ||
367 | { | ||
368 | *data = cpu_to_le64(le64_to_cpu(*data) & ~flag); | ||
369 | } | ||
359 | 370 | ||
360 | int | 371 | int |
361 | vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter); | 372 | vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter); |