提交 f57cdbd3 编写于 作者: A Arnd Bergmann 提交者: Mauro Carvalho Chehab

media: v4l: use WARN_ON(1) instead of __WARN()

__WARN() cannot be used in portable code, since it is only
available on some architectures and configurations:

drivers/media/platform/pxa_camera.c: In function 'pxa_mbus_config_compatible':
drivers/media/platform/pxa_camera.c:642:3: error: implicit declaration of function '__WARN'; did you mean '__WALL'? [-Werror=implicit-function-declaration]

The common way to express an unconditional warning is WARN_ON(1),
so let's use that here.

Fixes: 97bbdf02 ("media: v4l: Add support for CSI-1 and CCP2 busses")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 fa31c117
...@@ -639,7 +639,7 @@ static unsigned int pxa_mbus_config_compatible(const struct v4l2_mbus_config *cf ...@@ -639,7 +639,7 @@ static unsigned int pxa_mbus_config_compatible(const struct v4l2_mbus_config *cf
V4L2_MBUS_CSI2_CONTINUOUS_CLOCK); V4L2_MBUS_CSI2_CONTINUOUS_CLOCK);
return (!mipi_lanes || !mipi_clock) ? 0 : common_flags; return (!mipi_lanes || !mipi_clock) ? 0 : common_flags;
default: default:
__WARN(); WARN_ON(1);
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
......
...@@ -509,7 +509,7 @@ unsigned int soc_mbus_config_compatible(const struct v4l2_mbus_config *cfg, ...@@ -509,7 +509,7 @@ unsigned int soc_mbus_config_compatible(const struct v4l2_mbus_config *cfg,
V4L2_MBUS_CSI2_CONTINUOUS_CLOCK); V4L2_MBUS_CSI2_CONTINUOUS_CLOCK);
return (!mipi_lanes || !mipi_clock) ? 0 : common_flags; return (!mipi_lanes || !mipi_clock) ? 0 : common_flags;
default: default:
__WARN(); WARN_ON(1);
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册