* [PATCH] typo in kernel source (DEBUGFS)
@ 2010-01-13 11:57 Christoph Egger
2010-01-13 12:05 ` Robert P. J. Day
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Christoph Egger @ 2010-01-13 11:57 UTC (permalink / raw)
To: linux-kernel, Linus Walleij, sameo; +Cc: siccegge, Reinhard.Tartler
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
Hi all!
As part of the VAMOS[0] research project at the University of
Erlangen we're checking referential integrity between kernel KConfig
options and in-code Conditional blocks.
While working on this we detected a spelling error in
drivers/mfd/ab3100-otp.c which can be corrected using the attached
patch.
Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.
Regards
Christoph Egger
[0] http://vamos1.informatik.uni-erlangen.de/
[-- Attachment #2: 0001-CONFIG_DEBUG_FS-wrongly-written-asl-CONFIG_DEBUGFS.patch --]
[-- Type: text/x-diff, Size: 973 bytes --]
>From 31f303b71011a42dcef569a5caf26ebb2eeb429e Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Wed, 13 Jan 2010 12:47:05 +0100
Subject: [PATCH] CONFIG_DEBUG_FS wrongly written asl CONFIG_DEBUGFS
Following a already fixed documentation bug this code snippet wrongly
uses CONFIG_DEBUGFS without the underscore before FS. This patch
corrects the error.
---
drivers/mfd/ab3100-otp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c
index 0499b20..a04b53c 100644
--- a/drivers/mfd/ab3100-otp.c
+++ b/drivers/mfd/ab3100-otp.c
@@ -95,7 +95,7 @@ static int __init ab3100_otp_read(struct ab3100_otp *otp)
* This is a simple debugfs human-readable file that dumps out
* the contents of the OTP.
*/
-#ifdef CONFIG_DEBUGFS
+#ifdef CONFIG_DEBUG_FS
static int show_otp(struct seq_file *s, void *v)
{
struct ab3100_otp *otp = s->private;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-13 11:57 [PATCH] typo in kernel source (DEBUGFS) Christoph Egger
@ 2010-01-13 12:05 ` Robert P. J. Day
2010-01-13 13:15 ` Christoph Egger
2010-01-13 12:16 ` Robert P. J. Day
2010-01-14 10:07 ` Linus Walleij
2 siblings, 1 reply; 9+ messages in thread
From: Robert P. J. Day @ 2010-01-13 12:05 UTC (permalink / raw)
To: Christoph Egger; +Cc: linux-kernel, Linus Walleij, sameo, Reinhard.Tartler
On Wed, 13 Jan 2010, Christoph Egger wrote:
> Hi all!
>
> As part of the VAMOS[0] research project at the University of
> Erlangen we're checking referential integrity between kernel KConfig
> options and in-code Conditional blocks.
>
> While working on this we detected a spelling error in
> drivers/mfd/ab3100-otp.c which can be corrected using the attached
> patch.
>
> Please keep me informed of this patch getting confirmed /
> merged so we can keep track of it.
>
> Regards
>
> Christoph Egger
>
> [0] http://vamos1.informatik.uni-erlangen.de/
just FYI, the same information can be found where i post the output
from my kernel scanning scripts. specifically, that very typo is
already documented here:
http://www.crashcourse.ca/wiki/index.php/Badref_CONFIG_variables#mfd
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-13 12:05 ` Robert P. J. Day
@ 2010-01-13 13:15 ` Christoph Egger
2010-01-13 13:19 ` Robert P. J. Day
2010-01-13 15:01 ` Robert P. J. Day
0 siblings, 2 replies; 9+ messages in thread
From: Christoph Egger @ 2010-01-13 13:15 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-kernel, Linus Walleij, sameo, Reinhard.Tartler
On Wed, Jan 13, 2010 at 07:05:33AM -0500, Robert P. J. Day wrote:
>
> just FYI, the same information can be found where i post the output
> from my kernel scanning scripts. specifically, that very typo is
> already documented here:
>
> http://www.crashcourse.ca/wiki/index.php/Badref_CONFIG_variables#mfd
>
> rday
Jep I stumbled upon your reports while having a closer look at
what we found. Strangely while you did find somewhere around 250 such
Issues we are at 90[0] if you count #define-ed CONFIG_* to the
errors. I'll probably try to look at the difference between our
results.
[0] http://vamos1.informatik.uni-erlangen.de/graph.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-13 13:15 ` Christoph Egger
@ 2010-01-13 13:19 ` Robert P. J. Day
2010-01-13 15:01 ` Robert P. J. Day
1 sibling, 0 replies; 9+ messages in thread
From: Robert P. J. Day @ 2010-01-13 13:19 UTC (permalink / raw)
To: Christoph Egger; +Cc: linux-kernel, Linus Walleij, sameo, Reinhard.Tartler
On Wed, 13 Jan 2010, Christoph Egger wrote:
> On Wed, Jan 13, 2010 at 07:05:33AM -0500, Robert P. J. Day wrote:
> >
> > just FYI, the same information can be found where i post the
> > output from my kernel scanning scripts. specifically, that very
> > typo is already documented here:
> >
> > http://www.crashcourse.ca/wiki/index.php/Badref_CONFIG_variables#mfd
> >
> > rday
>
> Jep I stumbled upon your reports while having a closer look at
> what we found. Strangely while you did find somewhere around 250
> such Issues we are at 90[0] if you count #define-ed CONFIG_* to the
> errors. I'll probably try to look at the difference between our
> results.
>
> [0] http://vamos1.informatik.uni-erlangen.de/graph.html
it's entirely possible that i have false positives in my listings;
anyone who wants to look at them is responsible for checking them out
more carefully, but i believe i catch most of the errors.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-13 13:15 ` Christoph Egger
2010-01-13 13:19 ` Robert P. J. Day
@ 2010-01-13 15:01 ` Robert P. J. Day
1 sibling, 0 replies; 9+ messages in thread
From: Robert P. J. Day @ 2010-01-13 15:01 UTC (permalink / raw)
To: Christoph Egger; +Cc: linux-kernel, Linus Walleij, sameo, Reinhard.Tartler
On Wed, 13 Jan 2010, Christoph Egger wrote:
> On Wed, Jan 13, 2010 at 07:05:33AM -0500, Robert P. J. Day wrote:
> >
> > just FYI, the same information can be found where i post the output
> > from my kernel scanning scripts. specifically, that very typo is
> > already documented here:
> >
> > http://www.crashcourse.ca/wiki/index.php/Badref_CONFIG_variables#mfd
> >
> > rday
>
> Jep I stumbled upon your reports while having a closer look at
> what we found. Strangely while you did find somewhere around 250
> such Issues we are at 90[0] if you count #define-ed CONFIG_* to the
> errors. I'll probably try to look at the difference between our
> results.
regarding that last point, there's still a lot of explicit
CONFIG_-prefixed macros, which are massively discouraged since all
CONFIG_-prefixed symbols are supposed to be reserved solely for the
Kconfig namespace.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-13 11:57 [PATCH] typo in kernel source (DEBUGFS) Christoph Egger
2010-01-13 12:05 ` Robert P. J. Day
@ 2010-01-13 12:16 ` Robert P. J. Day
2010-01-14 10:07 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Robert P. J. Day @ 2010-01-13 12:16 UTC (permalink / raw)
To: Christoph Egger; +Cc: linux-kernel, Linus Walleij, sameo, Reinhard.Tartler
On Wed, 13 Jan 2010, Christoph Egger wrote:
> Hi all!
>
> As part of the VAMOS[0] research project at the University of
> Erlangen we're checking referential integrity between kernel KConfig
> options and in-code Conditional blocks.
>
> While working on this we detected a spelling error in
> drivers/mfd/ab3100-otp.c which can be corrected using the attached
> patch.
>
> Please keep me informed of this patch getting confirmed /
> merged so we can keep track of it.
>
> Regards
>
> Christoph Egger
>
> [0] http://vamos1.informatik.uni-erlangen.de/
by the way, if you're rooting around in the drivers/mfd directory,
feel free to correct this obvious typo in twl-core.c:
...
#if defined(CONFIG_INPUT_TWL4030_PWRBUTTON) \
|| defined(CONFIG_INPUT_TWL4030_PWBUTTON_MODULE)
^ missing "R"
...
there's also the test of the non-existent
CONFIG_TWL4030_BCI_BATTERY variable in twl-core.c and, well, you get
the idea.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-13 11:57 [PATCH] typo in kernel source (DEBUGFS) Christoph Egger
2010-01-13 12:05 ` Robert P. J. Day
2010-01-13 12:16 ` Robert P. J. Day
@ 2010-01-14 10:07 ` Linus Walleij
2010-01-15 14:01 ` Jiri Kosina
2 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2010-01-14 10:07 UTC (permalink / raw)
To: Christoph Egger; +Cc: linux-kernel, Linus Walleij, sameo, Reinhard.Tartler
2010/1/13 Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>:
> While working on this we detected a spelling error in
> drivers/mfd/ab3100-otp.c which can be corrected using the attached
> patch.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-14 10:07 ` Linus Walleij
@ 2010-01-15 14:01 ` Jiri Kosina
2010-01-15 16:54 ` Jiri Kosina
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Kosina @ 2010-01-15 14:01 UTC (permalink / raw)
To: Linus Walleij
Cc: Christoph Egger, linux-kernel, Linus Walleij, sameo,
Reinhard.Tartler
On Thu, 14 Jan 2010, Linus Walleij wrote:
> 2010/1/13 Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>:
>
> > While working on this we detected a spelling error in
> > drivers/mfd/ab3100-otp.c which can be corrected using the attached
> > patch.
>
> Acked-by: Linus Walleij <linus.walleij@stericsson.com>
The original patch misses a Signed-off-by. Please resend it to
trivial@kernel.org with this line, so that it could be applied.
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] typo in kernel source (DEBUGFS)
2010-01-15 14:01 ` Jiri Kosina
@ 2010-01-15 16:54 ` Jiri Kosina
0 siblings, 0 replies; 9+ messages in thread
From: Jiri Kosina @ 2010-01-15 16:54 UTC (permalink / raw)
To: Jiri Kosina
Cc: Linus Walleij, Christoph Egger, linux-kernel, Linus Walleij,
sameo, Reinhard.Tartler
On Fri, 15 Jan 2010, Jiri Kosina wrote:
> > 2010/1/13 Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>:
> >
> > > While working on this we detected a spelling error in
> > > drivers/mfd/ab3100-otp.c which can be corrected using the attached
> > > patch.
> >
> > Acked-by: Linus Walleij <linus.walleij@stericsson.com>
>
> The original patch misses a Signed-off-by. Please resend it to
> trivial@kernel.org with this line, so that it could be applied.
... and has this been tested at all?
drivers/mfd/ab3100-otp.c: In function ‘show_otp’:
drivers/mfd/ab3100-otp.c:101: error: dereferencing pointer to incomplete type
drivers/mfd/ab3100-otp.c:104: error: implicit declaration of function ‘seq_printf’
drivers/mfd/ab3100-otp.c:102: warning: unused variable ‘err’
drivers/mfd/ab3100-otp.c: In function ‘ab3100_otp_open’:
drivers/mfd/ab3100-otp.c:116: error: implicit declaration of function ‘single_open’
drivers/mfd/ab3100-otp.c:116: error: ‘ab3100_otp_show’ undeclared (first use in this function)
drivers/mfd/ab3100-otp.c:116: error: (Each undeclared identifier is reported only once
drivers/mfd/ab3100-otp.c:116: error: for each function it appears in.)
drivers/mfd/ab3100-otp.c: At top level:
drivers/mfd/ab3100-otp.c:121: error: ‘seq_read’ undeclared here (not in a function)
drivers/mfd/ab3100-otp.c:122: error: ‘seq_lseek’ undeclared here (not in a function)
drivers/mfd/ab3100-otp.c:123: error: ‘single_release’ undeclared here (not in a function)
drivers/mfd/ab3100-otp.c: In function ‘ab3100_otp_init_debugfs’:
drivers/mfd/ab3100-otp.c:134: error: ‘err’ undeclared (first use in this function)
drivers/mfd/ab3100-otp.c: In function ‘ab3100_otp_exit_debugfs’:
drivers/mfd/ab3100-otp.c:140: error: implicit declaration of function ‘debugfs_remove_file’
So looks like the debugfs code might need some more surgery.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-01-15 16:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 11:57 [PATCH] typo in kernel source (DEBUGFS) Christoph Egger
2010-01-13 12:05 ` Robert P. J. Day
2010-01-13 13:15 ` Christoph Egger
2010-01-13 13:19 ` Robert P. J. Day
2010-01-13 15:01 ` Robert P. J. Day
2010-01-13 12:16 ` Robert P. J. Day
2010-01-14 10:07 ` Linus Walleij
2010-01-15 14:01 ` Jiri Kosina
2010-01-15 16:54 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox