linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	Srikanth Jampala <Jampala.Srikanth@cavium.com>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: cavium/nitrox - Fix format strings
Date: Mon, 8 Oct 2018 13:47:54 +0800	[thread overview]
Message-ID: <20181008054754.zdt42w6whtpqkpif@gondor.apana.org.au> (raw)
In-Reply-To: <20181002210022.2369756-1-arnd@arndb.de>

On Tue, Oct 02, 2018 at 11:00:03PM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>

This patch doesn't apply to cryptodev because the bug has already
been fixed by another patch.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2018-10-08  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 21:00 [PATCH] crypto: cavium/nitrox - Fix format strings Arnd Bergmann
2018-10-08  5:47 ` Herbert Xu [this message]

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=20181008054754.zdt42w6whtpqkpif@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=Jampala.Srikanth@cavium.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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).