mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: davinci: vpbe: fix build warning
@ 2014-03-14  5:25 Lad, Prabhakar
  2014-03-14  8:41 ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Lad, Prabhakar @ 2014-03-14  5:25 UTC (permalink / raw)
  To: LMML; +Cc: LKML, DLOS, Mauro Carvalho Chehab, Lad, Prabhakar

From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>

this patch fixes following build warning
drivers/media/platform/davinci/vpbe_display.c: In function 'vpbe_start_streaming':
drivers/media/platform/davinci/vpbe_display.c:344: warning: unused variable 'vpbe_dev'

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 drivers/media/platform/davinci/vpbe_display.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 7a0e40e..b4f12d0 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -341,7 +341,6 @@ static int vpbe_start_streaming(struct vb2_queue *vq, unsigned int count)
 {
 	struct vpbe_fh *fh = vb2_get_drv_priv(vq);
 	struct vpbe_layer *layer = fh->layer;
-	struct vpbe_device *vpbe_dev = fh->disp_dev->vpbe_dev;
 	int ret;
 
 	/* Get the next frame from the buffer queue */
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] media: davinci: vpbe: fix build warning
@ 2012-10-20  7:02 Prabhakar Lad
  0 siblings, 0 replies; 6+ messages in thread
From: Prabhakar Lad @ 2012-10-20  7:02 UTC (permalink / raw)
  To: LMML; +Cc: Manjunath Hadli, Mauro Carvalho Chehab, LKML, DLOS, Lad, Prabhakar

From: Lad, Prabhakar <prabhakar.lad@ti.com>

Warnings were generated because of the following commit changed data type for
address pointer

195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
add  __iomem annotation to fix following warnings

drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’:
drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing
 argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default]
arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile
 void *’ but argument is of type ‘long unsigned int’

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
---
 drivers/media/platform/davinci/vpbe_osd.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c
index bba299d..9ab9280 100644
--- a/drivers/media/platform/davinci/vpbe_osd.c
+++ b/drivers/media/platform/davinci/vpbe_osd.c
@@ -46,14 +46,14 @@ static inline u32 osd_read(struct osd_state *sd, u32 offset)
 {
 	struct osd_state *osd = sd;
 
-	return readl(osd->osd_base + offset);
+	return readl(IOMEM(osd->osd_base + offset));
 }
 
 static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset)
 {
 	struct osd_state *osd = sd;
 
-	writel(val, osd->osd_base + offset);
+	writel(val, IOMEM(osd->osd_base + offset));
 
 	return val;
 }
@@ -63,9 +63,9 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset)
 	struct osd_state *osd = sd;
 
 	u32 addr = osd->osd_base + offset;
-	u32 val = readl(addr) | mask;
+	u32 val = readl(IOMEM(addr)) | mask;
 
-	writel(val, addr);
+	writel(val, IOMEM(addr));
 
 	return val;
 }
@@ -75,9 +75,9 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset)
 	struct osd_state *osd = sd;
 
 	u32 addr = osd->osd_base + offset;
-	u32 val = readl(addr) & ~mask;
+	u32 val = readl(IOMEM(addr)) & ~mask;
 
-	writel(val, addr);
+	writel(val, IOMEM(addr));
 
 	return val;
 }
@@ -88,9 +88,9 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val,
 	struct osd_state *osd = sd;
 
 	u32 addr = osd->osd_base + offset;
-	u32 new_val = (readl(addr) & ~mask) | (val & mask);
+	u32 new_val = (readl(IOMEM(addr)) & ~mask) | (val & mask);
 
-	writel(new_val, addr);
+	writel(new_val, IOMEM(addr));
 
 	return new_val;
 }
-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] media: davinci: vpbe: fix build warning
@ 2012-10-03  6:27 Prabhakar
  2012-10-03  6:40 ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Prabhakar @ 2012-10-03  6:27 UTC (permalink / raw)
  To: LMML
  Cc: DLOS, Manjunath Hadli, VGER, Lad, Prabhakar, Hans Verkuil,
	Mauro Carvalho Chehab

From: Lad, Prabhakar <prabhakar.lad@ti.com>

recent patch with commit id 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
which makes vidioc_s_crop const, was causing a following build warning,

vpbe_display.c: In function 'vpbe_display_s_crop':
vpbe_display.c:640: warning: initialization discards qualifiers from pointer target type

This patch fixes the above build warning.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/platform/davinci/vpbe_display.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 1b238fe..161c776 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -637,7 +637,7 @@ static int vpbe_display_s_crop(struct file *file, void *priv,
 	struct vpbe_device *vpbe_dev = disp_dev->vpbe_dev;
 	struct osd_layer_config *cfg = &layer->layer_info.config;
 	struct osd_state *osd_device = disp_dev->osd_device;
-	struct v4l2_rect *rect = &crop->c;
+	struct v4l2_rect rect = crop->c;
 	int ret;
 
 	v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
@@ -648,21 +648,21 @@ static int vpbe_display_s_crop(struct file *file, void *priv,
 		return -EINVAL;
 	}
 
-	if (rect->top < 0)
-		rect->top = 0;
-	if (rect->left < 0)
-		rect->left = 0;
+	if (rect.top < 0)
+		rect.top = 0;
+	if (rect.left < 0)
+		rect.left = 0;
 
-	vpbe_disp_check_window_params(disp_dev, rect);
+	vpbe_disp_check_window_params(disp_dev, &rect);
 
 	osd_device->ops.get_layer_config(osd_device,
 			layer->layer_info.id, cfg);
 
 	vpbe_disp_calculate_scale_factor(disp_dev, layer,
-					rect->width,
-					rect->height);
-	vpbe_disp_adj_position(disp_dev, layer, rect->top,
-					rect->left);
+					rect.width,
+					rect.height);
+	vpbe_disp_adj_position(disp_dev, layer, rect.top,
+					rect.left);
 	ret = osd_device->ops.set_layer_config(osd_device,
 				layer->layer_info.id, cfg);
 	if (ret < 0) {
-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-14  8:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14  5:25 [PATCH] media: davinci: vpbe: fix build warning Lad, Prabhakar
2014-03-14  8:41 ` Hans Verkuil
  -- strict thread matches above, loose matches on Subject: below --
2012-10-20  7:02 Prabhakar Lad
2012-10-03  6:27 Prabhakar
2012-10-03  6:40 ` Hans Verkuil
2012-10-03  6:45   ` Prabhakar Lad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®