From patchwork Wed Dec 20 07:23:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 122447 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5225365qgn; Tue, 19 Dec 2017 23:24:26 -0800 (PST) X-Google-Smtp-Source: ACJfBotHAhCH/FMofethdgY9pLBZhQ7KvtdllMT3XnLm7Uf/1GJQtqOZwrTCGVbVmWgHYc8XHZ4G X-Received: by 10.84.241.197 with SMTP id t5mr5943898plm.173.1513754666832; Tue, 19 Dec 2017 23:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513754666; cv=none; d=google.com; s=arc-20160816; b=tMII2dGzSnH/8GDD9KwB4y9LAGFTymMeWPKhTHYmD/2xmjUmlMuZ7Uz8Sra524zPHs f0h4Ui4zRRE5qcYLD4EB/ne2kSd7iDVCAxhip2k8+7Oi0BvY+6kC4Qg8rxdWfcOpPcmq gtNddfhsUqnhm8sQ4R4WZsfnTI/UG1rECQbtpNlKwsWimly0L7YqHc+TJzzS7Pb3J2F+ fB/zehe/7H0J1F5E6qd0H2PbgseeKXtEXj4Cp1kmo2x37rueeiAmrRMd9WX4nITL9SL+ RWWxDCclp7vct/xxWR+BHAsd8x+Em32G7XJv3SasUV5xREWcg1XztSTWHxS61xIgMXtU Z85w== 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=JlnyM6jQ0gUYyUY7fU6ECiT8yyxwB3cvWMzvyjcRdWs=; b=k7i1c6+W5P23TskwEFS57AxrXB+cQS7KfiWZgWk9/luvvDBP3Lg2HG1fUd8rMOCsqL LKKrluBdU3M6FUZ6uYK15CdwHvxYcJ9QTkyq2fyRJCGXa+EZ80CUJUzxYIJssR3BzoYc 2BrSVJIZRhCoRsfMLiy0U4v7O2BshLXxooIDeWvh9R3lOcjI+qEbEcZHj1QIA88/M1DS RTcZQOigXO825aV0AXe0OJfC85gyq9WjtxRbbteEpB76D49oHE/C9wnRh7BpebloMGfi YsAKfMPUCL97bJrKVS9kK5tSl4o8LFL8slNrSCAcPxxrG+V013R6eNRa5UrjzGhzo9Vq aOdQ== 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 s1si11446486pgq.14.2017.12.19.23.24.26; Tue, 19 Dec 2017 23:24:26 -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 S1754430AbdLTHYZ (ORCPT + 1 other); Wed, 20 Dec 2017 02:24:25 -0500 Received: from foss.arm.com ([217.140.101.70]:47844 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754433AbdLTHYZ (ORCPT ); Wed, 20 Dec 2017 02:24:25 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B82FE80D; Tue, 19 Dec 2017 23:24:24 -0800 (PST) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B3D4C3F487; Tue, 19 Dec 2017 23:24:22 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: ccree: use size_t consistently Date: Wed, 20 Dec 2017 07:23:31 +0000 Message-Id: <1513754611-14409-1-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Fix declaration, implementation and wrapper function to use the same size_t type we actually define the parameter to be. Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params") Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging/ccree/ssi_driver.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 56b5d45..1254c69 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 5a56f7a..bf83f3e 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -174,10 +174,9 @@ static inline struct device *drvdata_to_dev(struct cc_drvdata *drvdata) return &drvdata->plat_dev->dev; } -void __dump_byte_array(const char *name, const u8 *the_array, - unsigned long size); +void __dump_byte_array(const char *name, const u8 *buf, size_t len); 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);