linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: mhalcrow@us.ibm.com, pbadari@us.ibm.com
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH -mm] ecryptfs: fix printk format warnings
Date: Sat, 29 Jul 2006 15:33:13 -0700	[thread overview]
Message-ID: <20060729153313.9d6d84d2.rdunlap@xenotime.net> (raw)

From: Randy Dunlap <rdunlap@xenotime.net>

Fix printk format warnings in ecryptfs:
fs/ecryptfs/main.c:327: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
fs/ecryptfs/crypto.c:1599: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
fs/ecryptfs/crypto.c:1621: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
fs/ecryptfs/crypto.c:1628: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
fs/ecryptfs/crypto.c:1635: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
fs/ecryptfs/crypto.c:1642: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
fs/ecryptfs/crypto.c:1649: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
fs/ecryptfs/crypto.c:1656: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 fs/ecryptfs/crypto.c |   14 +++++++-------
 fs/ecryptfs/main.c   |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

--- linux-2618-rc2mm1.orig/fs/ecryptfs/main.c
+++ linux-2618-rc2mm1/fs/ecryptfs/main.c
@@ -322,7 +322,7 @@ static int ecryptfs_parse_options(struct
 		crypto_free_tfm(tmp_tfm);
 	if (rc) {
 		printk(KERN_ERR "Error attempting to initialize cipher [%s] "
-		       "with key size [%d] bytes; rc = [%d]\n",
+		       "with key size [%Zd] bytes; rc = [%d]\n",
 		       mount_crypt_stat->global_default_cipher_name,
 		       mount_crypt_stat->global_default_cipher_key_size, rc);
 		rc = -EINVAL;
--- linux-2618-rc2mm1.orig/fs/ecryptfs/crypto.c
+++ linux-2618-rc2mm1/fs/ecryptfs/crypto.c
@@ -1595,7 +1595,7 @@ ecryptfs_process_cipher(struct crypto_tf
 	*tfm = *key_tfm = NULL;
 	if (key_size > ECRYPTFS_MAX_KEY_BYTES) {
 		rc = -EINVAL;
-		printk(KERN_ERR "Requested key size is [%d] bytes; maximum "
+		printk(KERN_ERR "Requested key size is [%Zd] bytes; maximum "
 		       "allowable is [%d]\n", key_size, ECRYPTFS_MAX_KEY_BYTES);
 		goto out;
 	}
@@ -1616,28 +1616,28 @@ ecryptfs_process_cipher(struct crypto_tf
 	}
 	if (key_size < crypto_tfm_alg_min_keysize(*tfm)) {
 		rc = -EINVAL;
-		printk(KERN_ERR "Request key size is [%d]; minimum key size "
+		printk(KERN_ERR "Request key size is [%Zd]; minimum key size "
 		       "supported by cipher [%s] is [%d]\n", key_size,
 		       cipher_name, crypto_tfm_alg_min_keysize(*tfm));
 		goto out;
 	}
 	if (key_size < crypto_tfm_alg_min_keysize(*key_tfm)) {
 		rc = -EINVAL;
-		printk(KERN_ERR "Request key size is [%d]; minimum key size "
+		printk(KERN_ERR "Request key size is [%Zd]; minimum key size "
 		       "supported by cipher [%s] is [%d]\n", key_size,
 		       cipher_name, crypto_tfm_alg_min_keysize(*key_tfm));
 		goto out;
 	}
 	if (key_size > crypto_tfm_alg_max_keysize(*tfm)) {
 		rc = -EINVAL;
-		printk(KERN_ERR "Request key size is [%d]; maximum key size "
+		printk(KERN_ERR "Request key size is [%Zd]; maximum key size "
 		       "supported by cipher [%s] is [%d]\n", key_size,
 		       cipher_name, crypto_tfm_alg_min_keysize(*tfm));
 		goto out;
 	}
 	if (key_size > crypto_tfm_alg_max_keysize(*key_tfm)) {
 		rc = -EINVAL;
-		printk(KERN_ERR "Request key size is [%d]; maximum key size "
+		printk(KERN_ERR "Request key size is [%Zd]; maximum key size "
 		       "supported by cipher [%s] is [%d]\n", key_size,
 		       cipher_name, crypto_tfm_alg_min_keysize(*key_tfm));
 		goto out;
@@ -1645,14 +1645,14 @@ ecryptfs_process_cipher(struct crypto_tf
 	get_random_bytes(dummy_key, key_size);
 	rc = crypto_cipher_setkey(*tfm, dummy_key, key_size);
 	if (rc) {
-		printk(KERN_ERR "Error attempting to set key of size [%d] for "
+		printk(KERN_ERR "Error attempting to set key of size [%Zd] for "
 		       "cipher [%s]; rc = [%d]\n", key_size, cipher_name, rc);
 		rc = -EINVAL;
 		goto out;
 	}
 	rc = crypto_cipher_setkey(*key_tfm, dummy_key, key_size);
 	if (rc) {
-		printk(KERN_ERR "Error attempting to set key of size [%d] for "
+		printk(KERN_ERR "Error attempting to set key of size [%Zd] for "
 		       "cipher [%s]; rc = [%d]\n", key_size, cipher_name, rc);
 		rc = -EINVAL;
 		goto out;


---

                 reply	other threads:[~2006-07-29 22:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060729153313.9d6d84d2.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mhalcrow@us.ibm.com \
    --cc=pbadari@us.ibm.com \
    /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).