drivers: can: common: terminate if ... else if ... constructs with else
Terminate "if ... else if ..." constructs with an empty "else" clause to indicate that consideration has been given regarding the behaviour when all other conditions evaluate to false. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
404d92d516
commit
d5f07eb8c9
1 changed files with 4 additions and 0 deletions
|
@ -183,6 +183,8 @@ static int update_sample_pnt(uint32_t total_tq, uint32_t sample_pnt, struct can_
|
||||||
if (tseg2 < min->phase_seg2) {
|
if (tseg2 < min->phase_seg2) {
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* Sample point location within range */
|
||||||
}
|
}
|
||||||
|
|
||||||
res->phase_seg2 = tseg2;
|
res->phase_seg2 = tseg2;
|
||||||
|
@ -199,6 +201,8 @@ static int update_sample_pnt(uint32_t total_tq, uint32_t sample_pnt, struct can_
|
||||||
/* Even tseg1 distribution not possible, increase phase_seg1 */
|
/* Even tseg1 distribution not possible, increase phase_seg1 */
|
||||||
res->phase_seg1 = min->phase_seg1;
|
res->phase_seg1 = min->phase_seg1;
|
||||||
res->prop_seg = tseg1 - res->phase_seg1;
|
res->prop_seg = tseg1 - res->phase_seg1;
|
||||||
|
} else {
|
||||||
|
/* No redistribution necessary */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the resulting sample point */
|
/* Calculate the resulting sample point */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue