Re: [PATCH v2] checkpatch: recognize standard SI unit prefixes and symbols
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Sat, Aug 15, 2026 at 06:04:49PM +0000, Ariel Yu wrote: > checkpatch flags identifiers containing valid SI units as CamelCase. > > Expand the SI unit ignore patterns to recognize standard Système > International d'unités prefixes (u, m, k, M, G) and unit symbols > (V, A, Hz, Ohm, C, K, s, W, etc.): > > - Allow mixed-case suffixes after the [a-z][A-Z] SI unit core, so > derived units like _uV_per_C or _mV_per_K are no longer flagged. > - Allow mixed-case prefixes in both the two-char and three-char SI > patterns, so identifiers like clock_FREQ_kHz are recognized. > - Add Ohm (with all standard prefixes: uOhm, mOhm, kOhm, MOhm, GOhm) > to the three-char SI unit list. > - Allow mixed-case suffixes after three-char SI units as well. Maybe this way, or maybe some leveled one (first check the multiplier, then validate the SI unit). Whatever, I am okay with this approach. Acked-by: Andy Shevchenko <[email protected]> -- With Best Regards, Andy Shevchenko