From patchwork Tue Sep 13 15:09:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: levent demir X-Patchwork-Id: 9329289 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D2FE86077F for ; Tue, 13 Sep 2016 15:09:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C499E2952A for ; Tue, 13 Sep 2016 15:09:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B95A52952B; Tue, 13 Sep 2016 15:09:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83FEA29554 for ; Tue, 13 Sep 2016 15:09:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756769AbcIMPJm (ORCPT ); Tue, 13 Sep 2016 11:09:42 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:20058 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbcIMPJm (ORCPT ); Tue, 13 Sep 2016 11:09:42 -0400 X-IronPort-AV: E=Sophos;i="5.30,329,1470693600"; d="scan'208";a="193006008" Received: from psi.inrialpes.fr ([194.199.28.5]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 13 Sep 2016 17:09:39 +0200 Message-ID: <1473779378.3556.20.camel@inria.fr> Subject: [BUG] crypto: atmel-aes - erro when compiling with VERBOSE_DEBUG enable From: levent demir To: linux-crypto@vger.kernel.org Cc: Cyrille Pitchen Date: Tue, 13 Sep 2016 17:09:38 +0200 X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 */