kernel: layerscape: fix compilation error
[openwrt/staging/wigyori.git] / target / linux / layerscape / patches-4.14 / 713-sdk_qbman-Fix-error-in-IP-revision-comparison.patch
1 From b43b4fdd5caa4f66fd712c77589c167c952ec659 Mon Sep 17 00:00:00 2001
2 From: Roy Pledge <roy.pledge@nxp.com>
3 Date: Mon, 6 May 2019 11:18:57 -0400
4 Subject: [PATCH] sdk_qbman: Fix error in IP revision comparison
5
6 The comparison for QMAN_REV31 was incorrect as it
7 would always fail due to the wrong mask.
8
9 This fixes the following error in newer GCC versions:
10 "error: bitwise comparison always evaluates to false
11 [-Werror=tautological-compare]"
12
13 Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
14 ---
15 drivers/staging/fsl_qbman/qman_config.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/staging/fsl_qbman/qman_config.c
19 +++ b/drivers/staging/fsl_qbman/qman_config.c
20 @@ -812,7 +812,7 @@ int qman_set_sdest(u16 channel, unsigned
21
22 if (!qman_have_ccsr())
23 return -ENODEV;
24 - if ((qman_ip_rev & 0xFF00) == QMAN_REV31) {
25 + if ((qman_ip_rev & 0xFFFF) == QMAN_REV31) {
26 /* LS1043A - only one L2 cache */
27 cpu_idx = 0;
28 }