Smatch issues reported for Marvell a38x DDR4
Andrew Goodbody
andrew.goodbody at linaro.org
Thu Jul 24 18:01:03 CEST 2025
Hi Stefan,
Smatch reports the following issues
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:1029
mv_ddr4_center_of_mass_calc() warn: unsigned 'd_min' is never less than
zero.
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:2192
mv_ddr4_dm_tuning() warn: unsigned 'reg_val' is never less than zero.
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:2270
mv_ddr4_dm_tuning() warn: unsigned 'reg_val' is never less than zero.
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:662
mv_ddr4_centralization() warn: unsigned 'if_id' is never less than zero.
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:662
mv_ddr4_centralization() warn: we never enter this loop
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:911
mv_ddr4_dqs_reposition() warn: always true condition '(delta >= 0) =>
(0-255 >= 0)'
drivers/ddr/marvell/a38x/mv_ddr4_training_calibration.c:924
mv_ddr4_dqs_reposition() warn: unsigned 'delta' is never less than zero.
As I have no way to validate the correctness of the code I am not
confident enough to attempt to make the appropriate fixes in this case
as it could affect its operation. Perhaps you would like to take a look?
Thanks,
Andrew
More information about the U-Boot
mailing list