From: levent demir <levent.demir@inria.fr>
To: linux-crypto@vger.kernel.org
Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Subject: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable
Date: Tue, 13 Sep 2016 17:09:38 +0200 [thread overview]
Message-ID: <1473779378.3556.20.camel@inria.fr> (raw)
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 */
next reply other threads:[~2016-09-13 15:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 15:09 levent demir [this message]
2016-09-22 9:26 ` [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable 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
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=1473779378.3556.20.camel@inria.fr \
--to=levent.demir@inria.fr \
--cc=cyrille.pitchen@atmel.com \
--cc=linux-crypto@vger.kernel.org \
/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 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).