!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>
/* 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;
}
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;
}