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/drivers/pl011/include/pl011.h b/drivers/pl011/include/pl011.h
index c96b6e5..4794de6 100644
--- a/drivers/pl011/include/pl011.h
+++ b/drivers/pl011/include/pl011.h
@@ -37,12 +37,13 @@
 /*
  * Function that initiates UART for console output
  * Arguments:
- *   baseaddr - UART base address
- *   clock    - UART input clock which sets master trasmit/receive rate
- *   baud     - UART Baudrate
+ *   base_addr - UART base address
+ *   uart_clk  - UART input clock which sets master trasmit/receive rate
+ *   baud_rate - UART Baudrate
  * Returns:
  *   0 on success or -1 when invalid baseaddr/clock/baud is used
  */
-int uart_init(uintptr_t baseaddr, unsigned int clock, unsigned int baud);
+int uart_init(uintptr_t base_addr, unsigned int uart_clk,
+		unsigned int baud_rate);
 
 #endif /* PL011_H */
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);
 }
 
 /*
diff --git a/lib/xlat/include/xlat_tables.h b/lib/xlat/include/xlat_tables.h
index 4319bf3..0a6b5e4 100644
--- a/lib/xlat/include/xlat_tables.h
+++ b/lib/xlat/include/xlat_tables.h
@@ -235,7 +235,7 @@
  *
  * This function returns 0 on success or a POSIX error code otherwise.
  */
-int xlat_get_llt_from_va(struct xlat_llt_info * const retval,
+int xlat_get_llt_from_va(struct xlat_llt_info * const llt,
 			 const struct xlat_ctx * const ctx,
 			 const uintptr_t va);
 
@@ -284,7 +284,7 @@
  * about its type or validity. It is the caller responsibility to do any
  * necessary checks on the returned tte before using it.
  */
-uint64_t *xlat_get_tte_ptr(const struct xlat_llt_info * const table,
+uint64_t *xlat_get_tte_ptr(const struct xlat_llt_info * const llt,
 			   const uintptr_t va);
 
 /*
diff --git a/lib/xlat/src/xlat_tables_private.h b/lib/xlat/src/xlat_tables_private.h
index 6a33ee8..f5b01ef 100644
--- a/lib/xlat/src/xlat_tables_private.h
+++ b/lib/xlat/src/xlat_tables_private.h
@@ -53,7 +53,7 @@
 /*
  * Returns a block/page table descriptor for the given level and attributes.
  */
-uintptr_t xlat_desc(uint64_t attr, uintptr_t addr_pa, int level);
+uint64_t xlat_desc(uint64_t attr, uintptr_t addr_pa, int level);
 
 /*
  * Return the maximum physical address supported by the hardware.