Re: Debug messages with cx24110

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Helmut Auer wrote:
> Hi Andreas
>> this is the default for static variables. The whole kernel relies on the
>> fact, that they are initialized to zero. How can this change anything?
>> Are you using a broken compiler? Can you try another version?
>>
>> Quoting from the dietlibc FAQ:
>>
>> Q: I see lots of uninitialized variables, like "static int foo;".  What
>> gives?
>> A: "static" global variables are initialized to 0.  ANSI C guarantees that.
>>    Technically speaking, static variables go into the .bss ELF segment,
>>    while "static int foo=0" goes into .data.  Because .bss is zero
>>    filled by the OS, it does not need to be in the actual binary.  So it
>>    is in fact better to not initialize static variables if the desired
>>    initialization value is 0 anyway.  The same is true for pointers, by
>>    the way.  On all platforms supported by the diet libc, numeric zero
>>    is also the pointer value for NULL.  So not initializing a static
>>    pointer yields NULL.
>>
>> Regards,
>> Andreas
>>
> Sorry - you're absolutely right, I just took a quick lopok at the wrong sources an made a wrong 
> decision :)
> The problem are the lot of unnecessary printk statements in printk statements in
> linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
> like:
>          printk("cx24108 debug: entering SetTunerFreq, freq=%d\n",freq);
>          printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq);
>          printk("cx24108 debug: pump=%d, n=%d, a=%d\n",pump,n,a);

just replace printk with a dprintk


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux