summaryrefslogtreecommitdiff
path: root/src/smi_dac.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-22 17:05:21 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-22 17:05:21 -0300
commit6b5c22d8680573c8a6b259d78ba3c8435514fde9 (patch)
treeaf0cfdbbff3e602143957c92e98a113a71de1415 /src/smi_dac.c
parentcf7097c19b31671a53bc8161bd29b9f79f1d3d85 (diff)
Rework/simplify debug macros.
Instead of cut&paste of the name of the current function everywhere, just use cpp's __FUNCTION__ predefined macro. Create two macros to exit a function, named LEAVE() and RETURN(). Functions returning void should call LEAVE() and then explicitly return for now. "Logged" function calls are indented, so a review was done to ensure functions with a ENTER() also have the proper exit macro. The DEBUG macro was changed to have variadic arguments, and this way it is no longer required to prefix arguments with VERBLEV, but now it also is not possible to use another "verbosity value", but it wasn't used in any of the DEBUG macro calls.
Diffstat (limited to 'src/smi_dac.c')
-rw-r--r--src/smi_dac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/smi_dac.c b/src/smi_dac.c
index a5cfd77..f72c77e 100644
--- a/src/smi_dac.c
+++ b/src/smi_dac.c
@@ -87,9 +87,9 @@ SMI_CommonCalcClock(int scrnIndex, long freq, int min_m, int min_n1,
}
}
- DEBUG((VERBLEV, "Clock parameters for %1.6f MHz: m=%d, n1=%d, n2=%d\n",
- ((double)(best_m) / (double)(best_n1) / (1 << best_n2)) * BASE_FREQ,
- best_m, best_n1, best_n2));
+ DEBUG("Clock parameters for %1.6f MHz: m=%d, n1=%d, n2=%d\n",
+ ((double)(best_m) / (double)(best_n1) / (1 << best_n2)) * BASE_FREQ,
+ best_m, best_n1, best_n2);
if (SMI_LYNX_SERIES(pSmi->Chipset)) {
*ndiv = best_n1 | (best_n2 << 6);