Skip to contentSkip to conversation

Fix compile warnings reported during Non TPG build

PATCH New Sowjanya Komatineni 1 participant 2 messages Aug 31, 2020

Subsystems (4)
lore
Share & tools
lore

Sowjanya Komatineni

author maintainer
#0 lore raw

PATCH 1/1 Fix compile warnings reported during Non TPG build

Patch-0001 fixes compilation warnings for variables used with V4L2 control operation when tegra-video is builded for Non TPG.

Patch-0001 should be applied on top of below external support patches.
https://patchwork.kernel.org/cover/11709839/

Sowjanya Komatineni (1):
media: tegra-video: Fix compilation warning of unused variable

 drivers/staging/media/tegra-video/vi.c | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH 1/1 media: tegra-video: Fix compilation warning of unused variable

vi_pattern_strings is used only when CONFIG_VIDEO_TEGRA_TPG is enabled and V4L2 control operations currently are used only in TPG mode.

So when tegra-video is build for non TPG, warnings of unused variable is reported for v4l2 control operation variable.

This patch fixes it.

---
 drivers/staging/media/tegra-video/vi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/tegra-video/vi.c +2 -0
index 5543ead..dabb99a 100644
@@ -788,6 +788,7 @@ static const struct v4l2_file_operations tegra_channel_fops = {
 /*
  * V4L2 control operations
  */
+#if IS_ENABLED(CONFIG_VIDEO_TEGRA_TPG)
 static int vi_s_ctrl(struct v4l2_ctrl *ctrl)
 {
 	struct tegra_vi_channel *chan = container_of(ctrl->handler,
@@ -814,6 +815,7 @@ static const char *const vi_pattern_strings[] = {
 	"Black/White Direct Mode",
 	"Color Patch Mode",
 };
+#endif
 
 static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan)
 {
Signature · 1 line
2.7.4