[PATCH 2/6] xfree86: fbdevhw: remove superfluous debug code
Tiago Vignatti
tiago.vignatti at nokia.com
Mon May 31 06:16:52 PDT 2010
Rarely one would want to print all functions of a given file when debugging.
If this is the case, then a mix of ctags + cpp + gdb probably can do the same
(useless?) job.
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
hw/xfree86/fbdevhw/fbdevhw.c | 32 --------------------------------
1 files changed, 0 insertions(+), 32 deletions(-)
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index bc9a65a..c8edc12 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -22,18 +22,8 @@
#include "globals.h"
#include <X11/extensions/dpmsconst.h>
-#define DEBUG 0
-
#define PAGE_MASK (~(getpagesize() - 1))
-#if DEBUG
-# define TRACE_ENTER(str) ErrorF("fbdevHW: " str " %d\n",pScrn->scrnIndex)
-#else
-# define TRACE_ENTER(str)
-#endif
-
-/* -------------------------------------------------------------------- */
-
static MODULESETUPPROTO(fbdevhwSetup);
static XF86ModuleVersionInfo fbdevHWVersRec =
@@ -439,8 +429,6 @@ fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device)
{
fbdevHWPtr fPtr;
- TRACE_ENTER("Init");
-
fbdevHWGetRec(pScrn);
fPtr = FBDEVHWPTR(pScrn);
@@ -535,8 +523,6 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
struct fb_var_screeninfo req_var = fPtr->var, set_var;
-
- TRACE_ENTER("SetMode");
xfree2fbdev_fblayout(pScrn, &req_var);
xfree2fbdev_timing(mode, &req_var);
@@ -580,7 +566,6 @@ fbdevHWSetVideoModes(ScrnInfoPtr pScrn)
char **modename;
DisplayModePtr mode,this,last = pScrn->modes;
- TRACE_ENTER("VerifyModes");
if (NULL == pScrn->display->modes)
return;
@@ -637,7 +622,6 @@ fbdevHWUseBuildinMode(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("UseBuildinMode");
pScrn->modes = &fPtr->buildin;
pScrn->virtualX = pScrn->display->virtualX;
pScrn->virtualY = pScrn->display->virtualY;
@@ -663,7 +647,6 @@ fbdevHWMapVidmem(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("MapVidmem");
if (NULL == fPtr->fbmem) {
calculateFbmem_len(fPtr);
fPtr->fbmem = mmap(NULL, fPtr->fbmem_len, PROT_READ | PROT_WRITE,
@@ -689,7 +672,6 @@ fbdevHWLinearOffset(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("LinearOffset");
return fPtr->fboff;
}
@@ -698,7 +680,6 @@ fbdevHWUnmapVidmem(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("UnmapVidmem");
if (NULL != fPtr->fbmem) {
if (-1 == munmap(fPtr->fbmem, fPtr->fbmem_len))
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -715,7 +696,6 @@ fbdevHWMapMMIO(ScrnInfoPtr pScrn)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("MapMMIO");
if (NULL == fPtr->mmio) {
/* tell the kernel not to use accels to speed up console scrolling */
fPtr->var.accel_flags = 0;
@@ -746,7 +726,6 @@ fbdevHWUnmapMMIO(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("UnmapMMIO");
if (NULL != fPtr->mmio) {
if (-1 == munmap((void *)((unsigned long)fPtr->mmio & PAGE_MASK), fPtr->mmio_len))
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -805,7 +784,6 @@ fbdevHWSave(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("Save");
if (0 != ioctl(fPtr->fd,FBIOGET_VSCREENINFO,(void*)(&fPtr->saved_var)))
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"FBIOGET_VSCREENINFO: %s\n", strerror(errno));
@@ -816,7 +794,6 @@ fbdevHWRestore(ScrnInfoPtr pScrn)
{
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("Restore");
if (0 != ioctl(fPtr->fd,FBIOPUT_VSCREENINFO,(void*)(&fPtr->saved_var)))
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"FBIOPUT_VSCREENINFO: %s\n", strerror(errno));
@@ -834,7 +811,6 @@ fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
unsigned short red,green,blue;
int i;
- TRACE_ENTER("LoadPalette");
cmap.len = 1;
cmap.red = &red;
cmap.green = &green;
@@ -862,8 +838,6 @@ fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- TRACE_ENTER("ValidMode");
-
if (!fbdevHWSetMode(pScrn, mode, TRUE))
return MODE_BAD;
@@ -875,7 +849,6 @@ fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- TRACE_ENTER("SwitchMode");
if (!fbdevHWSetMode(pScrn, mode, FALSE))
return FALSE;
@@ -889,7 +862,6 @@ fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags)
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
- TRACE_ENTER("AdjustFrame");
if ( x < 0 || x + fPtr->var.xres > fPtr->var.xres_virtual ||
y < 0 || y + fPtr->var.yres > fPtr->var.yres_virtual )
return;
@@ -906,7 +878,6 @@ fbdevHWEnterVT(int scrnIndex, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- TRACE_ENTER("EnterVT");
if (!fbdevHWModeInit(pScrn, pScrn->currentMode))
return FALSE;
fbdevHWAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
@@ -918,7 +889,6 @@ fbdevHWLeaveVT(int scrnIndex, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- TRACE_ENTER("LeaveVT");
fbdevHWRestore(pScrn);
}
@@ -928,7 +898,6 @@ fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
unsigned long fbmode;
- TRACE_ENTER("DPMSSet");
if (!pScrn->vtSema)
return;
@@ -961,7 +930,6 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int mode)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
unsigned long unblank;
- TRACE_ENTER("HWSaveScreen");
if (!pScrn->vtSema)
return TRUE;
--
1.7.1.226.g770c5
More information about the xorg-devel
mailing list