All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver
@ 2017-02-20  9:29 John Crispin
  2017-02-20  9:29 ` [PATCH 1/3] arch: mips: pci: remove duplicate define in " John Crispin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: John Crispin @ 2017-02-20  9:29 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin

While updating the LEDE kernel to v4.9 i stumbled across a fw compile
warnings. While fixing these warnings I also noticed that the BIT() macro
was not used.

John Crispin (3):
  arch: mips: pci: remove duplicate define in mt7620 driver
  arch: mips: pci: remove KERN_WARN instance inside the mt7620 driver
  arch: mips: pci: make use of the BIT() macro inside the mt7620 driver

 arch/mips/pci/pci-mt7620.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] arch: mips: pci: remove duplicate define in mt7620 driver
  2017-02-20  9:29 [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver John Crispin
@ 2017-02-20  9:29 ` John Crispin
  2017-02-20  9:29 ` [PATCH 2/3] arch: mips: pci: remove KERN_WARN instance inside the " John Crispin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: John Crispin @ 2017-02-20  9:29 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin

An invalid and duplicate define has gone unnoticed for some time. lets
remove it. The correct define is 3 lines below.

Signed-off-by: John Crispin <john@phrozen.org>
---
 arch/mips/pci/pci-mt7620.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c
index 628c513..3fdaf7c 100644
--- a/arch/mips/pci/pci-mt7620.c
+++ b/arch/mips/pci/pci-mt7620.c
@@ -33,7 +33,6 @@
 #define RALINK_GPIOMODE			0x60
 
 #define PPLL_CFG1			0x9c
-#define PDRV_SW_SET			BIT(23)
 
 #define PPLL_DRV			0xa0
 #define PDRV_SW_SET			(1<<31)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] arch: mips: pci: remove KERN_WARN instance inside the mt7620 driver
  2017-02-20  9:29 [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver John Crispin
  2017-02-20  9:29 ` [PATCH 1/3] arch: mips: pci: remove duplicate define in " John Crispin
@ 2017-02-20  9:29 ` John Crispin
  2017-02-20  9:29 ` [PATCH 3/3] arch: mips: pci: make use of the BIT() macro " John Crispin
  2017-11-13 14:15   ` James Hogan
  3 siblings, 0 replies; 6+ messages in thread
From: John Crispin @ 2017-02-20  9:29 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin

Switch the printk() call to the prefered pr_warn() api.

Signed-off-by: John Crispin <john@phrozen.org>
---
 arch/mips/pci/pci-mt7620.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c
index 3fdaf7c..902fa61 100644
--- a/arch/mips/pci/pci-mt7620.c
+++ b/arch/mips/pci/pci-mt7620.c
@@ -120,7 +120,7 @@ static int wait_pciephy_busy(void)
 		else
 			break;
 		if (retry++ > WAITRETRY_MAX) {
-			printk(KERN_WARN "PCIE-PHY retry failed.\n");
+			pr_warn("PCIE-PHY retry failed.\n");
 			return -1;
 		}
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] arch: mips: pci: make use of the BIT() macro inside the mt7620 driver
  2017-02-20  9:29 [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver John Crispin
  2017-02-20  9:29 ` [PATCH 1/3] arch: mips: pci: remove duplicate define in " John Crispin
  2017-02-20  9:29 ` [PATCH 2/3] arch: mips: pci: remove KERN_WARN instance inside the " John Crispin
@ 2017-02-20  9:29 ` John Crispin
  2017-11-13 14:15   ` James Hogan
  3 siblings, 0 replies; 6+ messages in thread
From: John Crispin @ 2017-02-20  9:29 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin

There are a few defines that manully shift a bit. Change these to using
the BIT() macro.

Signed-off-by: John Crispin <john@phrozen.org>
---
 arch/mips/pci/pci-mt7620.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c
index 902fa61..68fd019 100644
--- a/arch/mips/pci/pci-mt7620.c
+++ b/arch/mips/pci/pci-mt7620.c
@@ -35,11 +35,11 @@
 #define PPLL_CFG1			0x9c
 
 #define PPLL_DRV			0xa0
-#define PDRV_SW_SET			(1<<31)
-#define LC_CKDRVPD			(1<<19)
-#define LC_CKDRVOHZ			(1<<18)
-#define LC_CKDRVHZ			(1<<17)
-#define LC_CKTEST			(1<<16)
+#define PDRV_SW_SET			BIT(31)
+#define LC_CKDRVPD			BIT(19)
+#define LC_CKDRVOHZ			BIT(18)
+#define LC_CKDRVHZ			BIT(17)
+#define LC_CKTEST			BIT(16)
 
 /* PCI Bridge registers */
 #define RALINK_PCI_PCICFG_ADDR		0x00
@@ -65,7 +65,7 @@
 #define PCIEPHY0_CFG			0x90
 
 #define RALINK_PCIEPHY_P0_CTL_OFFSET	0x7498
-#define RALINK_PCIE0_CLK_EN		(1 << 26)
+#define RALINK_PCIE0_CLK_EN		BIT(26)
 
 #define BUSY				0x80000000
 #define WAITRETRY_MAX			10
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver
@ 2017-11-13 14:15   ` James Hogan
  0 siblings, 0 replies; 6+ messages in thread
From: James Hogan @ 2017-11-13 14:15 UTC (permalink / raw)
  To: John Crispin; +Cc: Ralf Baechle, linux-mips

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

On Mon, Feb 20, 2017 at 10:29:41AM +0100, John Crispin wrote:
> While updating the LEDE kernel to v4.9 i stumbled across a fw compile
> warnings. While fixing these warnings I also noticed that the BIT() macro
> was not used.
> 
> John Crispin (3):
>   arch: mips: pci: remove duplicate define in mt7620 driver
>   arch: mips: pci: remove KERN_WARN instance inside the mt7620 driver
>   arch: mips: pci: make use of the BIT() macro inside the mt7620 driver

Thanks, all applied.

Cheers
James

> 
>  arch/mips/pci/pci-mt7620.c |   15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> -- 
> 1.7.10.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver
@ 2017-11-13 14:15   ` James Hogan
  0 siblings, 0 replies; 6+ messages in thread
From: James Hogan @ 2017-11-13 14:15 UTC (permalink / raw)
  To: John Crispin; +Cc: Ralf Baechle, linux-mips

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

On Mon, Feb 20, 2017 at 10:29:41AM +0100, John Crispin wrote:
> While updating the LEDE kernel to v4.9 i stumbled across a fw compile
> warnings. While fixing these warnings I also noticed that the BIT() macro
> was not used.
> 
> John Crispin (3):
>   arch: mips: pci: remove duplicate define in mt7620 driver
>   arch: mips: pci: remove KERN_WARN instance inside the mt7620 driver
>   arch: mips: pci: make use of the BIT() macro inside the mt7620 driver

Thanks, all applied.

Cheers
James

> 
>  arch/mips/pci/pci-mt7620.c |   15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> -- 
> 1.7.10.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-13 14:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20  9:29 [PATCH 0/3] arch: mips: pci: cleanups and fixes for mt7620 driver John Crispin
2017-02-20  9:29 ` [PATCH 1/3] arch: mips: pci: remove duplicate define in " John Crispin
2017-02-20  9:29 ` [PATCH 2/3] arch: mips: pci: remove KERN_WARN instance inside the " John Crispin
2017-02-20  9:29 ` [PATCH 3/3] arch: mips: pci: make use of the BIT() macro " John Crispin
2017-11-13 14:15 ` [PATCH 0/3] arch: mips: pci: cleanups and fixes for " James Hogan
2017-11-13 14:15   ` James Hogan

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.