Message ID | 20240503-mtk-thermal-lvts-ctrl-idx-fix-v1-0-f605c50ca117@baylibre.com |
---|---|
Headers | show |
Series | Mediatek lvts_thermal driver: Fix wrong lvts_ctrl index | expand |
On Fri, 3 May 2024, Julien Panis wrote: > In struct lvts_ctrl_data, num_lvts_sensor and cal_offset[] are not used. > > Signed-off-by: Julien Panis <jpanis@baylibre.com> Reviewed-by: Nicolas Pitre <npitre@baylibre.com> > --- > drivers/thermal/mediatek/lvts_thermal.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c > index 86b2f44355ac..18a796386cd0 100644 > --- a/drivers/thermal/mediatek/lvts_thermal.c > +++ b/drivers/thermal/mediatek/lvts_thermal.c > @@ -105,8 +105,6 @@ struct lvts_sensor_data { > > struct lvts_ctrl_data { > struct lvts_sensor_data lvts_sensor[LVTS_SENSOR_MAX]; > - int cal_offset[LVTS_SENSOR_MAX]; > - int num_lvts_sensor; > u8 valid_sensor_mask; > int offset; > int mode; > > -- > 2.37.3 > >
On 03/05/2024 17:35, Julien Panis wrote: > PATCH 1/2 is a minor change: it just removes 2 unused members from > 'struct lvts_ctrl_data'. > > PATCH 2/2 is a major bug fix: it fixes a situation where a wrong > array index is used as 'struct lvts_ctrl_data' type item. > > Signed-off-by: Julien Panis <jpanis@baylibre.com> > --- Applied, thanks
PATCH 1/2 is a minor change: it just removes 2 unused members from 'struct lvts_ctrl_data'. PATCH 2/2 is a major bug fix: it fixes a situation where a wrong array index is used as 'struct lvts_ctrl_data' type item. Signed-off-by: Julien Panis <jpanis@baylibre.com> --- Julien Panis (2): thermal/drivers/mediatek/lvts_thermal: Remove unused members from struct lvts_ctrl_data thermal/drivers/mediatek/lvts_thermal: Fix wrong lvts_ctrl index drivers/thermal/mediatek/lvts_thermal.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- base-commit: 9221b2819b8a4196eecf5476d66201be60fbcf29 change-id: 20240503-mtk-thermal-lvts-ctrl-idx-fix-ca7e7ea47a0f Best regards,