Messages in this thread Patch in this message | | | Date | Mon, 2 Feb 2004 20:46:58 +0100 | From | Kronos <> | Subject | [Compile Regression in 2.4.25-pre8][PATCH 16/42] |
| |
gamma_dma.c:608:18: warning: #warning list_entry() is needed here
Use list entry to get the container struct. Same thing applies to drmP.h.
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/drmP.h linux-2.4/drivers/char/drm/drmP.h --- linux-2.4-vanilla/drivers/char/drm/drmP.h Sat Jan 31 15:54:42 2004 +++ linux-2.4/drivers/char/drm/drmP.h Sat Jan 31 17:35:18 2004 @@ -344,7 +344,7 @@ do { \ struct list_head *_list; \ list_for_each( _list, &dev->maplist->head ) { \ - drm_map_list_t *_entry = (drm_map_list_t *)_list; \ + drm_map_list_t *_entry = list_entry(_list, drm_map_list_t, head); \ if ( _entry->map && \ _entry->map->offset == (_o) ) { \ (_map) = _entry->map; \ diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/gamma_dma.c linux-2.4/drivers/char/drm/gamma_dma.c --- linux-2.4-vanilla/drivers/char/drm/gamma_dma.c Sat Jan 31 15:54:42 2004 +++ linux-2.4/drivers/char/drm/gamma_dma.c Sat Jan 31 17:35:52 2004 @@ -605,8 +605,7 @@ memset( dev_priv, 0, sizeof(drm_gamma_private_t) ); list_for_each(list, &dev->maplist->head) { - #warning list_entry() is needed here - drm_map_list_t *r_list = (drm_map_list_t *)list; + drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head); if( r_list->map && r_list->map->type == _DRM_SHM && r_list->map->flags & _DRM_CONTAINS_LOCK ) { -- Reply-To: kronos@kronoz.cjb.net Home: http://kronoz.cjb.net Il coraggio non mi manca. E` la paura che mi frega... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |