From patchwork Tue Oct 2 21:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 148018 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5629742lji; Tue, 2 Oct 2018 14:00:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV62TqFo+IDk9MiTkwlmwIHOAP6Ht6WkvFrHuhQ+/s/WUrvvnzYoTsacKKePTVxzM2px1CuyF X-Received: by 2002:a62:455b:: with SMTP id s88-v6mr17809435pfa.203.1538514050506; Tue, 02 Oct 2018 14:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538514050; cv=none; d=google.com; s=arc-20160816; b=QV4f1UrllMMmlL/e+yqHdIyOsBlBlqQPT+7D+McYu39o+Nq3OXt0rFkj1q/HKU2KZK FF6B+Vk7Bf29OWMKFffybvePK9MkVEKK3syS9ZGELcriCBo1g7a7CJJqmXm/GBLORwHN j0ed6beKMDtQSfy7Ol+WtJfRw7bUnYrbHTvbU+rsddSbbqNgsl3WE3l2cUs2rs0AHF+V G0rKz43OgTb3xIhU4p1s83SYHRkCg1jdTfrYwWxf8QPU6OXWZlwkfhaSTUywal7wZf17 LLQqdD1YYdFlciXFaK81bxVfQR2Nq52zd4AmFFhevG1yKg6OEHU/ana42vI5gv8WPbmr C+Qg== 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; bh=gXRAPM2xHkcGm/sBZ+/S/Z4dRSdkl9Z2wcqZTDr3Ank=; b=KAaPcf7bdNxRnxPInOxIi2CTD0YvB3ztnit00KbP3HDx/xZXqim2RKZ0xnb27ZQl/O u4P+BuRgUVckjsWP9asIW8D3QWDEoFDb7VtrADt43wjJGWoEsapdV7NKT2ndjFKbt1Je iEicR9mBqNzF7KuPT13TTC3tfWHyK7TvRdlwoPIBmUNg8JwcvqfzndSevBlvGBll7zTJ j3yfUORoKIMD8SkKKQ+8TnXh6kjJ/RZ7oWoKIp5SZcjqzUNi0qNbzs9CAnMRWpIEwp+1 qr8XZinVAgVJSz7ueTdYhWttQ+xK6JvANNh+613NRUfpSOh4/Na0odDHXj21AGjTHCef pBog== 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 i5-v6si10025613pgg.559.2018.10.02.14.00.50; Tue, 02 Oct 2018 14:00:50 -0700 (PDT) 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 S1727471AbeJCDqD (ORCPT + 2 others); Tue, 2 Oct 2018 23:46:03 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:54725 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbeJCDqD (ORCPT ); Tue, 2 Oct 2018 23:46:03 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M593i-1g8XiA3BSe-001AvM; Tue, 02 Oct 2018 23:00:34 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M593i-1g8XiA3BSe-001AvM; Tue, 02 Oct 2018 23:00:34 +0200 From: Arnd Bergmann To: Herbert Xu , "David S. Miller" , Srikanth Jampala Cc: Arnd Bergmann , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: cavium/nitrox - Fix format strings Date: Tue, 2 Oct 2018 23:00:03 +0200 Message-Id: <20181002210022.2369756-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:PjQLwbb2rTqQI4e5OB+cG/RycqvIdhraYqhi0Zk7CKPBnfdg52U IFfqozBPM4yVBTs+Fo0oFFtMVnnNQ3fjBXnP2QOMvPPQC4r3AU7/wTQGJ1KBNmn4cMQSkhw mLXBaWpNXwfUdpKQliz7TqGTQqKPDitjFF1gZ8zumndYp6AjxrRlRwcsdiVfZa81hfaImNU Agu3+y6z/zqM46V3odOIQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:LzY+TrwnrKw=:ZngXvB5xN291WCNdDr3bTp p+KCUYRZowky//vbzxia1rbI3AVHGDBzmfjj2KkWUZk+RzN3V3hvWiawA+0HWIBkfj2QjAyUn HuHvkyRiZRh3rCVH98dmC1Hamk+LHDB51MWPvOH5QdivwwK+m6prTvQt5kpShP9rnZRxNRdJP OejrgOvKUDQXM7GNz6tPthlhEZFQNaqrPPzaQRKipqwA1UNceoiBkbik3clA3+oJJDvLL4aZm q0pXNKRIe96xJA1q6mWvV3/AnJq1C62+8XSPHf073ryWcEM5XWT1uIGg6Rc1CuODCTSsWxGeH txrHw8Vhdlzo4Bje6890jKqZv91tMlyeeGgJ5BR+znVcwP41fCYCIQH9qwl/8htbFcfbboIqp WmgOgO/l+dVsS0f3QOJUkzHkqJNPTlvgNo9iy60PvZNfi6XWLrHCulu3b0hWSrnRai0T9/BAc kfWdn2BIQK5JvR1fOwWs2xn5MOFCuwrmRsySTT00+IvyBH8lzm2gO3GqthRv4cGyuup5CPIz3 9+xr6C5/t1yMVxfgLiHV0dgr+i4olLX9cEwEIRnLQOPT8JkL7VJbo209b1v6LbZFIGMpSkJFR SWDuAaS6L/SYNbCR5lJu2NMjk6FcXc1Dqz7EgufeMRetT3ztOIR1JGEFisxF92VVhP6ecDOFf AAA68Op/B7v2SOpZYMeTGelLln+E3zGhv1smluqbrql8qLvJrn/Ye2DO2/RHN5e3ib1U= Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The return type of atomic64_read() is unfortunately architecture specific, it can be 'long', 'long long', or 's64'. When it is 'long', we get a build warning: drivers/crypto/cavium/nitrox/nitrox_debugfs.c: In function 'stats_show': drivers/crypto/cavium/nitrox/nitrox_debugfs.c:62:30: error: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Werror=format=] seq_printf(s, " Posted: %lld\n", atomic64_read(&ndev->stats.posted)); ~~~^ %ld drivers/crypto/cavium/nitrox/nitrox_debugfs.c:63:33: error: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Werror=format=] seq_printf(s, " Completed: %lld\n", ~~~^ %ld drivers/crypto/cavium/nitrox/nitrox_debugfs.c:65:31: error: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Werror=format=] Add an explicit cast to 's64' to get a consistent behavior on all architectures here during compile testing. Fixes: 2a8780be9c26 ("crypto: cavium/nitrox - updated debugfs information.") Signed-off-by: Arnd Bergmann --- drivers/crypto/cavium/nitrox/nitrox_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.18.0 diff --git a/drivers/crypto/cavium/nitrox/nitrox_debugfs.c b/drivers/crypto/cavium/nitrox/nitrox_debugfs.c index 2f1e74ea846e..c5be91e5034c 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_debugfs.c +++ b/drivers/crypto/cavium/nitrox/nitrox_debugfs.c @@ -59,10 +59,10 @@ static int stats_show(struct seq_file *s, void *v) struct nitrox_device *ndev = s->private; seq_printf(s, "NITROX [%d] Request Statistics\n", ndev->idx); - seq_printf(s, " Posted: %lld\n", atomic64_read(&ndev->stats.posted)); + seq_printf(s, " Posted: %lld\n", (s64)atomic64_read(&ndev->stats.posted)); seq_printf(s, " Completed: %lld\n", - atomic64_read(&ndev->stats.completed)); - seq_printf(s, " Dropped: %lld\n", atomic64_read(&ndev->stats.dropped)); + (s64)atomic64_read(&ndev->stats.completed)); + seq_printf(s, " Dropped: %lld\n", (s64)atomic64_read(&ndev->stats.dropped)); return 0; }