fix(rmm): fix MISRA C:2012 Rule 8.3 violations
Fixes Function Declaration to use the same name and type
as the definition.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I4f83457ef62779cc93967f0526fa4aaeb68b14fb
diff --git a/lib/realm/include/buffer.h b/lib/realm/include/buffer.h
index 7cb0a39..dc716de 100644
--- a/lib/realm/include/buffer.h
+++ b/lib/realm/include/buffer.h
@@ -43,12 +43,12 @@
void buffer_unmap(void *buf);
bool ns_buffer_read(enum buffer_slot slot,
- struct granule *granule,
+ struct granule *ns_gr,
unsigned int offset,
unsigned int size,
void *dest);
bool ns_buffer_write(enum buffer_slot slot,
- struct granule *granule,
+ struct granule *ns_gr,
unsigned int offset,
unsigned int size,
void *src);
diff --git a/lib/realm/include/realm.h b/lib/realm/include/realm.h
index 0b14157..c86b03d 100644
--- a/lib/realm/include/realm.h
+++ b/lib/realm/include/realm.h
@@ -257,7 +257,7 @@
enum s2_walk_status realm_ipa_to_pa(struct rec *rec,
unsigned long ipa,
- struct s2_walk_result *res);
+ struct s2_walk_result *s2_walk);
enum s2_walk_status realm_ipa_get_ripas(struct rec *rec, unsigned long ipa,
enum ripas *ripas_ptr);
diff --git a/lib/realm/include/rec.h b/lib/realm/include/rec.h
index 6b5b6a2..ecf63ce 100644
--- a/lib/realm/include/rec.h
+++ b/lib/realm/include/rec.h
@@ -266,7 +266,7 @@
void rec_run_loop(struct rec *rec, struct rmi_rec_exit *rec_exit);
void inject_serror(struct rec *rec, unsigned long vsesr);
-void emulate_stage2_data_abort(struct rec *rec, struct rmi_rec_exit *exit,
+void emulate_stage2_data_abort(struct rec *rec, struct rmi_rec_exit *rec_exit,
unsigned long rtt_level);
#endif /* __ASSEMBLER__ */
diff --git a/lib/realm/include/table.h b/lib/realm/include/table.h
index 73cceec..872cc44 100644
--- a/lib/realm/include/table.h
+++ b/lib/realm/include/table.h
@@ -39,8 +39,8 @@
unsigned long s2tte_create_unassigned_destroyed(void);
unsigned long s2tte_create_assigned_empty(unsigned long pa, long level);
unsigned long s2tte_create_assigned_ram(unsigned long pa, long level);
-unsigned long s2tte_create_assigned_ns(unsigned long s2tte, long level);
-unsigned long s2tte_create_assigned_destroyed(unsigned long s2tte, long level);
+unsigned long s2tte_create_assigned_ns(unsigned long pa, long level);
+unsigned long s2tte_create_assigned_destroyed(unsigned long pa, long level);
unsigned long s2tte_create_table(unsigned long pa, long level);
bool host_ns_s2tte_is_valid(unsigned long s2tte, long level);
@@ -78,9 +78,10 @@
unsigned long s2tte_map_size(int level);
struct realm_s2_context;
-void invalidate_page(const struct realm_s2_context *ctx, unsigned long addr);
-void invalidate_block(const struct realm_s2_context *ctx, unsigned long addr);
-void invalidate_pages_in_block(const struct realm_s2_context *ctx, unsigned long addr);
+void invalidate_page(const struct realm_s2_context *s2_ctx, unsigned long addr);
+void invalidate_block(const struct realm_s2_context *s2_ctx, unsigned long addr);
+void invalidate_pages_in_block(const struct realm_s2_context *s2_ctx,
+ unsigned long addr);
bool table_is_unassigned_empty_block(unsigned long *table);
bool table_is_unassigned_ram_block(unsigned long *table);
diff --git a/lib/realm/src/s2tt.c b/lib/realm/src/s2tt.c
index 55fa198..44d03dc 100644
--- a/lib/realm/src/s2tt.c
+++ b/lib/realm/src/s2tt.c
@@ -464,13 +464,13 @@
* - S2AP
* - Shareability
*/
-unsigned long s2tte_create_assigned_ns(unsigned long s2tte, long level)
+unsigned long s2tte_create_assigned_ns(unsigned long pa, long level)
{
assert(level >= RTT_MIN_BLOCK_LEVEL);
if (level == RTT_PAGE_LEVEL) {
- return (s2tte | S2TTE_PAGE_NS);
+ return (pa | S2TTE_PAGE_NS);
}
- return (s2tte | S2TTE_BLOCK_NS);
+ return (pa | S2TTE_BLOCK_NS);
}
/*