lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 01/12] add helpers for kelvin to/from Celsius conversion
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, ...)

\
 
 \ /
  Last update: 2019-12-16 16:03    [W:0.017 / U:2.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site