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

From: Akinobu Mita
Date: Mon Dec 16 2019 - 10:02:49 EST


2019å12æ16æ(æ) 12:25 Matthew Wilcox <willy@xxxxxxxxxxxxx>:
>
> > +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, ...)