All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mauro Carvalho Chehab <mchehab@kernel.org>, linux-media@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Vaibhav Hiremath <hvaibhav.linux@gmail.com>,
	Archit Taneja <architt@codeaurora.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH] media: platform: omap: Pass a pointer to virt_to_page()
Date: Thu, 19 May 2022 23:39:06 +0200	[thread overview]
Message-ID: <20220519213906.779610-1-linus.walleij@linaro.org> (raw)

A pointer into virtual memory is represented by a (void *)
not an u32, so the compiler warns:

drivers/media/platform/ti/omap/omap_voutlib.c:317:54: warning:
  passing argument 1 of 'virt_to_pfn' makes pointer from integer
  without a cast [-Wint-conversion]

Fix this with an explicit cast.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/media/platform/ti/omap/omap_voutlib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/ti/omap/omap_voutlib.c b/drivers/media/platform/ti/omap/omap_voutlib.c
index 480a7e95533d..fdea2309ee37 100644
--- a/drivers/media/platform/ti/omap/omap_voutlib.c
+++ b/drivers/media/platform/ti/omap/omap_voutlib.c
@@ -314,7 +314,7 @@ unsigned long omap_vout_alloc_buffer(u32 buf_size, u32 *phys_addr)
 
 	if (virt_addr) {
 		while (size > 0) {
-			SetPageReserved(virt_to_page(addr));
+			SetPageReserved(virt_to_page((void *)addr));
 			addr += PAGE_SIZE;
 			size -= PAGE_SIZE;
 		}
@@ -335,7 +335,7 @@ void omap_vout_free_buffer(unsigned long virtaddr, u32 buf_size)
 	order = get_order(size);
 
 	while (size > 0) {
-		ClearPageReserved(virt_to_page(addr));
+		ClearPageReserved(virt_to_page((void *)addr));
 		addr += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	}
-- 
2.35.1


                 reply	other threads:[~2022-05-19 21:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220519213906.779610-1-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=architt@codeaurora.org \
    --cc=hvaibhav.linux@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.