From: Bryan Brattlof Date: Wed, 9 Apr 2025 17:26:20 +0000 (-0500) Subject: mips: octeon: remove unused middle expression X-Git-Tag: v2025.07-rc2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d1bd5bbbfaf725a4c159851203d658c1de83ba;p=pandora-u-boot.git 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 Reviewed-by: Daniel Schwierzeck --- diff --git a/arch/mips/mach-octeon/cvmx-helper-board.c b/arch/mips/mach-octeon/cvmx-helper-board.c index 6dcc4e557e1..8d9388983b7 100644 --- a/arch/mips/mach-octeon/cvmx-helper-board.c +++ b/arch/mips/mach-octeon/cvmx-helper-board.c @@ -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; } diff --git a/arch/mips/mach-octeon/cvmx-helper.c b/arch/mips/mach-octeon/cvmx-helper.c index ccec57edf84..7dcaa1ac8d9 100644 --- a/arch/mips/mach-octeon/cvmx-helper.c +++ b/arch/mips/mach-octeon/cvmx-helper.c @@ -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; }