提交 8e8942b1 编写于 作者: I Ivan Vecera 提交者: David S. Miller

bna: remove unnecessary cast of BIT value

BIT value is already unsigned so casting is not necessary.
Signed-off-by: NIvan Vecera <ivecera@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a2bb6d7d
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "bfi_reg.h" #include "bfi_reg.h"
#include "bfa_defs.h" #include "bfa_defs.h"
#define bfa_ioc_ct_sync_pos(__ioc) \ #define bfa_ioc_ct_sync_pos(__ioc) BIT(bfa_ioc_pcifn(__ioc))
((u32)BIT(bfa_ioc_pcifn(__ioc)))
#define BFA_IOC_SYNC_REQD_SH 16 #define BFA_IOC_SYNC_REQD_SH 16
#define bfa_ioc_ct_get_sync_ackd(__val) (__val & 0x0000ffff) #define bfa_ioc_ct_get_sync_ackd(__val) (__val & 0x0000ffff)
#define bfa_ioc_ct_clear_sync_ackd(__val) (__val & 0xffff0000) #define bfa_ioc_ct_clear_sync_ackd(__val) (__val & 0xffff0000)
......
...@@ -207,7 +207,7 @@ bna_bfi_stats_get_rsp(struct bna *bna, struct bfi_msgq_mhdr *msghdr) ...@@ -207,7 +207,7 @@ bna_bfi_stats_get_rsp(struct bna *bna, struct bfi_msgq_mhdr *msghdr)
for (i = 0; i < BFI_ENET_CFG_MAX; i++) { for (i = 0; i < BFI_ENET_CFG_MAX; i++) {
stats_dst = (u64 *)&(bna->stats.hw_stats.rxf_stats[i]); stats_dst = (u64 *)&(bna->stats.hw_stats.rxf_stats[i]);
memset(stats_dst, 0, sizeof(struct bfi_enet_stats_rxf)); memset(stats_dst, 0, sizeof(struct bfi_enet_stats_rxf));
if (rx_enet_mask & ((u32)BIT(i))) { if (rx_enet_mask & BIT(i)) {
int k; int k;
count = sizeof(struct bfi_enet_stats_rxf) / count = sizeof(struct bfi_enet_stats_rxf) /
sizeof(u64); sizeof(u64);
...@@ -222,7 +222,7 @@ bna_bfi_stats_get_rsp(struct bna *bna, struct bfi_msgq_mhdr *msghdr) ...@@ -222,7 +222,7 @@ bna_bfi_stats_get_rsp(struct bna *bna, struct bfi_msgq_mhdr *msghdr)
for (i = 0; i < BFI_ENET_CFG_MAX; i++) { for (i = 0; i < BFI_ENET_CFG_MAX; i++) {
stats_dst = (u64 *)&(bna->stats.hw_stats.txf_stats[i]); stats_dst = (u64 *)&(bna->stats.hw_stats.txf_stats[i]);
memset(stats_dst, 0, sizeof(struct bfi_enet_stats_txf)); memset(stats_dst, 0, sizeof(struct bfi_enet_stats_txf));
if (tx_enet_mask & ((u32)BIT(i))) { if (tx_enet_mask & BIT(i)) {
int k; int k;
count = sizeof(struct bfi_enet_stats_txf) / count = sizeof(struct bfi_enet_stats_txf) /
sizeof(u64); sizeof(u64);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册