Re: [PATCH v4 01/12] add helpers for kelvin to/from Celsius conversion

Akinobu Mita
2019-12-16T15:02:47Z

2019年12月16日(月) 12:25 Matthew Wilcox <willy@infradead.org>:
>
> > +static inline long milli_kelvin_to_millicelsius(long t)
> > +{
> > + return t + ABSOLUTE_ZERO_MILLICELSIUS;
> > +}
>
> Why is there an underscore between 'milli' and 'kelvin', but not between
> 'milli' and 'celsius'?

Because these function names are derived from the existing macros in
linux/thermal.h.

Does anyone have a preference for the underscore in these function names?

1. underscore between unit prefix and 'kelvin,
no underscore between unit prefix and 'celsius'
(e.g. milli_kelvin_to_millicelsius, deci_kelvin_to_millicelsius, ...)

2. underscore between unit prefix and 'kelvin,
underscore between unit prefix and 'celsius'
(e.g. milli_kelvin_to_milli_celsius, deci_kelvin_to_milli_celsius, ...)

3. no underscore between unit prefix and 'kelvin,
no underscore between unit prefix and 'celsius'
(e.g. millikelvin_to_millicelsius, decikelvin_to_millicelsius, ...)