ddr: altera: n5x: size_t cannot be less than 0

The function socfpga_get_handoff_size returns an int so make the struct
fields used to accept the return value also an int so that testing for
less than 0 is then valid.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2025-07-24 16:19:24 +01:00
committed by Tien Fong Chee
parent dff25bb4ab
commit 5a13fa7c66

View File

@@ -346,25 +346,25 @@ struct ddr_handoff {
phys_addr_t cntlr_base;
size_t cntlr_total_length;
enum ddr_type cntlr_t;
size_t cntlr_handoff_length;
int cntlr_handoff_length;
/* Second controller attributes*/
phys_addr_t cntlr2_handoff_base;
phys_addr_t cntlr2_base;
size_t cntlr2_total_length;
enum ddr_type cntlr2_t;
size_t cntlr2_handoff_length;
int cntlr2_handoff_length;
/* PHY attributes */
phys_addr_t phy_handoff_base;
phys_addr_t phy_base;
size_t phy_total_length;
size_t phy_handoff_length;
int phy_handoff_length;
/* PHY engine attributes */
phys_addr_t phy_engine_handoff_base;
size_t phy_engine_total_length;
size_t phy_engine_handoff_length;
int phy_engine_handoff_length;
/* Calibration attributes */
phys_addr_t train_imem_base;