* [PATCH] dma-buf: Fix a warning message in dma_heap_buffer_destroy()
@ 2019-10-29 18:29 Dan Carpenter
2019-10-30 16:17 ` John Stultz
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-10-29 18:29 UTC (permalink / raw)
To: Sumit Semwal, John Stultz
Cc: Andrew F. Davis, Benjamin Gaignard, Liam Mark, Laura Abbott,
Brian Starkey, linux-media, dri-devel, linaro-mm-sig,
linux-kernel, kernel-janitors
The first argument of WARN() is a condition so this will just print the
function name instead of the whole warning message.
Fixes: 7b87ea704fd9 ("dma-buf: heaps: Add heap helpers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/dma-buf/heaps/heap-helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c
index 750bef4e902d..a31684c0d5b2 100644
--- a/drivers/dma-buf/heaps/heap-helpers.c
+++ b/drivers/dma-buf/heaps/heap-helpers.c
@@ -52,7 +52,7 @@ static void *dma_heap_map_kernel(struct heap_helper_buffer *buffer)
static void dma_heap_buffer_destroy(struct heap_helper_buffer *buffer)
{
if (buffer->vmap_cnt > 0) {
- WARN("%s: buffer still mapped in the kernel\n", __func__);
+ WARN(1, "%s: buffer still mapped in the kernel\n", __func__);
vunmap(buffer->vaddr);
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dma-buf: Fix a warning message in dma_heap_buffer_destroy()
2019-10-29 18:29 [PATCH] dma-buf: Fix a warning message in dma_heap_buffer_destroy() Dan Carpenter
@ 2019-10-30 16:17 ` John Stultz
0 siblings, 0 replies; 2+ messages in thread
From: John Stultz @ 2019-10-30 16:17 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sumit Semwal, Andrew F. Davis, Benjamin Gaignard, Liam Mark,
Laura Abbott, Brian Starkey, linux-media, dri-devel,
moderated list:DMA BUFFER SHARING FRAMEWORK, lkml,
kernel-janitors
On Tue, Oct 29, 2019 at 11:31 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> The first argument of WARN() is a condition so this will just print the
> function name instead of the whole warning message.
>
> Fixes: 7b87ea704fd9 ("dma-buf: heaps: Add heap helpers")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/dma-buf/heaps/heap-helpers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c
> index 750bef4e902d..a31684c0d5b2 100644
> --- a/drivers/dma-buf/heaps/heap-helpers.c
> +++ b/drivers/dma-buf/heaps/heap-helpers.c
> @@ -52,7 +52,7 @@ static void *dma_heap_map_kernel(struct heap_helper_buffer *buffer)
> static void dma_heap_buffer_destroy(struct heap_helper_buffer *buffer)
> {
> if (buffer->vmap_cnt > 0) {
> - WARN("%s: buffer still mapped in the kernel\n", __func__);
> + WARN(1, "%s: buffer still mapped in the kernel\n", __func__);
> vunmap(buffer->vaddr);
> }
Thanks for catching and reporting this!
Acked-by: John Stultz <john.stultz@linaro.org>
Sumit, do you mind picking this up for drm-misc-next?
thanks
-john
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-30 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29 18:29 [PATCH] dma-buf: Fix a warning message in dma_heap_buffer_destroy() Dan Carpenter
2019-10-30 16:17 ` John Stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).