Skip to contentSkip to conversation

Warnings in drm modules - 2.4.18pre...

PATCH New Michal Jaegermann 1 participant 1 message Feb 4, 2002 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Warnings in drm modules - 2.4.18pre...

The following, obvious (DMA_BLOCK_SIZE is of size_t type) and otherwise harmless, patch kills literally few hundreds compilation warnings on 64-bit platforms.

drivers/char/drm/mga_drv.h renamed from drivers/char/drm/mga_drv.h~ +2 -2
@@ -247,7 +247,7 @@
 	if ( MGA_VERBOSE ) {						\
 		DRM_INFO( "BEGIN_DMA( %d ) in %s\n",			\
 			  (n), __FUNCTION__ );				\
-		DRM_INFO( "   space=0x%x req=0x%x\n",			\
+		DRM_INFO( "   space=0x%x req=0x%lx\n",			\
 			  dev_priv->prim.space, (n) * DMA_BLOCK_SIZE );	\
 	}								\
 	prim = dev_priv->prim.start;					\
@@ -297,7 +297,7 @@
 #define DMA_WRITE( offset, val )					\
 do {									\
 	if ( MGA_VERBOSE ) {						\
-		DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04x\n",		\
+		DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04lx\n",	\
 			  (u32)(val), write + (offset) * sizeof(u32) );	\
 	}								\
 	*(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val;	\

Can it be applied, please, if only to reduce noise?

Once we are at it here is another patch of a similar character:

drivers/char/drm/radeon_cp.c renamed from drivers/char/drm/radeon_cp.c~ +1 -1
@@ -623,7 +623,7 @@
 
 		RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR,
 			     entry->busaddr[page_ofs]);
-		DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
+		DRM_DEBUG( "ring rptr: offset=0x%08lx handle=0x%08lx\n",
 			   entry->busaddr[page_ofs],
 			   entry->handle + tmp_ofs );
 	}
drivers/char/drm/r128_cce.c renamed from drivers/char/drm/r128_cce.c~ +1 -1
@@ -352,7 +352,7 @@
 
 		R128_WRITE( R128_PM4_BUFFER_DL_RPTR_ADDR,
      			    entry->busaddr[page_ofs]);
-		DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
+		DRM_DEBUG( "ring rptr: offset=0x%08lx handle=0x%08lx\n",
 			   entry->busaddr[page_ofs],
      			   entry->handle + tmp_ofs );
 	}

although results are not spectacular. :-)

Michal