linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: s5p-mfc include buffer size in error message
@ 2016-10-18  0:43 Shuah Khan
       [not found] ` <CGME20161104100504eucas1p196456ab351847ffabb60f51e76eab707@eucas1p1.samsung.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2016-10-18  0:43 UTC (permalink / raw)
  To: kyungmin.park, kamil, jtp.park, a.hajda, mchehab
  Cc: Shuah Khan, linux-arm-kernel, linux-media, linux-kernel

Include buffer size in s5p_mfc_alloc_priv_buf() the error message when it
fails to allocate the buffer. Remove the debug message that does the same.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
index 1e72502..eee16a1 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
@@ -40,12 +40,11 @@ void s5p_mfc_init_regs(struct s5p_mfc_dev *dev)
 int s5p_mfc_alloc_priv_buf(struct device *dev, dma_addr_t base,
 					struct s5p_mfc_priv_buf *b)
 {
-	mfc_debug(3, "Allocating priv: %zu\n", b->size);
-
 	b->virt = dma_alloc_coherent(dev, b->size, &b->dma, GFP_KERNEL);
 
 	if (!b->virt) {
-		mfc_err("Allocating private buffer failed\n");
+		mfc_err("Allocating private buffer of size %zu failed\n",
+			b->size);
 		return -ENOMEM;
 	}
 
-- 
2.7.4

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

* Re: [PATCH] media: s5p-mfc include buffer size in error message
       [not found] ` <CGME20161104100504eucas1p196456ab351847ffabb60f51e76eab707@eucas1p1.samsung.com>
@ 2016-11-04 10:05   ` Sylwester Nawrocki
  2016-11-07 23:40     ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Sylwester Nawrocki @ 2016-11-04 10:05 UTC (permalink / raw)
  To: Shuah Khan
  Cc: kyungmin.park, kamil, jtp.park, a.hajda, mchehab,
	linux-arm-kernel, linux-media, linux-kernel

On 10/18/2016 02:43 AM, Shuah Khan wrote:
> Include buffer size in s5p_mfc_alloc_priv_buf() the error message when it
> fails to allocate the buffer. Remove the debug message that does the same.
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
> index 1e72502..eee16a1 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
> @@ -40,12 +40,11 @@ void s5p_mfc_init_regs(struct s5p_mfc_dev *dev)
>  int s5p_mfc_alloc_priv_buf(struct device *dev, dma_addr_t base,
>  					struct s5p_mfc_priv_buf *b)
>  {
> -	mfc_debug(3, "Allocating priv: %zu\n", b->size);

How about keeping this debug message, I think it would be useful
to leave that information in the debug logs.

>  	b->virt = dma_alloc_coherent(dev, b->size, &b->dma, GFP_KERNEL);
>  
>  	if (!b->virt) {
> -		mfc_err("Allocating private buffer failed\n");
> +		mfc_err("Allocating private buffer of size %zu failed\n",
> +			b->size);
>  		return -ENOMEM;
>  	}

--
Thanks,
Sylwester

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

* Re: [PATCH] media: s5p-mfc include buffer size in error message
  2016-11-04 10:05   ` Sylwester Nawrocki
@ 2016-11-07 23:40     ` Shuah Khan
  0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2016-11-07 23:40 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: kyungmin.park, kamil, jtp.park, a.hajda, mchehab,
	linux-arm-kernel, linux-media, linux-kernel

On 11/04/2016 04:05 AM, Sylwester Nawrocki wrote:
> On 10/18/2016 02:43 AM, Shuah Khan wrote:
>> Include buffer size in s5p_mfc_alloc_priv_buf() the error message when it
>> fails to allocate the buffer. Remove the debug message that does the same.
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
>> index 1e72502..eee16a1 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
>> @@ -40,12 +40,11 @@ void s5p_mfc_init_regs(struct s5p_mfc_dev *dev)
>>  int s5p_mfc_alloc_priv_buf(struct device *dev, dma_addr_t base,
>>  					struct s5p_mfc_priv_buf *b)
>>  {
>> -	mfc_debug(3, "Allocating priv: %zu\n", b->size);
> 
> How about keeping this debug message, I think it would be useful
> to leave that information in the debug logs.

Sent v2 with just the error message change.

thanks,
-- Shuah

> 
>>  	b->virt = dma_alloc_coherent(dev, b->size, &b->dma, GFP_KERNEL);
>>  
>>  	if (!b->virt) {
>> -		mfc_err("Allocating private buffer failed\n");
>> +		mfc_err("Allocating private buffer of size %zu failed\n",
>> +			b->size);
>>  		return -ENOMEM;
>>  	}
> 
> --
> Thanks,
> Sylwester
> 

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

end of thread, other threads:[~2016-11-07 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18  0:43 [PATCH] media: s5p-mfc include buffer size in error message Shuah Khan
     [not found] ` <CGME20161104100504eucas1p196456ab351847ffabb60f51e76eab707@eucas1p1.samsung.com>
2016-11-04 10:05   ` Sylwester Nawrocki
2016-11-07 23:40     ` Shuah Khan

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).