From: Dave Airlie Date: Wed, 25 Jan 2006 21:32:14 +0000 (+1100) Subject: drm: Fixes sparse warnings in via_dmablit.c X-Git-Tag: v2.6.16-rc2~1^2~5^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=339363c4c6fe01043c51e7d6e9fbeb8feee00841;p=linux-2.6 drm: Fixes sparse warnings in via_dmablit.c Fixes the following sparse warnings: drivers/char/drm/via_dmablit.c:111:35: warning: Using plain integer as NULL pointer drivers/char/drm/via_dmablit.c:584:23: warning: Using plain integer as NULL pointer Signed-off-by: Luiz Capitulino Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/via_dmablit.c b/drivers/char/drm/via_dmablit.c index 9d5e027dae..a28eece628 100644 --- a/drivers/char/drm/via_dmablit.c +++ b/drivers/char/drm/via_dmablit.c @@ -108,7 +108,7 @@ via_map_blit_for_device(struct pci_dev *pdev, int num_desc = 0; int cur_line; dma_addr_t next = 0 | VIA_DMA_DPR_EC; - drm_via_descriptor_t *desc_ptr = 0; + drm_via_descriptor_t *desc_ptr = NULL; if (mode == 1) desc_ptr = vsg->desc_pages[cur_descriptor_page]; @@ -581,7 +581,7 @@ via_build_sg_info(drm_device_t *dev, drm_via_sg_info_t *vsg, drm_via_dmablit_t * int ret = 0; vsg->direction = (draw) ? DMA_TO_DEVICE : DMA_FROM_DEVICE; - vsg->bounce_buffer = 0; + vsg->bounce_buffer = NULL; vsg->state = dr_via_sg_init;