All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
@ 2016-09-13 15:09 levent demir
  2016-09-22  9:26 ` Herbert Xu
  0 siblings, 1 reply; 6+ messages in thread
From: levent demir @ 2016-09-13 15:09 UTC (permalink / raw)
  To: linux-crypto; +Cc: Cyrille Pitchen

Hello, 

if you enable VERBOSE_DEBUG and compile you will have the following
error : 

drivers/crypto/atmel-aes.c:323:5: error: too few arguments to function
'atmel_aes_reg_name'
     atmel_aes_reg_name(offset, tmp));
     ^
include/linux/device.h:1306:41: note: in definition of macro 'dev_vdbg'
   dev_printk(KERN_DEBUG, dev, format, ##arg); \
                                         ^
drivers/crypto/atmel-aes.c:205:20: note: declared here
 static const char *atmel_aes_reg_name(u32 offset, char *tmp, size_t sz)

Indeed, in atmel_aes_write function the call to atmel_aes_reg_name
contains only two arguments instead of 3 : 

atmel_aes_reg_name(offset, tmp));

To fix it, one has to only add the size of tmp as third argument : 

atmel_aes_reg_name(offset, tmp, sizeof(tmp)));



--- atmel-aes.c	2016-09-13 17:01:11.199014981 +0200
+++ atmel-aes-fixed.c	2016-09-13 17:01:54.056389455 +0200
@@ -317,7 +317,7 @@
 		char tmp[16];
 
 		dev_vdbg(dd->dev, "write 0x%08x into %s\n", value,
-			 atmel_aes_reg_name(offset, tmp));
+				atmel_aes_reg_name(offset, tmp, sizeof(tmp)));
 	}
 #endif /* VERBOSE_DEBUG */

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

* Re: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
  2016-09-13 15:09 [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable levent demir
@ 2016-09-22  9:26 ` Herbert Xu
  2016-09-22 12:45   ` levent demir
  0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2016-09-22  9:26 UTC (permalink / raw)
  To: levent demir; +Cc: linux-crypto, cyrille.pitchen

levent demir <levent.demir@inria.fr> wrote:
> Hello, 
> 
> if you enable VERBOSE_DEBUG and compile you will have the following
> error : 
> 
> drivers/crypto/atmel-aes.c:323:5: error: too few arguments to function
> 'atmel_aes_reg_name'
>     atmel_aes_reg_name(offset, tmp));
>     ^
> include/linux/device.h:1306:41: note: in definition of macro 'dev_vdbg'
>   dev_printk(KERN_DEBUG, dev, format, ##arg); \
>                                         ^
> drivers/crypto/atmel-aes.c:205:20: note: declared here
> static const char *atmel_aes_reg_name(u32 offset, char *tmp, size_t sz)
> 
> Indeed, in atmel_aes_write function the call to atmel_aes_reg_name
> contains only two arguments instead of 3 : 
> 
> atmel_aes_reg_name(offset, tmp));
> 
> To fix it, one has to only add the size of tmp as third argument : 
> 
> atmel_aes_reg_name(offset, tmp, sizeof(tmp)));

Thanks for the patch.  In order to apply it, you need to fix the
white-space damage as well as add a sign-off.  For details please
refer to Documentation/SubmittingPatches.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
  2016-09-22  9:26 ` Herbert Xu
@ 2016-09-22 12:45   ` levent demir
  2016-09-27 16:45     ` Cyrille Pitchen
  0 siblings, 1 reply; 6+ messages in thread
From: levent demir @ 2016-09-22 12:45 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, cyrille.pitchen

Fix debug function call in atmel_aes_write

Signed-off-by: Levent DEMIR <levent.demir@inria.fr>
---
 drivers/crypto/atmel-aes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index e3d40a8..2b0f926 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -317,7 +317,7 @@ static inline void atmel_aes_write(struct
atmel_aes_dev *dd,
 		char tmp[16];
 
 		dev_vdbg(dd->dev, "write 0x%08x into %s\n", value,
-			 atmel_aes_reg_name(offset, tmp));
+			atmel_aes_reg_name(offset, tmp, sizeof(tmp)));
 	}
 #endif /* VERBOSE_DEBUG */
 
-- 
2.5.5

Le jeudi 22 septembre 2016 à 17:26 +0800, Herbert Xu a écrit :
> levent demir <levent.demir@inria.fr> wrote:
> > Hello, 
> > 
> > if you enable VERBOSE_DEBUG and compile you will have the following
> > error : 
> > 
> > drivers/crypto/atmel-aes.c:323:5: error: too few arguments to function
> > 'atmel_aes_reg_name'
> >     atmel_aes_reg_name(offset, tmp));
> >     ^
> > include/linux/device.h:1306:41: note: in definition of macro 'dev_vdbg'
> >   dev_printk(KERN_DEBUG, dev, format, ##arg); \
> >                                         ^
> > drivers/crypto/atmel-aes.c:205:20: note: declared here
> > static const char *atmel_aes_reg_name(u32 offset, char *tmp, size_t sz)
> > 
> > Indeed, in atmel_aes_write function the call to atmel_aes_reg_name
> > contains only two arguments instead of 3 : 
> > 
> > atmel_aes_reg_name(offset, tmp));
> > 
> > To fix it, one has to only add the size of tmp as third argument : 
> > 
> > atmel_aes_reg_name(offset, tmp, sizeof(tmp)));
> 
> Thanks for the patch.  In order to apply it, you need to fix the
> white-space damage as well as add a sign-off.  For details please
> refer to Documentation/SubmittingPatches.
> 
> Cheers,

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

