ACK: [Unstable][PATCH] UBUNTU: SAUCE: r8169: Fix compile warning
Agathe Porte
agathe.porte at canonical.com
Wed Nov 27 18:01:55 UTC 2024
2024-11-27 16:49 CET, Juerg Haefliger:
> BugLink: https://bugs.launchpad.net/bugs/2089676
>
> Add missing parentheses to fix a compile warning.
>
> drivers/net/ethernet/realtek/r8169_main.c: In function 'rtl_aspm_is_safe':
> drivers/net/ethernet/realtek/r8169_main.c:5278:52: warning: suggest parentheses around '&&' within '||' [-Werror=parentheses]
> 5278 | if (tp->mac_version >= RTL_GIGA_MAC_VER_61 &&
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
> 5279 | r8168_mac_ocp_read(tp, 0xc0b2) & 0xf ||
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: ("UBUNTU: SAUCE: r8169: Add quirks to enable ASPM on Dell platforms")
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
> drivers/net/ethernet/realtek/r8169_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index a3af67bfbd2b..8dd0ec0e5364 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -5434,9 +5434,9 @@ static bool rtl_aspm_is_safe(struct rtl8169_private *tp)
> * 3: CLKEREQ
> * 4-7: Reserved
> */
> - if (tp->mac_version >= RTL_GIGA_MAC_VER_61 &&
> - r8168_mac_ocp_read(tp, 0xc0b2) & 0xf ||
> - rtl_aspm_dell_workaround(tp))
> + if ((tp->mac_version >= RTL_GIGA_MAC_VER_61 &&
> + r8168_mac_ocp_read(tp, 0xc0b2) & 0xf) ||
> + rtl_aspm_dell_workaround(tp))
> return true;
>
> return false;
Acked-by: Agathe Porte <agathe.porte at canonical.com>
More information about the kernel-team
mailing list