integrity: ima cleanup
PATCH 1/1 integrity: ima cleanup
This patch cleanups the few Lindent and sparse msgs
Signed-off-by Mimi Zohar <[email protected]>
Signed-off-by Kylene Hall <[email protected]>
---
security/evm/ima/ima.h +3 -3
@@ -52,7 +52,7 @@ struct ima_measure_entry {struct ima_queue_entry {struct hlist_node hnext;/* place in hash collision list */ -struct list_head later;/* place in ima_measurements list */ +struct list_head later;/* place in ima_measurements list */ struct ima_measure_entry *entry; };
@@ -72,7 +72,7 @@ struct ima_queue_entry *ima_lookup_digesextern spinlock_t ima_queue_lock;struct ima_h_table { -atomic_t len;/* number of stored measurements in the list */ +atomic_t len;/* number of stored measurements in the list */ atomic_t violations;unsigned int max_htable_size;struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE ];
@@ -82,7 +82,7 @@ extern struct ima_h_table ima_htable;/* TPM "Glue" definitions */ -#define IMA_TPM ((TPM_ANY_TYPE<<16)| TPM_ANY_NUM) +#define IMA_TPM ((((u32)TPM_ANY_TYPE)<<16)| (u32)TPM_ANY_NUM)static inline void ima_extend (const u8 * hash) {if (!ima_used_chip)
security/evm/ima/ima_fs.c +4 -8
@@ -69,12 +69,11 @@ static void *ima_measurements_start(strureturn NULL ; } -static void *ima_measurements_next (struct seq_file *m,void *v, -loff_t * pos) +static void *ima_measurements_next (struct seq_file *m,void *v,loff_t * pos) {/* lock protects when reading beyond last element * against concurrent list-extension */ -struct list_head *lpos = (struct list_head *) v; +struct list_head *lpos = (struct list_head *)v;rcu_read_lock (); lpos =rcu_dereference (lpos->next);
@@ -88,7 +87,6 @@ static void ima_measurements_stop(struct { } -/* print format: * 32bit-le=pcr# * 32bit-le=type# << flag
@@ -207,8 +205,7 @@ static struct seq_operations ima_ascii_m .show = ima_ascii_measurements_show }; -static int ima_ascii_measurements_open (struct inode *inode, -struct file *file) +static int ima_ascii_measurements_open (struct inode *inode,struct file *file) {return seq_open (file, &ima_ascii_measurements_seqops); }
@@ -255,8 +252,7 @@ int ima_fs_init(void) violations =securityfs_create_file ("violations" ,S_IRUSR |S_IRGRP , - ima_dir,NULL , - &ima_htable_violations_ops); + ima_dir,NULL , &ima_htable_violations_ops);if (!violations ||IS_ERR (violations)) goto out;return 0 ;