OSDN Git Service

staging/atomisp: fix empty-body warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 20 Mar 2017 14:41:20 +0000 (14:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Mar 2017 07:04:33 +0000 (08:04 +0100)
commit72d2b01e84b25a5ff66662bcd97201c800130169
tree24d84926d3e06779513dd704ada4f2da7e7243c0
parent55a9177612fc4cb5d816f30667b4d9caf0f5a493
staging/atomisp: fix empty-body warning

Defining a debug function to nothing causes a warning with an empty block
after if()/else():

drivers/staging/media/atomisp/i2c/ov2680.c: In function 'ov2680_s_stream':
drivers/staging/media/atomisp/i2c/ov2680.c:1208:55: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]

This changes the empty debug statement to dev_dbg(), which by default also
does nothing, but avoids this warning and also checks the format string.
As a side-effect, we can now use dynamic debugging to turn on the
output at runtime.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/i2c/ov2680.c