[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006182016.C93BC8AB@keescook>
Date: Thu, 18 Jun 2020 20:42:01 -0700
From: Kees Cook <keescook@...omium.org>
To: Brendan Higgins <brendanhiggins@...gle.com>
Cc: David Gow <davidgow@...gle.com>,
Alan Maguire <alan.maguire@...cle.com>,
Vitor Massaru Iha <vitor@...saru.org>,
KUnit Development <kunit-dev@...glegroups.com>,
Shuah Khan <skhan@...uxfoundation.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-kernel-mentees@...ts.linuxfoundation.org,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: common KUnit Kconfig and file naming (was: Re: [PATCH] lib:
kunit_test_overflow: add KUnit test of check_*_overflow functions)
On Thu, Jun 18, 2020 at 01:27:55PM -0700, Brendan Higgins wrote:
> I am cool with changing *-test.c to *-kunit.c. The *-test.c was a hold
I am fine with basically any decision as long as there's a single naming
convention, *except* for this part. Dashes in source files creates
confusion for module naming. Separators should be underscores. This is
a standing pet-peeve of mine, and while I certainly can't fix it
universally in the kernel, we can at least avoid creating an entire
subsystem that gets this wrong for all modules. :)
To illustrate:
$ modinfo dvb-bt8xx
filename: .../kernel/drivers/media/pci/bt8xx/dvb-bt8xx.ko
...
name: dvb_bt8xx
^ does not match the .ko file, nor source.
Primarily my issue is the disconnect between "dmesg" output and finding
the source. It's not like, a huge deal, but it bugs me. :) As in:
$ strings drivers/media/pci/bt8xx/dvb-bt8xx.o | grep 'Init Error'
4dvb_bt8xx: or51211: Init Error - Can't Reset DVR (%i)
All this said, if there really is some good reason to use dashes, I will
get over it. :P
(And now that I've had to say all this "out loud", I wonder if maybe I
could actually fix this all at the root cause: KBUILD_MOD_NAME... it is
sometimes used for identifiers, which is why it does the underscore
replacement... I wonder if it could be split into "name" and
"identifier"...)
--
Kees Cook
Powered by blists - more mailing lists