* Re: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
  2016-09-22 12:45   ` levent demir
@ 2016-09-27 16:45     ` Cyrille Pitchen
  2016-10-02 14:38       ` Herbert Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Cyrille Pitchen @ 2016-09-27 16:45 UTC (permalink / raw)
  To: levent demir, Herbert Xu; +Cc: linux-crypto

Hi Levent,

there is a typo in the subject line: erroR.
Also it would be better to start the summary phrase of the subject line with a
verb:

crypto: atmel-aes: fix compiler error when VERBODE_DEBUG is defined

Le 22/09/2016 à 14:45, levent demir a écrit :
> Fix debug function call in atmel_aes_write
> 
> Signed-off-by: Levent DEMIR <levent.demir@inria.fr>
> ---
>  drivers/crypto/atmel-aes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
> index e3d40a8..2b0f926 100644
> --- a/drivers/crypto/atmel-aes.c
> +++ b/drivers/crypto/atmel-aes.c
> @@ -317,7 +317,7 @@ static inline void atmel_aes_write(struct
> atmel_aes_dev *dd,
>  		char tmp[16];
>  
>  		dev_vdbg(dd->dev, "write 0x%08x into %s\n", value,
> -			 atmel_aes_reg_name(offset, tmp));
> +			atmel_aes_reg_name(offset, tmp, sizeof(tmp)));
It looks like a space has been removed.

>  	}
>  #endif /* VERBOSE_DEBUG */
>  
> 


Best regards,

Cyrille

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

* Re: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
  2016-09-27 16:45     ` Cyrille Pitchen
@ 2016-10-02 14:38       ` Herbert Xu
  2016-10-03 10:20         ` Cyrille Pitchen
  0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2016-10-02 14:38 UTC (permalink / raw)
  To: Cyrille Pitchen; +Cc: levent demir, linux-crypto

On Tue, Sep 27, 2016 at 06:45:18PM +0200, Cyrille Pitchen wrote:
> Hi Levent,
> 
> there is a typo in the subject line: erroR.
> Also it would be better to start the summary phrase of the subject line with a
> verb:
> 
> crypto: atmel-aes: fix compiler error when VERBODE_DEBUG is defined
> 
> Le 22/09/2016 à 14:45, levent demir a écrit :
> > Fix debug function call in atmel_aes_write
> > 
> > Signed-off-by: Levent DEMIR <levent.demir@inria.fr>
> > ---
> >  drivers/crypto/atmel-aes.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
> > index e3d40a8..2b0f926 100644
> > --- a/drivers/crypto/atmel-aes.c
> > +++ b/drivers/crypto/atmel-aes.c
> > @@ -317,7 +317,7 @@ static inline void atmel_aes_write(struct
> > atmel_aes_dev *dd,
> >  		char tmp[16];
> >  
> >  		dev_vdbg(dd->dev, "write 0x%08x into %s\n", value,
> > -			 atmel_aes_reg_name(offset, tmp));
> > +			atmel_aes_reg_name(offset, tmp, sizeof(tmp)));
> It looks like a space has been removed.

It's been completely mangled by the mailer and cannot be applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
  2016-10-02 14:38       ` Herbert Xu
@ 2016-10-03 10:20         ` Cyrille Pitchen
  0 siblings, 0 replies; 6+ messages in thread
From: Cyrille Pitchen @ 2016-10-03 10:20 UTC (permalink / raw)
  To: Herbert Xu; +Cc: levent demir, linux-crypto

Hi all,

Le 02/10/2016 à 16:38, Herbert Xu a écrit :
> On Tue, Sep 27, 2016 at 06:45:18PM +0200, Cyrille Pitchen wrote:
>> Hi Levent,
>>
>> there is a typo in the subject line: erroR.
>> Also it would be better to start the summary phrase of the subject line with a
>> verb:
>>
>> crypto: atmel-aes: fix compiler error when VERBODE_DEBUG is defined
>>
>> Le 22/09/2016 à 14:45, levent demir a écrit :
>>> Fix debug function call in atmel_aes_write
>>>
>>> Signed-off-by: Levent DEMIR <levent.demir@inria.fr>
>>> ---
>>>  drivers/crypto/atmel-aes.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
>>> index e3d40a8..2b0f926 100644
>>> --- a/drivers/crypto/atmel-aes.c
>>> +++ b/drivers/crypto/atmel-aes.c
>>> @@ -317,7 +317,7 @@ static inline void atmel_aes_write(struct
>>> atmel_aes_dev *dd,
>>>  		char tmp[16];
>>>  
>>>  		dev_vdbg(dd->dev, "write 0x%08x into %s\n", value,
>>> -			 atmel_aes_reg_name(offset, tmp));
>>> +			atmel_aes_reg_name(offset, tmp, sizeof(tmp)));
>> It looks like a space has been removed.
> 
> It's been completely mangled by the mailer and cannot be applied.
> 
I've sent a new version in this thread:
https://lkml.org/lkml/2016/9/29/463

I added a Reported-by tag for Levent but if you want to use a Signed-off-by
tag instead, it's fine with me!

Best regards,

Cyrille

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

end of thread, other threads:[~2016-10-03 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-13 15:09 [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable levent demir
2016-09-22  9:26 ` Herbert Xu
2016-09-22 12:45   ` levent demir
2016-09-27 16:45     ` Cyrille Pitchen
2016-10-02 14:38       ` Herbert Xu
2016-10-03 10:20         ` Cyrille Pitchen

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.