diff mbox

[BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable

Message ID 1473779378.3556.20.camel@inria.fr (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show

Commit Message

levent demir Sept. 13, 2016, 3:09 p.m. UTC
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)));






--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Herbert Xu Sept. 22, 2016, 9:26 a.m. UTC | #1
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,
diff mbox

Patch

--- 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 */