From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: rasesh.mody@qlogic.com
Subject: [PATCH net-next 1/3] bna: remove unnecessary cast of BIT value
Date: Wed, 17 Jun 2015 18:41:56 +0200 [thread overview]
Message-ID: <1434559318-31070-2-git-send-email-ivecera@redhat.com> (raw)
In-Reply-To: <1434559318-31070-1-git-send-email-ivecera@redhat.com>
BIT value is already unsigned so casting is not necessary.
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c | 3 +--
drivers/net/ethernet/brocade/bna/bna_enet.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c b/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
index 4247d8a..8d5c239 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
@@ -23,8 +23,7 @@
#include "bfi_reg.h"
#include "bfa_defs.h"
-#define bfa_ioc_ct_sync_pos(__ioc) \
- ((u32)BIT(bfa_ioc_pcifn(__ioc)))
+#define bfa_ioc_ct_sync_pos(__ioc) BIT(bfa_ioc_pcifn(__ioc))
#define BFA_IOC_SYNC_REQD_SH 16
#define bfa_ioc_ct_get_sync_ackd(__val) (__val & 0x0000ffff)
#define bfa_ioc_ct_clear_sync_ackd(__val) (__val & 0xffff0000)
diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c
index 05680e0..4e5c387 100644
--- a/drivers/net/ethernet/brocade/bna/bna_enet.c
+++ b/drivers/net/ethernet/brocade/bna/bna_enet.c
@@ -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++) {
stats_dst = (u64 *)&(bna->stats.hw_stats.rxf_stats[i]);
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;
count = sizeof(struct bfi_enet_stats_rxf) /
sizeof(u64);
@@ -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++) {
stats_dst = (u64 *)&(bna->stats.hw_stats.txf_stats[i]);
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;
count = sizeof(struct bfi_enet_stats_txf) /
sizeof(u64);
--
2.3.6
next prev parent reply other threads:[~2015-06-17 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 16:41 [PATCH net-next 0/3] bna: clean-up 2 Ivan Vecera
2015-06-17 16:41 ` Ivan Vecera [this message]
2015-06-17 16:41 ` [PATCH net-next 2/3] bna: make pointers to read-only inputs const Ivan Vecera
2015-06-17 16:41 ` [PATCH net-next 3/3] bna: remove superfluous parentheses Ivan Vecera
2015-06-21 17:32 ` [PATCH net-next 0/3] bna: clean-up 2 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434559318-31070-2-git-send-email-ivecera@redhat.com \
--to=ivecera@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rasesh.mody@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).