atheros: do not assignment in if condition
Remove assignments from if conditions as suggested by checkpatch. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> SVN-Revision: 41084
This commit is contained in:
parent
5427e47e59
commit
3406e402ef
5 changed files with 13 additions and 10 deletions
|
@ -1524,7 +1524,7 @@
|
||||||
+
|
+
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/ar231x/ar5312.c
|
+++ b/arch/mips/ar231x/ar5312.c
|
||||||
@@ -0,0 +1,579 @@
|
@@ -0,0 +1,580 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This file is subject to the terms and conditions of the GNU General Public
|
+ * This file is subject to the terms and conditions of the GNU General Public
|
||||||
+ * License. See the file "COPYING" in the main directory of this archive
|
+ * License. See the file "COPYING" in the main directory of this archive
|
||||||
|
@ -1975,7 +1975,7 @@
|
||||||
+static int __init
|
+static int __init
|
||||||
+ar5312_cpu_frequency(void)
|
+ar5312_cpu_frequency(void)
|
||||||
+{
|
+{
|
||||||
+ unsigned int result;
|
+ unsigned int scratch;
|
||||||
+ unsigned int predivide_mask, predivide_shift;
|
+ unsigned int predivide_mask, predivide_shift;
|
||||||
+ unsigned int multiplier_mask, multiplier_shift;
|
+ unsigned int multiplier_mask, multiplier_shift;
|
||||||
+ unsigned int clock_ctl1, predivide_select, predivisor, multiplier;
|
+ unsigned int clock_ctl1, predivide_select, predivisor, multiplier;
|
||||||
|
@ -1983,8 +1983,9 @@
|
||||||
+ u16 devid;
|
+ u16 devid;
|
||||||
+
|
+
|
||||||
+ /* Trust the bootrom's idea of cpu frequency. */
|
+ /* Trust the bootrom's idea of cpu frequency. */
|
||||||
+ if ((result = ar231x_read_reg(AR5312_SCRATCH)))
|
+ scratch = ar231x_read_reg(AR5312_SCRATCH);
|
||||||
+ return result;
|
+ if (scratch)
|
||||||
|
+ return scratch;
|
||||||
+
|
+
|
||||||
+ devid = ar231x_read_reg(AR531X_REV);
|
+ devid = ar231x_read_reg(AR531X_REV);
|
||||||
+ devid &= AR531X_REV_MAJ;
|
+ devid &= AR531X_REV_MAJ;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
+obj-$(CONFIG_NET_VENDOR_AR231X) += ar231x.o
|
+obj-$(CONFIG_NET_VENDOR_AR231X) += ar231x.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/net/ethernet/ar231x/ar231x.c
|
+++ b/drivers/net/ethernet/ar231x/ar231x.c
|
||||||
@@ -0,0 +1,1265 @@
|
@@ -0,0 +1,1266 @@
|
||||||
+/*
|
+/*
|
||||||
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
|
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
|
||||||
+ *
|
+ *
|
||||||
|
@ -905,8 +905,9 @@
|
||||||
+
|
+
|
||||||
+ while (idx != sp->tx_prd) {
|
+ while (idx != sp->tx_prd) {
|
||||||
+ txdesc = &sp->tx_ring[idx];
|
+ txdesc = &sp->tx_ring[idx];
|
||||||
|
+ status = txdesc->status;
|
||||||
+
|
+
|
||||||
+ if ((status = txdesc->status) & DMA_TX_OWN) {
|
+ if (status & DMA_TX_OWN) {
|
||||||
+ /* ar231x dma still owns descr */
|
+ /* ar231x dma still owns descr */
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/watchdog/ar2315-wtd.c
|
+++ b/drivers/watchdog/ar2315-wtd.c
|
||||||
@@ -0,0 +1,199 @@
|
@@ -0,0 +1,200 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
+ * This program is free software; you can redistribute it and/or modify
|
||||||
+ * it under the terms of the GNU General Public License as published by
|
+ * it under the terms of the GNU General Public License as published by
|
||||||
|
@ -117,7 +117,8 @@
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
+ case WDIOC_SETTIMEOUT:
|
+ case WDIOC_SETTIMEOUT:
|
||||||
+ if((ret = get_user(new_wdt_timeout, (int __user *)arg)))
|
+ ret = get_user(new_wdt_timeout, (int __user *)arg);
|
||||||
|
+ if (ret)
|
||||||
+ break;
|
+ break;
|
||||||
+ wdt_timeout = HEARTBEAT(new_wdt_timeout);
|
+ wdt_timeout = HEARTBEAT(new_wdt_timeout);
|
||||||
+ ar2315_wdt_enable();
|
+ ar2315_wdt_enable();
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1119,6 +1165,9 @@ static int ar231x_ioctl(struct net_devic
|
@@ -1120,6 +1166,9 @@ static int ar231x_ioctl(struct net_devic
|
||||||
struct ar231x_private *sp = netdev_priv(dev);
|
struct ar231x_private *sp = netdev_priv(dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/ethernet/ar231x/ar231x.c
|
--- a/drivers/net/ethernet/ar231x/ar231x.c
|
||||||
+++ b/drivers/net/ethernet/ar231x/ar231x.c
|
+++ b/drivers/net/ethernet/ar231x/ar231x.c
|
||||||
@@ -1282,7 +1282,7 @@ static int ar231x_mdiobus_probe (struct
|
@@ -1283,7 +1283,7 @@ static int ar231x_mdiobus_probe (struct
|
||||||
BUG_ON(!phydev);
|
BUG_ON(!phydev);
|
||||||
BUG_ON(phydev->attached_dev);
|
BUG_ON(phydev->attached_dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue