mips: octeon: remove unused middle expression
!A || (A && B) is equivalent to !A || B Drop the unused middle expression to simplify the statement. Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
This commit is contained in:
@@ -386,8 +386,7 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get_from_dt(int ipd_port)
|
||||
/* If the link is down or the link is up but we still register
|
||||
* the module as being absent, re-check mod_abs.
|
||||
*/
|
||||
if (!result.s.link_up ||
|
||||
(result.s.link_up && sfp_info->last_mod_abs))
|
||||
if (!result.s.link_up || sfp_info->last_mod_abs)
|
||||
__cvmx_helper_update_sfp(ipd_port, sfp_info, result);
|
||||
sfp_info = sfp_info->next_iface_sfp;
|
||||
}
|
||||
|
||||
@@ -1729,7 +1729,7 @@ cvmx_helper_link_info_t cvmx_helper_link_get(int xipd_port)
|
||||
sfp_info = cvmx_helper_cfg_get_sfp_info(xiface, index);
|
||||
|
||||
while (sfp_info) {
|
||||
if ((!result.s.link_up || (result.s.link_up && sfp_info->last_mod_abs)))
|
||||
if (!result.s.link_up || sfp_info->last_mod_abs)
|
||||
cvmx_sfp_check_mod_abs(sfp_info, sfp_info->mod_abs_data);
|
||||
sfp_info = sfp_info->next_iface_sfp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user