All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: pxa_camera: declare variable when DEBUG is defined
@ 2021-01-18 13:45 trix
  0 siblings, 0 replies; only message in thread
From: trix @ 2021-01-18 13:45 UTC (permalink / raw)
  To: mchehab, hverkuil-cisco, peter.ujfalusi, robert.jarzmik,
	romain.perier, jacopo+renesas, allen.lkml, dan.carpenter
  Cc: linux-media, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

When DEBUG is defined this error occurs

drivers/media/platform/pxa_camera.c:1410:7: error:
  ‘i’ undeclared (first use in this function)
  for (i = 0; i < vb->num_planes; i++)
       ^
The variable 'i' is missing, so declare it.

Fixes: 6f28435d1c15 ("[media] media: platform: pxa_camera: trivial move of functions")
Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/media/platform/pxa_camera.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index b664ce7558a1..75fad9689c90 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -1386,6 +1386,9 @@ static int pxac_vb2_prepare(struct vb2_buffer *vb)
 	struct pxa_camera_dev *pcdev = vb2_get_drv_priv(vb->vb2_queue);
 	struct pxa_buffer *buf = vb2_to_pxa_buffer(vb);
 	int ret = 0;
+#ifdef DEBUG
+	int i;
+#endif
 
 	switch (pcdev->channels) {
 	case 1:
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-18 13:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 13:45 [PATCH] media: pxa_camera: declare variable when DEBUG is defined trix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.