[PATCH 2/4] xfree86: fbdevhw: remove unnecessary debug code

Tiago Vignatti tiago.vignatti at nokia.com
Fri Sep 10 07:26:51 PDT 2010


It very likely no one will want to print all functions of this file for
debugging purposes. If this is the case, then a mix of ctags + cpp + gdb
can do the same job.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 hw/xfree86/fbdevhw/fbdevhw.c |   35 -----------------------------------
 1 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index bc9a65a..f50d562 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -16,24 +16,11 @@
 
 #include "fbdevhw.h"
 #include "fbpriv.h"
-
-#define PAGE_MASK               (~(getpagesize() - 1))
-
 #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 +426,6 @@ fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device)
 {
 	fbdevHWPtr fPtr;
 
-	TRACE_ENTER("Init");
-
 	fbdevHWGetRec(pScrn);
 	fPtr = FBDEVHWPTR(pScrn);
 
@@ -535,8 +520,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 +563,6 @@ fbdevHWSetVideoModes(ScrnInfoPtr pScrn)
 	char **modename;
 	DisplayModePtr mode,this,last = pScrn->modes;
 
-	TRACE_ENTER("VerifyModes");
 	if (NULL == pScrn->display->modes)
 		return;
 
@@ -637,7 +619,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 +644,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 +669,6 @@ fbdevHWLinearOffset(ScrnInfoPtr pScrn)
 {
 	fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
 
-	TRACE_ENTER("LinearOffset");
 	return fPtr->fboff;
 }
 
@@ -698,7 +677,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 +693,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 +723,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 +781,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 +791,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 +808,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 +835,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 +846,6 @@ fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
 {
 	ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
 
-	TRACE_ENTER("SwitchMode");
 
 	if (!fbdevHWSetMode(pScrn, mode, FALSE))
 		return FALSE;
@@ -889,7 +859,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 +875,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 +886,6 @@ fbdevHWLeaveVT(int scrnIndex, int flags)
 {
 	ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
 
-	TRACE_ENTER("LeaveVT");
 	fbdevHWRestore(pScrn);
 }
 
@@ -928,7 +895,6 @@ fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
 	fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
 	unsigned long fbmode;
 
-	TRACE_ENTER("DPMSSet");
 	if (!pScrn->vtSema)
 		return;
 
@@ -961,7 +927,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