Skip to contentSkip to conversation

ehci-atmel: fix compiler warning

PATCH New Andreas Bießmann 1 participant 1 message Jun 28, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ehci-atmel: fix compiler warning

Commit f61483c539439d32278faec62753811734737cce intoduced following warning:
---8<---
ehci-atmel.c: In function 'ehci_hcd_init':
ehci-atmel.c:49:2: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] ehci-atmel.c: In function 'ehci_hcd_stop':
ehci-atmel.c:79:2: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] --->8---

This patch fixes it.

---
I'm really sorry, should have run the compile check before submission. This warning was introduced in v3, it was not there in v2. Maybe there was a misunderstanding between you Marek and you Bo. I will apply this patch immidiately.

Best regards

Andreas Bie?mann

 drivers/usb/host/ehci-atmel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-atmel.c +2 -2
index 532db22..15b9b60 100644
@@ -46,7 +46,7 @@ int ehci_hcd_init(void)
 	start_time = get_timer(0);
 	/* Enable UTMI PLL */
 	writel(AT91_PMC_UPLLEN | AT91_PMC_BIASEN, &pmc->uckr);
-	while (readl(&pmc->sr) & AT91_PMC_LOCKU != AT91_PMC_LOCKU) {
+	while ((readl(&pmc->sr) & AT91_PMC_LOCKU) != AT91_PMC_LOCKU) {
 		WATCHDOG_RESET();
 		tmp_time = get_timer(0);
 		if ((tmp_time - start_time) > EN_UPLL_TIMEOUT) {
@@ -76,7 +76,7 @@ int ehci_hcd_stop(void)
 	start_time = get_timer(0);
 	/* Disable UTMI PLL */
 	writel(readl(&pmc->uckr) & ~AT91_PMC_UPLLEN, &pmc->uckr);
-	while (readl(&pmc->sr) & AT91_PMC_LOCKU == AT91_PMC_LOCKU) {
+	while ((readl(&pmc->sr) & AT91_PMC_LOCKU) == AT91_PMC_LOCKU) {
 		WATCHDOG_RESET();
 		tmp_time = get_timer(0);
 		if ((tmp_time - start_time) > EN_UPLL_TIMEOUT) {
Signature · 1 line
1.7.10