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:
Bryan Brattlof
2025-05-06 15:43:19 -06:00
committed by Tom Rini
parent 46b3580c59
commit 13d1bd5bbb
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}