Skip to contentSkip to conversation

arm: socfpga: fpga: fix type of local variable

PATCH New Simon Goldschmidt 2 participants 2 messages Oct 15, 2018 – Oct 16, 2018 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: fpga: fix type of local variable

The 'status' variable in 'socfpga_load()' for both gen5 and arria10 is of type 'unsigned long' while it is always used as 'int' only. Change it to 'int'.

---

 drivers/fpga/socfpga_arria10.c | 2 +-
 drivers/fpga/socfpga_gen5.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/fpga/socfpga_arria10.c +1 -1
index d6b59498e5..114dd910ab 100644
@@ -453,7 +453,7 @@ int fpgamgr_program_finish(void)
  */
 int socfpga_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
 {
-	unsigned long status;
+	int status;
 
 	/* disable all signals from hps peripheral controller to fpga */
 	writel(0, &system_manager_base->fpgaintf_en_global);
drivers/fpga/socfpga_gen5.c +1 -1
index 184de743fd..6d16e0b37f 100644
@@ -204,7 +204,7 @@ static int fpgamgr_program_poll_usermode(void)
  */
 int socfpga_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
 {
-	unsigned long status;
+	int status;
 
 	if ((uint32_t)rbf_data & 0x3) {
 		puts("FPGA: Unaligned data, realign to 32bit boundary.\n");
Signature · 1 line
2.17.1
Applied
#1 lore raw

PATCH 1/1 arm: socfpga: fpga: fix type of local variable

Quoted 6 lines · Simon Goldschmidt

The 'status' variable in 'socfpga_load()' for both gen5 and arria10 is of type 'unsigned long' while it is always used as 'int' only. Change it to 'int'.

---

Applied, thanks

Signature · 2 lines
Best regards,
Marek Vasut