[media] atomisp: Fix -Werror=int-in-bool-context compile errors
authorHans de Goede <hdegoede@redhat.com>
Thu, 18 May 2017 13:50:18 +0000 (10:50 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 19 May 2017 09:57:21 +0000 (06:57 -0300)
commit02d978318b0983e7af6bbc9c1f9861b0d6983e37
treeee7274b73c9cad932085cc8397392e21e98abb05
parentc2c611b7b4f6cccbaea47e6b4a6853a129ddd1f8
[media] atomisp: Fix -Werror=int-in-bool-context compile errors

With gcc-7.1.1 I was getting the following compile error:

error: ‘*’ in boolean context, suggest ‘&&’ instead

The problem is the definition of CEIL_DIV:
 #define CEIL_DIV(a, b)       ((b) ? ((a) + (b) - 1) / (b) : 0)

Which when called as: CEIL_DIV(x, y * z) triggers this error, note
we cannot do as the error suggests since b is evaluated multiple times.

This commit fixes these compile errors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h