On Wed, Feb 10, 2010 at 06:47:49PM +0800, Marek Lindner wrote:
On Wednesday 10 February 2010 10:36:41 Linus L??ssing wrote:
bat_printk is calling a printk which got previously substituted because of the define in compat.h. This patch removes the define for the scope of bat_printk.c.
After seeing your patch I understand the issue. We redefine printk() to bat_printk() which works fine for all functions except for bat_printk() itself. I think your approach seems to be a solution although we don't need to define printk at the end again, do we ?
I think Simon added compat.h when he reworked the patch. My original version did not use it to avoid this recursion problem. Linus's solution looks O.K, but as you said it is not necessary to redefine it at the end. I also don't see why the ___printk is needed.
While we are at it, please also remove the "foo:". That i do claim responsibility for. I developed the patch on a kernel which is %pM capable and i wanted to be sure it was using bat_printk and not the native printk when testing. So i put in the foo. It never got removed :-(
Andrew