From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: gregkh@linuxfoundation.org
Cc: neil@brown.name, driverdev-devel@linuxdriverproject.org
Subject: [PATCH v9 12/15] staging: mt7621-pci: use BIT macro in preprocessor definitions
Date: Thu, 2 Aug 2018 08:25:47 +0200 [thread overview]
Message-ID: <1533191150-27269-13-git-send-email-sergio.paracuellos@gmail.com> (raw)
In-Reply-To: <1533191150-27269-1-git-send-email-sergio.paracuellos@gmail.com>
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 288f83a..d6f4085 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -62,17 +62,17 @@
* devices.
*/
-#define RALINK_PCIE0_CLK_EN (1<<24)
-#define RALINK_PCIE1_CLK_EN (1<<25)
-#define RALINK_PCIE2_CLK_EN (1<<26)
+#define RALINK_PCIE0_CLK_EN BIT(24)
+#define RALINK_PCIE1_CLK_EN BIT(25)
+#define RALINK_PCIE2_CLK_EN BIT(26)
#define RALINK_PCI_CONFIG_ADDR 0x20
#define RALINK_PCI_CONFIG_DATA_VIRTUAL_REG 0x24
#define RALINK_PCI_MEMBASE 0x28
#define RALINK_PCI_IOBASE 0x2C
-#define RALINK_PCIE0_RST (1<<24)
-#define RALINK_PCIE1_RST (1<<25)
-#define RALINK_PCIE2_RST (1<<26)
+#define RALINK_PCIE0_RST BIT(24)
+#define RALINK_PCIE1_RST BIT(25)
+#define RALINK_PCIE2_RST BIT(26)
#define RALINK_PCI_PCICFG_ADDR 0x0000
#define RALINK_PCI_PCIMSK_ADDR 0x000C
@@ -115,11 +115,11 @@
#define RALINK_PCIE_CLK_GEN 0x7c
#define RALINK_PCIE_CLK_GEN1 0x80
//RALINK_RSTCTRL bit
-#define RALINK_PCIE_RST (1<<23)
-#define RALINK_PCI_RST (1<<24)
+#define RALINK_PCIE_RST BIT(23)
+#define RALINK_PCI_RST BIT(24)
//RALINK_CLKCFG1 bit
-#define RALINK_PCI_CLK_EN (1<<19)
-#define RALINK_PCIE_CLK_EN (1<<21)
+#define RALINK_PCI_CLK_EN BIT(19)
+#define RALINK_PCIE_CLK_EN BIT(21)
#define MEMORY_BASE 0x0
static int pcie_link_status = 0;
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2018-08-02 6:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 6:25 [PATCH v9 00/15] staging: mt7621-pci: avoid custom pci config read and writes Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 01/15] staging: mt7621-pci: use generic kernel pci subsystem read and write Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 02/15] staging: mt7621-pci: remove dead code derived to not use custom reads and writes Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 03/15] staging: mt7621-pci: add pcie_write and pcie_read helpers Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 04/15] staging: mt7621-pci: use pcie_[read|write] in [write|read]_config Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 05/15] staging: mt7621-pci: simplify read_config function Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 06/15] staging: mt7621-pci: simplify write_config function Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 07/15] staging: mt7621-pci: remove unused macros Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 08/15] staging: mt7621-pci: avoid register duplication per controller using pcie_[read|write] Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 09/15] staging: mt7621-pci: review includes putting them in alphabethic order Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 10/15] staging: mt7621-pci: use pcie_[read|write] in RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 11/15] staging: mt7621-pci: remove RALINK_PCI_BASE from remaining definitions Sergio Paracuellos
2018-08-02 6:25 ` Sergio Paracuellos [this message]
2018-08-02 6:25 ` [PATCH v9 13/15] staging: mt7621-pci: rename RALINK_PCI_CONFIG_DATA_VIRTUAL_REG definition Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 14/15] staging: mt7621-pci: remove remaining pci_legacy dependant code Sergio Paracuellos
2018-08-02 6:25 ` [PATCH v9 15/15] staging: mt7621-dts: add pcie controller port registers Sergio Paracuellos
2018-08-03 4:33 ` [PATCH v9 00/15] staging: mt7621-pci: avoid custom pci config read and writes NeilBrown
2018-08-03 6:38 ` Sergio Paracuellos
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=1533191150-27269-13-git-send-email-sergio.paracuellos@gmail.com \
--to=sergio.paracuellos@gmail.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=neil@brown.name \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.