summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Ramana <sramana@codeaurora.org>2016-05-13 18:21:00 +0530
committerKyle Yan <kyan@codeaurora.org>2016-06-22 14:42:18 -0700
commit5b075736273c061baa51c24a4efe35ecc3a32bdd (patch)
tree59f0b203d13001f97afb7384d6cc8d3add58993f
parent0049ab8c87b0c3dbaab7fac7f6879b070fb22019 (diff)
security: pfe: Fix the qualifier used to print size_t
Use the correct type qualifier to print size_t and ssize_t. This will fix the compilation errors when compiling for ARM. While at it, fix the compilation errors in pfk_kc.c for sched functions by including sched.h. Change-Id: I4fac4530dd4b31baf62ef3719535fd662dc2ae37 Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
-rw-r--r--fs/ecryptfs/main.c2
-rw-r--r--security/pfe/pfk.c2
-rw-r--r--security/pfe/pfk_kc.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index 489d213270f8..b591e6772f1b 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -463,7 +463,7 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options,
if (!cipher_code) {
ecryptfs_printk(
KERN_ERR,
- "eCryptfs doesn't support cipher: %s and key size %lu",
+ "eCryptfs doesn't support cipher: %s and key size %zu",
ecryptfs_get_full_cipher(
mount_crypt_stat->global_default_cipher_name,
mount_crypt_stat->global_default_cipher_mode,
diff --git a/security/pfe/pfk.c b/security/pfe/pfk.c
index ccaed3b23fec..5cfb3758d3cf 100644
--- a/security/pfe/pfk.c
+++ b/security/pfe/pfk.c
@@ -324,7 +324,7 @@ static int pfk_key_size_to_key_type(size_t key_size,
*/
if (key_size != PFK_SUPPORTED_KEY_SIZE) {
- pr_err("not supported key size %lu\n", key_size);
+ pr_err("not supported key size %zu\n", key_size);
return -EINVAL;
}
diff --git a/security/pfe/pfk_kc.c b/security/pfe/pfk_kc.c
index 711cb4f905ea..0869a862f521 100644
--- a/security/pfe/pfk_kc.c
+++ b/security/pfe/pfk_kc.c
@@ -31,6 +31,7 @@
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/printk.h>
+#include <linux/sched.h>
#include "pfk_kc.h"
#include "pfk_ice.h"
@@ -479,12 +480,12 @@ int pfk_kc_load_key_start(const unsigned char *key, size_t key_size,
return -EINVAL;
if (key_size != PFK_KC_KEY_SIZE) {
- pr_err("unsupported key size %lu\n", key_size);
+ pr_err("unsupported key size %zu\n", key_size);
return -EINVAL;
}
if (salt_size != PFK_KC_SALT_SIZE) {
- pr_err("unsupported salt size %lu\n", salt_size);
+ pr_err("unsupported salt size %zu\n", salt_size);
return -EINVAL;
}