Re: [PATCH] thermal/drivers/qcom: Code refactoring

From: Bjorn Andersson
Date: Wed Jul 13 2022 - 15:47:57 EST


On Wed 13 Jul 09:10 CDT 2022, Carlos Bilbao wrote:

> On 7/12/22 23:30, Bjorn Andersson wrote:
>
> > On Tue 12 Jul 12:31 CDT 2022, Carlos Bilbao wrote:
[..]
> > > diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
> > > index 2fd94997245b..d2d78c7e20c8 100644
> > > --- a/drivers/thermal/qcom/tsens.h
> > > +++ b/drivers/thermal/qcom/tsens.h
> > > @@ -6,6 +6,7 @@
> > > #ifndef __QCOM_TSENS_H__
> > > #define __QCOM_TSENS_H__
> > > +#define MAX_NUM_SENSORS 11
> > This only seems to apply for the three cases you have listed here, e.g.
> > tsens-v2 (which also includes tsens.h) has max_sensors = 16.
>
> This should be an array with an enum for the versions.
>

As the numbers are used within each c-file, some defines at the top of
these would probably be a good idea.

Regards,
Bjorn