etnaviv: Replace bitwise OR with logical OR
authorMarek Vasut <marex@denx.de>
Mon, 18 Nov 2019 18:12:49 +0000 (19:12 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 20 Dec 2019 12:15:37 +0000 (13:15 +0100)
The test here is testing whether either variable is non-zero.
While currently the test works fine, it's fragile. Replace it
with logical OR to avoid the fragility.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_shader.c

index 0415538e28799036275f2acd8c4efe780efffcd2..937a83c89798f5863417db6c8ed7397d6cb4d522 100644 (file)
@@ -212,7 +212,7 @@ etna_link_shaders(struct etna_context *ctx, struct compiled_shader_state *cs,
    cs->ps_inst_mem_size = fs->code_size;
    cs->PS_INST_MEM = fs->code;
 
-   if (vs->needs_icache | fs->needs_icache) {
+   if (vs->needs_icache || fs->needs_icache) {
       /* If either of the shaders needs ICACHE, we use it for both. It is
        * either switched on or off for the entire shader processor.
        */