From patchwork Thu Dec 21 13:31:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122571 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp891327qgn; Thu, 21 Dec 2017 05:31:50 -0800 (PST) X-Google-Smtp-Source: ACJfBotYStwcgm+aGxq2IZ6HAQWO1YUaWbO0RhiL0Ey7vbp8PH01JDTriT/3z250a/7x3VUPzGiW X-Received: by 10.159.218.149 with SMTP id w21mr10961729plp.239.1513863110598; Thu, 21 Dec 2017 05:31:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513863110; cv=none; d=google.com; s=arc-20160816; b=RZIOT08KqMOtIBOdOp3Y8vM1LZEOyXkuGIxO8tDcRo3/ljjaDjFHYtMAOaYvGFfktL x/VWwZ0BEJ1b3YpT58qbQEzOXSIMNSyQSH8eQXqJ8+xTztQNGbgaXC3O9Zdq3CgwsQ6v dk+eVAJyJnf//9UffEHs/C2D2ukwgGtWdsr2yoWluXRKGR+vOuSScHOuxHaSVEO9bRfB Bu94xHq1VIbFzDAM92K+z2DElUcQQgQ7KOJ2t0S4m0NvQJl705bHr/iin9UVVB9Cz7d2 jQZYcWLR/WNM4Q1D7LSMWXCxQc0vP3wxnPNi78844LyR2GHRWjs0kDKut00pz8FDk/Dq D/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=hJIsWSn9pozX1vjfbysvQE8l6KLBNMAec6B0fqrjhNI=; b=ydfjcKyRwCwmgiuNxK2P3rTshTmx2DbadF4mzchRma0RiCrU6/3HyxxfLsxZ58s54/ MA0YbBGJplY7kcvTK1K36JNtUk3QiUrS9lfW6uog58mcSQvapSS94l8rOsENV/VhzGGg XM71lcGjYvMpB7uAn1JZ8Ws1sPrFucsGxxi+5p7QLeMtAtVhCKqGpSN/7GkbNNT26Y79 Tk01qUfNvAEa2QXD7iEMiEQmadHg6qhu060BhD3iTROB7Heo2H9bloQa0yoZFFbH4y2/ Jl2kykkBDAcrKVqIxsPu+7K7II4tYn0WmC14Q5MZZZkhQrTEpPNpe47be0DASPnYkCxO Ohag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si8923598plo.397.2017.12.21.05.31.50; Thu, 21 Dec 2017 05:31:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbdLUNbt (ORCPT + 1 other); Thu, 21 Dec 2017 08:31:49 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:56552 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdLUNbs (ORCPT ); Thu, 21 Dec 2017 08:31:48 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0M5ZBQ-1fC8LW08ym-00xcTX; Thu, 21 Dec 2017 14:31:42 +0100 From: Arnd Bergmann To: Gilad Ben-Yossef , Greg Kroah-Hartman Cc: Arnd Bergmann , Suniel Mahesh , Derek Robson , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: ccree: fix type mismatch warning Date: Thu, 21 Dec 2017 14:31:20 +0100 Message-Id: <20171221133139.1968427-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:MB8Qc/fV8sZkZ3QNQcEMHeWomxynAY/JbdTNXFyW9+dFWy0mcSi ZVuLbJHpdyonjW9s4MkLEwFU11cQUoZ5mTtlLoGNqRjj1d+C70RC4WCu6+DSCubzjj7vjtL QZpT+oaWBCbH3+7ZBHG26Lk8vdxbAWXOf+P0DNcniAiC21Q4pAwWrSrWTDMlvSJdsO7QKEC sXIhG6VQqM7hsJ3DMzpow== X-UI-Out-Filterresults: notjunk:1; V01:K0:B4dY/85oWZs=:Kdi/9AmNvjNTRooJsuwD/K NL/sDe1cWkS+f/s2cHJ0gtzw2Nd+8YeuO4Mtpy3ux0mFqL80OKt4DDpitHr4/6LHpLUByOTZB eT0qPp2wW0iULUTpMtLii1BJBywAOJ6VVd2nrKAxxaKVvfJOpt34IsiRbNLNpOe1Q6i7bT4u8 M3jm5EBzitx6R1pDWRGkteoHzsVGvV3nljgblF/5Z/pLCE7HlPvLLop5Pj4MFERTlIa/KMKKv l+aesEsu4LJklNvQgPOHv4Bwz//IBIe+5JwjymEdVgY/+W84XEVof4UGail2Z3iZaBIKeQty/ XMNtDzGYKkn2Sq//F7MoVwKSCxZSLtmV7zeLJUpOuiu4sc//IvQqNdRNIw5ZFOVPfrUENFFRm 4lDJLDkO4WY7y+hNrj67aWkzmRqyVw91UUE5TS4ed4E3qIqHv/s7VWEZL89edB1VrQD6Ixt/N EMc5Gi9Et0ikEUbJg7MnslsfpElD1h6ze/ZLeIR+EF+hFAzFkMktxQVqd2vjfVXbpYgI1MCG3 JkxiL4NXuYnYyyYOpJivICWXdWfunmyf6Uov88iBxdD4tR50e28YZETA3xGfrbkTokNQle9dn efM0TlE6vkZBZ/nWrIxgJpTgiRqVo/D5fRii49inohyvyC7c7VDh9vMp2FfuYAWyRL9NAI7e4 mFaOYfCJZkUwLHp3YdE2XjyR9dn/JmLrMm0zhwTT7OT6aqaHZ7jqXn+RBpoXVpNs8KCP2TM6P Sjyu3jgjxaMhU5j6OtQtA1yJM+BKpEqOIkIxfg== Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org __dump_byte_array used to be hidden, but is now visible to the compiler and causes a harmless warning: drivers/staging/ccree/ssi_driver.c:82:6: error: conflicting types for '__dump_byte_array' drivers/staging/ccree/ssi_driver.c: In function '__dump_byte_array': drivers/staging/ccree/ssi_driver.c:89:41: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=] This changes the prototype in the header to match that of the actual function on all architectures, and the format string to match the argument. Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params") Signed-off-by: Arnd Bergmann --- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging/ccree/ssi_driver.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 56b5d45a205c..1254c6922d50 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -86,7 +86,7 @@ void __dump_byte_array(const char *name, const u8 *buf, size_t len) if (!buf) return; - snprintf(prefix, sizeof(prefix), "%s[%lu]: ", name, len); + snprintf(prefix, sizeof(prefix), "%s[%zu]: ", name, len); print_hex_dump(KERN_DEBUG, prefix, DUMP_PREFIX_ADDRESS, 16, 1, buf, len, false); diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 5a56f7a76b71..e1406d6e1ab2 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -175,9 +175,9 @@ static inline struct device *drvdata_to_dev(struct cc_drvdata *drvdata) } void __dump_byte_array(const char *name, const u8 *the_array, - unsigned long size); + size_t size); static inline void dump_byte_array(const char *name, const u8 *the_array, - unsigned long size) + size_t size) { if (cc_dump_bytes) __dump_byte_array(name, the_array, size);