[Compile Regression in 2.4.25-pre8][PATCH 16/42]

Kronos
2004-02-02T19:48:54Z

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...