From: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
To: Manish Chopra <manishc@marvell.com>,
GR-Linux-NIC-Dev@marvell.com, Coiby Xu <coiby.xu@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Cc: kumaran.4353@gmail.com
Subject: [PATCH 2/2] staging: qlge: Replace the occurrences of (1<<x) by BIT(x)
Date: Tue, 17 Oct 2023 12:06:23 -0700 [thread overview]
Message-ID: <5a962ea2ab9a40b1da11d95cdaf990002ffed7fa.1697568757.git.nandhakumar.singaram@gmail.com> (raw)
In-Reply-To: <cover.1697568757.git.nandhakumar.singaram@gmail.com>
Adhere to linux coding style. Replace the occurrences of
(1<<x) by BIT(x)
Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
---
drivers/staging/qlge/qlge_main.c | 8 ++++----
drivers/staging/qlge/qlge_mpi.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 1ead7793062a..9f67e44123cc 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -2191,7 +2191,7 @@ static int qlge_napi_poll_msix(struct napi_struct *napi, int budget)
/* If this TX completion ring belongs to this vector and
* it's not empty then service it.
*/
- if ((ctx->irq_mask & (1 << trx_ring->cq_id)) &&
+ if ((ctx->irq_mask & BIT(trx_ring->cq_id)) &&
(qlge_read_sh_reg(trx_ring->prod_idx_sh_reg) !=
trx_ring->cnsmr_idx)) {
netif_printk(qdev, intr, KERN_DEBUG, qdev->ndev,
@@ -3222,13 +3222,13 @@ static void qlge_set_irq_mask(struct qlge_adapter *qdev, struct intr_context *ct
/* Add the RSS ring serviced by this vector
* to the mask.
*/
- ctx->irq_mask = (1 << qdev->rx_ring[vect].cq_id);
+ ctx->irq_mask = BIT(qdev->rx_ring[vect].cq_id);
/* Add the TX ring(s) serviced by this vector
* to the mask.
*/
for (j = 0; j < tx_rings_per_vector; j++) {
ctx->irq_mask |=
- (1 << qdev->rx_ring[qdev->rss_ring_count +
+ BIT(qdev->rx_ring[qdev->rss_ring_count +
(vect * tx_rings_per_vector) + j].cq_id);
}
} else {
@@ -3236,7 +3236,7 @@ static void qlge_set_irq_mask(struct qlge_adapter *qdev, struct intr_context *ct
* ID into the mask.
*/
for (j = 0; j < qdev->rx_ring_count; j++)
- ctx->irq_mask |= (1 << qdev->rx_ring[j].cq_id);
+ ctx->irq_mask |= BIT(qdev->rx_ring[j].cq_id);
}
}
diff --git a/drivers/staging/qlge/qlge_mpi.c b/drivers/staging/qlge/qlge_mpi.c
index 96a4de6d2b34..ce0b54603071 100644
--- a/drivers/staging/qlge/qlge_mpi.c
+++ b/drivers/staging/qlge/qlge_mpi.c
@@ -113,7 +113,7 @@ int qlge_own_firmware(struct qlge_adapter *qdev)
* core dump and firmware reset after an error.
*/
temp = qlge_read32(qdev, STS);
- if (!(temp & (1 << (8 + qdev->alt_func))))
+ if (!(temp & BIT((8 + qdev->alt_func))))
return 1;
return 0;
--
2.25.1
next prev parent reply other threads:[~2023-10-17 19:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 19:03 [PATCH 0/2] staging: qlge: Replace the occurrences of (1<<x) by BIT(x) Nandha Kumar Singaram
2023-10-17 19:05 ` [PATCH 1/2] " Nandha Kumar Singaram
2023-10-17 19:06 ` Nandha Kumar Singaram [this message]
2023-10-18 13:28 ` [PATCH 0/2] " Greg Kroah-Hartman
2023-10-18 17:01 ` Nandha Kumar Singaram
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=5a962ea2ab9a40b1da11d95cdaf990002ffed7fa.1697568757.git.nandhakumar.singaram@gmail.com \
--to=nandhakumar.singaram@gmail.com \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=coiby.xu@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kumaran.4353@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
/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