but not wrapped by a macro.
Patches 4-6 make existing kernel code aware of this fact.
The series was compile tested with make allyesconfig for x86 and
arm (with a cross compiler) but I might have missed something.
All kinds of comments are welcome.
Marc Andre Tanner (7):
printk: introduce
Because printk might be wrapped by a macro avoid constructs which
assume that the return value can be interpreted as a boolean value.
This doesn't work because the macro has no return value which
results in a compile error void value not ignored as it ought to be.
Signed-off-by: Marc Andre
Introduce a config option which allows to selectively compile out
printk messages based on a specified verbosity level.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
init/Kconfig | 28
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/init
Don't rely on the return value of STK_ERROR which is a wrapper
around printk use a normal if clause instead.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
drivers/media/video/stk-webcam.c | 16
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers
Use the unfiltered variant in cases where the return value
is of interest.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
drivers/char/mem.c |2 +-
drivers/md/md.c|2 +-
drivers/scsi/aic7xxx/aic79xx_osm.h |2 +-
drivers/scsi/aic7xxx
A later patch will #undef printk because the macro would otherwise
conflict with the function definition. Moving the printk function
to the end of the file makes sure that the macro is expanded within
the rest of the file.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
kernel/printk.c
The standard printk function will be wrapped by a macro.
However this doesn't work in all situations (for example
when the return value of printk is of interest). We
therefore provide a new function which is just an alias
to printk and therefore bypasses the macro.
Signed-off-by: Marc Andre
On Tue, Sep 01, 2009 at 07:37:27PM -0400, Mike Frysinger wrote:
On Tue, Sep 1, 2009 at 18:31, Marc Andre Tanner wrote:
This series adds a configuration option to selectively compile out
printk message strings based on a verbosity level.
This works by wrapping printk with a macro which
On Wed, Sep 02, 2009 at 12:35:42AM +0100, Jamie Lokier wrote:
Marc Andre Tanner wrote:
+ * The check with sizeof(void*) should make sure that we don't operate on
+ * pointers, which the compiler wouldn't be able to optimize out, but only
+ * on string constants.
Take a look
the next
version of the patch will contain even less changes to the rest of the
kernel.
I haven't looked over this patch series yet but does it work with the
pr_level macros (pr_info, pr_err, etc.)?
It should work, yes.
Regards,
Marc
--
Marc Andre Tanner http://www.brain-dump.org/ GPG
Introduce a config option which allows to selectively compile out
printk messages based on a specified verbosity level.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
init/Kconfig | 29 +
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/init
A later patch will #undef printk because the macro would otherwise
conflict with the function definition. Moving the printk function
to the end of the file makes sure that the macro is expanded within
the rest of the file.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
kernel/printk.c
We don't want to filter user space data which comes from /dev/kmsg.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
drivers/char/mem.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index afa8813..ba48b82 100644
The macro filters out printk messages based on a configurable verbosity
level (CONFIG_PRINTK_VERBOSITY).
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
include/linux/kernel.h | 23 +++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/linux
The standard printk function will be wrapped by a macro which
filters out messages above a certain verbosity level. Because
this might not be desired in certain situations we provide an
unfiltered variant.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
include/linux/kernel.h |5
On Wed, Sep 02, 2009 at 06:44:06PM +0200, Marco Stornelli wrote:
Marc Andre Tanner ha scritto:
Introduce a config option which allows to selectively compile out
printk messages based on a specified verbosity level.
Signed-off-by: Marc Andre Tanner m...@brain-dump.org
---
init
16 matches
Mail list logo