Re: [PATCH 1/3] lpd: Add support for Marvell HDD LEDs on S822LC for HPC

Mauricio Faria de Oliveira <[email protected]> Tue, 8 Nov 2016 14:41:14 -0200
Newsgroups gmane.linux.tools.diag.devel
Message-ID <[email protected]>
On 11/08/2016 11:05 AM, Mauricio Faria de Oliveira wrote:
>> We have "LPD_DEBUG" for debug lpd code. Why not use same macro here?
>
> Yes, I see. I had build problems w/ the original code & LPD_DEBUG iirc
> (not sure if I had set it correctly though; could you demonstrate it?)

Hey, nevermind. I can't explain. Now it works.

$ make CFLAGS='-DLPD_DEBUG'

The point I don't like is that this is a compile time change.  If one
wants to change the behavior at runtime (get debug messages), it's not
possible.

I can change _dbg() to consider both the compile time flag and runtime
env var.  If it's set at build time, always print the debug messages,
and if it's not set an build time, but the env var is set at runtime,
then print debug messages too.

I'll submit a v3 of this patch only with this change, if you like
that approach.

Thanks for poking at that. :)

-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi