[PATCH 2/4] cpu: microblaze: remove unused ret variable

Ovidiu Panait ovpanait at gmail.com
Thu Aug 25 08:41:29 CEST 2022


Drop the unused ret variable from microblaze_cpu_get_desc().

Signed-off-by: Ovidiu Panait <ovpanait at gmail.com>
---

 drivers/cpu/microblaze_cpu.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/cpu/microblaze_cpu.c b/drivers/cpu/microblaze_cpu.c
index 969a1047e5..4eae06a8a6 100644
--- a/drivers/cpu/microblaze_cpu.c
+++ b/drivers/cpu/microblaze_cpu.c
@@ -88,15 +88,14 @@ static int microblaze_cpu_get_desc(const struct udevice *dev, char *buf,
 	struct microblaze_cpuinfo *ci = gd_cpuinfo();
 	const char *cpu_ver, *fpga_family;
 	u32 cpu_freq_mhz;
-	int ret;
 
 	cpu_freq_mhz = ci->cpu_freq / 1000000;
 	cpu_ver = microblaze_lookup_cpu_version_string(ci->ver_code);
 	fpga_family = microblaze_lookup_fpga_family_string(ci->fpga_code);
 
-	ret = snprintf(buf, size,
-		       "MicroBlaze @ %uMHz, Rev: %s, FPGA family: %s",
-		       cpu_freq_mhz, cpu_ver, fpga_family);
+	snprintf(buf, size,
+		 "MicroBlaze @ %uMHz, Rev: %s, FPGA family: %s",
+		 cpu_freq_mhz, cpu_ver, fpga_family);
 
 	return 0;
 }
-- 
2.25.1



More information about the U-Boot mailing list