[lkml]   [2005]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 1/1] Audit return code of create_proc_*
Hi Domen,

On Friday 15 July 2005 00:19, you wrote:
> Audit return of create_proc_* functions.

This (and related changes) spam the log, if
kernel is compiled without /proc-support.

Kernels without /proc-support are quite common in the embedded world.

Just provide a function in a suitable header
(include/linux/proc_fs.h looks promising)
file, which contains the following:

#define procfs_failure(msg) do { printk(msg); } while(0)
#define procfs_failure(msg) do {} while(0)

and use it instead of the direct printk call.

That way you get both: Your GCC or checking tool warning is silenced
and the log is not spammed for the embedded people.

For code, which is broken without procfs, the code
should be fixed or it should select PROC_FS in its Kconfig file.


Ingo Oeser

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-07-16 14:01    [W:0.048 / U:1.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site