The wavelength tolerance calculation mistakenly uses the nominal wavelength LSB field (CMIS_NOM_WAVELENGTH_LSB) instead of the correct tolerance LSB field (CMIS_WAVELENGTH_TOL_LSB). This causes incorrect values to be reported for the "Laser wavelength tolerance". Use CMIS_NOM_WAVELENGTH_LSB -> CMIS_WAVELENGTH_TOL_LSB. Fixes: 3448a2f73e77 ("cmis: Add JSON output handling to --module-info in CMIS modules") Signed-off-by: Alok Tiwari --- cmis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmis.c b/cmis.c index 305814c..345ce1c 100644 --- a/cmis.c +++ b/cmis.c @@ -276,7 +276,7 @@ static void cmis_show_mit_compliance(const struct cmis_memory_map *map) "nm"); module_print_any_float("Laser wavelength tolerance", (((map->page_01h[CMIS_WAVELENGTH_TOL_MSB] << 8) | - map->page_01h[CMIS_NOM_WAVELENGTH_LSB]) * 0.05), + map->page_01h[CMIS_WAVELENGTH_TOL_LSB]) * 0.05), "nm"); } } -- 2.50.1