Commit 77fdb168 authored by Vincent Cheng's avatar Vincent Cheng Committed by David S. Miller

ptp: ptp_clockmatrix: clean-up - parenthesis around a == b are unnecessary

Code clean-up.
Signed-off-by: default avatarVincent Cheng <vincent.cheng.xh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fde3b3a7
...@@ -444,7 +444,7 @@ static int _sync_pll_output(struct idtcm *idtcm, ...@@ -444,7 +444,7 @@ static int _sync_pll_output(struct idtcm *idtcm,
u16 sync_ctrl1; u16 sync_ctrl1;
u8 temp; u8 temp;
if ((qn == 0) && (qn_plus_1 == 0)) if (qn == 0 && qn_plus_1 == 0)
return 0; return 0;
switch (pll) { switch (pll) {
...@@ -509,7 +509,7 @@ static int _sync_pll_output(struct idtcm *idtcm, ...@@ -509,7 +509,7 @@ static int _sync_pll_output(struct idtcm *idtcm,
return err; return err;
/* PLL5 can have OUT8 as second additional output. */ /* PLL5 can have OUT8 as second additional output. */
if ((pll == 5) && (qn_plus_1 != 0)) { if (pll == 5 && qn_plus_1 != 0) {
err = idtcm_read(idtcm, 0, HW_Q8_CTRL_SPARE, err = idtcm_read(idtcm, 0, HW_Q8_CTRL_SPARE,
&temp, sizeof(temp)); &temp, sizeof(temp));
if (err) if (err)
...@@ -531,7 +531,7 @@ static int _sync_pll_output(struct idtcm *idtcm, ...@@ -531,7 +531,7 @@ static int _sync_pll_output(struct idtcm *idtcm,
} }
/* PLL6 can have OUT11 as second additional output. */ /* PLL6 can have OUT11 as second additional output. */
if ((pll == 6) && (qn_plus_1 != 0)) { if (pll == 6 && qn_plus_1 != 0) {
err = idtcm_read(idtcm, 0, HW_Q11_CTRL_SPARE, err = idtcm_read(idtcm, 0, HW_Q11_CTRL_SPARE,
&temp, sizeof(temp)); &temp, sizeof(temp));
if (err) if (err)
...@@ -654,7 +654,7 @@ static int idtcm_sync_pps_output(struct idtcm_channel *channel) ...@@ -654,7 +654,7 @@ static int idtcm_sync_pps_output(struct idtcm_channel *channel)
} }
} }
if ((qn != 0) || (qn_plus_1 != 0)) if (qn != 0 || qn_plus_1 != 0)
err = _sync_pll_output(idtcm, pll, sync_src, qn, err = _sync_pll_output(idtcm, pll, sync_src, qn,
qn_plus_1); qn_plus_1);
...@@ -1263,13 +1263,11 @@ static int idtcm_load_firmware(struct idtcm *idtcm, ...@@ -1263,13 +1263,11 @@ static int idtcm_load_firmware(struct idtcm *idtcm,
err = 0; err = 0;
/* Top (status registers) and bottom are read-only */ /* Top (status registers) and bottom are read-only */
if ((regaddr < GPIO_USER_CONTROL) if (regaddr < GPIO_USER_CONTROL || regaddr >= SCRATCH)
|| (regaddr >= SCRATCH))
continue; continue;
/* Page size 128, last 4 bytes of page skipped */ /* Page size 128, last 4 bytes of page skipped */
if (((loaddr > 0x7b) && (loaddr <= 0x7f)) if ((loaddr > 0x7b && loaddr <= 0x7f) || loaddr > 0xfb)
|| loaddr > 0xfb)
continue; continue;
err = idtcm_write(idtcm, regaddr, 0, &val, sizeof(val)); err = idtcm_write(idtcm, regaddr, 0, &val, sizeof(val));
...@@ -1688,7 +1686,7 @@ static int _enable_pll_tod_sync(struct idtcm *idtcm, ...@@ -1688,7 +1686,7 @@ static int _enable_pll_tod_sync(struct idtcm *idtcm,
u16 dpll; u16 dpll;
u16 out0 = 0, out1 = 0; u16 out0 = 0, out1 = 0;
if ((qn == 0) && (qn_plus_1 == 0)) if (qn == 0 && qn_plus_1 == 0)
return 0; return 0;
switch (pll) { switch (pll) {
...@@ -1883,7 +1881,7 @@ static int idtcm_enable_tod_sync(struct idtcm_channel *channel) ...@@ -1883,7 +1881,7 @@ static int idtcm_enable_tod_sync(struct idtcm_channel *channel)
} }
} }
if ((qn != 0) || (qn_plus_1 != 0)) if (qn != 0 || qn_plus_1 != 0)
err = _enable_pll_tod_sync(idtcm, pll, sync_src, qn, err = _enable_pll_tod_sync(idtcm, pll, sync_src, qn,
qn_plus_1); qn_plus_1);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment