From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Ariel Yu <ariel@ariels.xyz>
Cc: apw@canonical.com, joe@perches.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] checkpatch: recognize standard SI unit prefixes and symbols
Date: Mon, 17 Aug 2026 11:33:17 +0300 [thread overview]
Message-ID: <aoLHTQYeqJQlG-Sv@ashevche-desk.local> (raw)
In-Reply-To: <010601a006991191-5959d04d-7d19-4128-b488-e51f6f97330e-000000@ap-northeast-1.amazonses.com>
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 <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-08-17 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 15:51 [PATCH] " Ariel Yu
2026-08-14 22:21 ` Joe Perches
2026-08-15 18:04 ` [PATCH v2] " Ariel Yu
2026-08-17 8:33 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aoLHTQYeqJQlG-Sv@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=apw@canonical.com \
--cc=ariel@ariels.xyz \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®