Re: [PATCH]: drm: cleanup DRM_DEBUG() parameters
From: Márton Németh <[EMAIL PROTECTED]> As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending "\n" was added. Signed-off-by: Márton Németh <[EMAIL PROTECTED]> --- diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c --- linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c 2007-10-17 22:22:19.0 +0200 @@ -41,7 +41,7 @@ static void *drm_ati_alloc_pcigart_table struct page *page; int i; - DRM_DEBUG("%s: alloc %d order\n", __FUNCTION__, order); + DRM_DEBUG("%d order\n", order); address = __get_free_pages(GFP_KERNEL | __GFP_COMP, order); @@ -54,7 +54,7 @@ static void *drm_ati_alloc_pcigart_table for (i = 0; i < order; i++, page++) SetPageReserved(page); - DRM_DEBUG("%s: returning 0x%08lx\n", __FUNCTION__, address); + DRM_DEBUG("returning 0x%08lx\n", address); return (void *)address; } @@ -63,7 +63,7 @@ static void drm_ati_free_pcigart_table(v struct page *page; int i; int num_pages = 1 << order; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); page = virt_to_page((unsigned long)address); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c linux-2.6.23-mm1/drivers/char/drm/drm_irq.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_irq.c 2007-10-17 22:22:19.0 +0200 @@ -107,7 +107,7 @@ static int drm_irq_install(struct drm_de dev->irq_enabled = 1; mutex_unlock(>struct_mutex); - DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); + DRM_DEBUG("irq=%d\n", dev->irq); if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { init_waitqueue_head(>vbl_queue); @@ -164,7 +164,7 @@ int drm_irq_uninstall(struct drm_device if (!irq_enabled) return -EINVAL; - DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); + DRM_DEBUG("irq=%d\n", dev->irq); dev->driver->irq_uninstall(dev); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c 2007-10-17 22:31:42.0 +0200 @@ -67,7 +67,7 @@ int drm_sg_alloc(struct drm_device *dev, struct drm_sg_mem *entry; unsigned long pages, i, j; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; @@ -81,7 +81,7 @@ int drm_sg_alloc(struct drm_device *dev, memset(entry, 0, sizeof(*entry)); pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; - DRM_DEBUG("sg size=%ld pages=%ld\n", request->size, pages); + DRM_DEBUG("size=%ld pages=%ld\n", request->size, pages); entry->pages = pages; entry->pagelist = drm_alloc(pages * sizeof(*entry->pagelist), @@ -122,8 +122,8 @@ int drm_sg_alloc(struct drm_device *dev, entry->handle = ScatterHandle((unsigned long)entry->virtual); - DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); - DRM_DEBUG("sg alloc virtual = %p\n", entry->virtual); + DRM_DEBUG("handle = %08lx\n", entry->handle); + DRM_DEBUG("virtual = %p\n", entry->virtual); for (i = (unsigned long)entry->virtual, j = 0; j < pages; i += PAGE_SIZE, j++) { @@ -210,7 +210,7 @@ int drm_sg_free(struct drm_device *dev, if (!entry || entry->handle != request->handle) return -EINVAL; - DRM_DEBUG("sg free virtual = %p\n", entry->virtual); + DRM_DEBUG("virtual = %p\n", entry->virtual); drm_sg_cleanup(entry); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c linux-2.6.23-mm1/drivers/char/drm/drm_vm.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c 2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_vm.c 2007-10-17 22:22:19.0 +0200 @@ -180,7 +180,7 @@ static __inline__ struct page *drm_do_vm return NOPAGE_SIGBUS; get_page(page); - DRM_DEBUG("shm_nopage 0x%lx\n", address); + DRM_DEBUG("0x%lx\n", address); return page; } @@ -294,7 +294,7 @@ static __inline__ struct page *drm_do_vm get_page(page); - DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr); + DRM_DEBUG("0x%lx (page %lu)\n", address, page_nr); return page; } diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/i810_dma.c linux-2.6.23-mm1/drivers/char/drm/i810_dma.c ---
Re: [PATCH]: drm: cleanup DRM_DEBUG() parameters
From: Márton Németh <[EMAIL PROTECTED]> As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending "\n" was added. Signed-off-by: Márton Németh <[EMAIL PROTECTED]> --- diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c --- linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c 2007-10-17 22:22:19.0 +0200 @@ -41,7 +41,7 @@ static void *drm_ati_alloc_pcigart_table struct page *page; int i; - DRM_DEBUG("%s: alloc %d order\n", __FUNCTION__, order); + DRM_DEBUG("%d order\n", order); address = __get_free_pages(GFP_KERNEL | __GFP_COMP, order); @@ -54,7 +54,7 @@ static void *drm_ati_alloc_pcigart_table for (i = 0; i < order; i++, page++) SetPageReserved(page); - DRM_DEBUG("%s: returning 0x%08lx\n", __FUNCTION__, address); + DRM_DEBUG("returning 0x%08lx\n", address); return (void *)address; } @@ -63,7 +63,7 @@ static void drm_ati_free_pcigart_table(v struct page *page; int i; int num_pages = 1 << order; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); page = virt_to_page((unsigned long)address); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c linux-2.6.23-mm1/drivers/char/drm/drm_irq.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_irq.c 2007-10-17 22:22:19.0 +0200 @@ -107,7 +107,7 @@ static int drm_irq_install(struct drm_de dev->irq_enabled = 1; mutex_unlock(>struct_mutex); - DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); + DRM_DEBUG("irq=%d\n", dev->irq); if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { init_waitqueue_head(>vbl_queue); @@ -164,7 +164,7 @@ int drm_irq_uninstall(struct drm_device if (!irq_enabled) return -EINVAL; - DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); + DRM_DEBUG("irq=%d\n", dev->irq); dev->driver->irq_uninstall(dev); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c 2007-10-17 22:31:42.0 +0200 @@ -67,7 +67,7 @@ int drm_sg_alloc(struct drm_device *dev, struct drm_sg_mem *entry; unsigned long pages, i, j; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; @@ -81,7 +81,7 @@ int drm_sg_alloc(struct drm_device *dev, memset(entry, 0, sizeof(*entry)); pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; - DRM_DEBUG("sg size=%ld pages=%ld\n", request->size, pages); + DRM_DEBUG("size=%ld pages=%ld\n", request->size, pages); entry->pages = pages; entry->pagelist = drm_alloc(pages * sizeof(*entry->pagelist), @@ -122,8 +122,8 @@ int drm_sg_alloc(struct drm_device *dev, entry->handle = ScatterHandle((unsigned long)entry->virtual); - DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); - DRM_DEBUG("sg alloc virtual = %p\n", entry->virtual); + DRM_DEBUG("handle = %08lx\n", entry->handle); + DRM_DEBUG("virtual = %p\n", entry->virtual); for (i = (unsigned long)entry->virtual, j = 0; j < pages; i += PAGE_SIZE, j++) { @@ -210,7 +210,7 @@ int drm_sg_free(struct drm_device *dev, if (!entry || entry->handle != request->handle) return -EINVAL; - DRM_DEBUG("sg free virtual = %p\n", entry->virtual); + DRM_DEBUG("virtual = %p\n", entry->virtual); drm_sg_cleanup(entry); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c linux-2.6.23-mm1/drivers/char/drm/drm_vm.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c 2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_vm.c 2007-10-17 22:22:19.0 +0200 @@ -180,7 +180,7 @@ static __inline__ struct page *drm_do_vm return NOPAGE_SIGBUS; get_page(page); - DRM_DEBUG("shm_nopage 0x%lx\n", address); + DRM_DEBUG("0x%lx\n", address); return page; } @@ -294,7 +294,7 @@ static __inline__ struct page *drm_do_vm get_page(page); - DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr); + DRM_DEBUG("0x%lx (page %lu)\n", address, page_nr); return page; } diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/i810_dma.c linux-2.6.23-mm1/drivers/char/drm/i810_dma.c ---
Re: [PATCH]: drm: cleanup DRM_DEBUG() parameters
From: Márton Németh [EMAIL PROTECTED] As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending \n was added. Signed-off-by: Márton Németh [EMAIL PROTECTED] --- diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c --- linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c 2007-10-17 22:22:19.0 +0200 @@ -41,7 +41,7 @@ static void *drm_ati_alloc_pcigart_table struct page *page; int i; - DRM_DEBUG(%s: alloc %d order\n, __FUNCTION__, order); + DRM_DEBUG(%d order\n, order); address = __get_free_pages(GFP_KERNEL | __GFP_COMP, order); @@ -54,7 +54,7 @@ static void *drm_ati_alloc_pcigart_table for (i = 0; i order; i++, page++) SetPageReserved(page); - DRM_DEBUG(%s: returning 0x%08lx\n, __FUNCTION__, address); + DRM_DEBUG(returning 0x%08lx\n, address); return (void *)address; } @@ -63,7 +63,7 @@ static void drm_ati_free_pcigart_table(v struct page *page; int i; int num_pages = 1 order; - DRM_DEBUG(%s\n, __FUNCTION__); + DRM_DEBUG(\n); page = virt_to_page((unsigned long)address); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c linux-2.6.23-mm1/drivers/char/drm/drm_irq.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_irq.c 2007-10-17 22:22:19.0 +0200 @@ -107,7 +107,7 @@ static int drm_irq_install(struct drm_de dev-irq_enabled = 1; mutex_unlock(dev-struct_mutex); - DRM_DEBUG(%s: irq=%d\n, __FUNCTION__, dev-irq); + DRM_DEBUG(irq=%d\n, dev-irq); if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { init_waitqueue_head(dev-vbl_queue); @@ -164,7 +164,7 @@ int drm_irq_uninstall(struct drm_device if (!irq_enabled) return -EINVAL; - DRM_DEBUG(%s: irq=%d\n, __FUNCTION__, dev-irq); + DRM_DEBUG(irq=%d\n, dev-irq); dev-driver-irq_uninstall(dev); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c 2007-10-17 22:31:42.0 +0200 @@ -67,7 +67,7 @@ int drm_sg_alloc(struct drm_device *dev, struct drm_sg_mem *entry; unsigned long pages, i, j; - DRM_DEBUG(%s\n, __FUNCTION__); + DRM_DEBUG(\n); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; @@ -81,7 +81,7 @@ int drm_sg_alloc(struct drm_device *dev, memset(entry, 0, sizeof(*entry)); pages = (request-size + PAGE_SIZE - 1) / PAGE_SIZE; - DRM_DEBUG(sg size=%ld pages=%ld\n, request-size, pages); + DRM_DEBUG(size=%ld pages=%ld\n, request-size, pages); entry-pages = pages; entry-pagelist = drm_alloc(pages * sizeof(*entry-pagelist), @@ -122,8 +122,8 @@ int drm_sg_alloc(struct drm_device *dev, entry-handle = ScatterHandle((unsigned long)entry-virtual); - DRM_DEBUG(sg alloc handle = %08lx\n, entry-handle); - DRM_DEBUG(sg alloc virtual = %p\n, entry-virtual); + DRM_DEBUG(handle = %08lx\n, entry-handle); + DRM_DEBUG(virtual = %p\n, entry-virtual); for (i = (unsigned long)entry-virtual, j = 0; j pages; i += PAGE_SIZE, j++) { @@ -210,7 +210,7 @@ int drm_sg_free(struct drm_device *dev, if (!entry || entry-handle != request-handle) return -EINVAL; - DRM_DEBUG(sg free virtual = %p\n, entry-virtual); + DRM_DEBUG(virtual = %p\n, entry-virtual); drm_sg_cleanup(entry); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c linux-2.6.23-mm1/drivers/char/drm/drm_vm.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c 2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_vm.c 2007-10-17 22:22:19.0 +0200 @@ -180,7 +180,7 @@ static __inline__ struct page *drm_do_vm return NOPAGE_SIGBUS; get_page(page); - DRM_DEBUG(shm_nopage 0x%lx\n, address); + DRM_DEBUG(0x%lx\n, address); return page; } @@ -294,7 +294,7 @@ static __inline__ struct page *drm_do_vm get_page(page); - DRM_DEBUG(dma_nopage 0x%lx (page %lu)\n, address, page_nr); + DRM_DEBUG(0x%lx (page %lu)\n, address, page_nr); return page; } diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/i810_dma.c linux-2.6.23-mm1/drivers/char/drm/i810_dma.c --- linux-2.6.23-mm1.orig/drivers/char/drm/i810_dma.c 2007-10-17 22:19:21.0 +0200 +++
Re: [PATCH]: drm: cleanup DRM_DEBUG() parameters
From: Márton Németh [EMAIL PROTECTED] As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending \n was added. Signed-off-by: Márton Németh [EMAIL PROTECTED] --- diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c --- linux-2.6.23-mm1.orig/drivers/char/drm/ati_pcigart.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/ati_pcigart.c 2007-10-17 22:22:19.0 +0200 @@ -41,7 +41,7 @@ static void *drm_ati_alloc_pcigart_table struct page *page; int i; - DRM_DEBUG(%s: alloc %d order\n, __FUNCTION__, order); + DRM_DEBUG(%d order\n, order); address = __get_free_pages(GFP_KERNEL | __GFP_COMP, order); @@ -54,7 +54,7 @@ static void *drm_ati_alloc_pcigart_table for (i = 0; i order; i++, page++) SetPageReserved(page); - DRM_DEBUG(%s: returning 0x%08lx\n, __FUNCTION__, address); + DRM_DEBUG(returning 0x%08lx\n, address); return (void *)address; } @@ -63,7 +63,7 @@ static void drm_ati_free_pcigart_table(v struct page *page; int i; int num_pages = 1 order; - DRM_DEBUG(%s\n, __FUNCTION__); + DRM_DEBUG(\n); page = virt_to_page((unsigned long)address); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c linux-2.6.23-mm1/drivers/char/drm/drm_irq.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_irq.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_irq.c 2007-10-17 22:22:19.0 +0200 @@ -107,7 +107,7 @@ static int drm_irq_install(struct drm_de dev-irq_enabled = 1; mutex_unlock(dev-struct_mutex); - DRM_DEBUG(%s: irq=%d\n, __FUNCTION__, dev-irq); + DRM_DEBUG(irq=%d\n, dev-irq); if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { init_waitqueue_head(dev-vbl_queue); @@ -164,7 +164,7 @@ int drm_irq_uninstall(struct drm_device if (!irq_enabled) return -EINVAL; - DRM_DEBUG(%s: irq=%d\n, __FUNCTION__, dev-irq); + DRM_DEBUG(irq=%d\n, dev-irq); dev-driver-irq_uninstall(dev); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_scatter.c2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_scatter.c 2007-10-17 22:31:42.0 +0200 @@ -67,7 +67,7 @@ int drm_sg_alloc(struct drm_device *dev, struct drm_sg_mem *entry; unsigned long pages, i, j; - DRM_DEBUG(%s\n, __FUNCTION__); + DRM_DEBUG(\n); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; @@ -81,7 +81,7 @@ int drm_sg_alloc(struct drm_device *dev, memset(entry, 0, sizeof(*entry)); pages = (request-size + PAGE_SIZE - 1) / PAGE_SIZE; - DRM_DEBUG(sg size=%ld pages=%ld\n, request-size, pages); + DRM_DEBUG(size=%ld pages=%ld\n, request-size, pages); entry-pages = pages; entry-pagelist = drm_alloc(pages * sizeof(*entry-pagelist), @@ -122,8 +122,8 @@ int drm_sg_alloc(struct drm_device *dev, entry-handle = ScatterHandle((unsigned long)entry-virtual); - DRM_DEBUG(sg alloc handle = %08lx\n, entry-handle); - DRM_DEBUG(sg alloc virtual = %p\n, entry-virtual); + DRM_DEBUG(handle = %08lx\n, entry-handle); + DRM_DEBUG(virtual = %p\n, entry-virtual); for (i = (unsigned long)entry-virtual, j = 0; j pages; i += PAGE_SIZE, j++) { @@ -210,7 +210,7 @@ int drm_sg_free(struct drm_device *dev, if (!entry || entry-handle != request-handle) return -EINVAL; - DRM_DEBUG(sg free virtual = %p\n, entry-virtual); + DRM_DEBUG(virtual = %p\n, entry-virtual); drm_sg_cleanup(entry); diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c linux-2.6.23-mm1/drivers/char/drm/drm_vm.c --- linux-2.6.23-mm1.orig/drivers/char/drm/drm_vm.c 2007-10-17 22:19:21.0 +0200 +++ linux-2.6.23-mm1/drivers/char/drm/drm_vm.c 2007-10-17 22:22:19.0 +0200 @@ -180,7 +180,7 @@ static __inline__ struct page *drm_do_vm return NOPAGE_SIGBUS; get_page(page); - DRM_DEBUG(shm_nopage 0x%lx\n, address); + DRM_DEBUG(0x%lx\n, address); return page; } @@ -294,7 +294,7 @@ static __inline__ struct page *drm_do_vm get_page(page); - DRM_DEBUG(dma_nopage 0x%lx (page %lu)\n, address, page_nr); + DRM_DEBUG(0x%lx (page %lu)\n, address, page_nr); return page; } diff -uprN linux-2.6.23-mm1.orig/drivers/char/drm/i810_dma.c linux-2.6.23-mm1/drivers/char/drm/i810_dma.c --- linux-2.6.23-mm1.orig/drivers/char/drm/i810_dma.c 2007-10-17 22:19:21.0 +0200 +++
Re: [PATCH]: drm: cleanup DRM_DEBUG() parameters
On 10/14/07, Németh Márton <[EMAIL PROTECTED]> wrote: > From: Márton Németh <[EMAIL PROTECTED]> > > As DRM_DEBUG macro already prints out the __FUNCTION__ string (see > drivers/char/drm/drmP.h), it is not worth doing this again. At some > other places the ending "\n" was added. > > Signed-off-by: Márton Németh <[EMAIL PROTECTED]> Hi Márton, Could you rebase the patch against the drm-mm tree or against -mm kernel? as it conflicts with the stuff I'm about to push to Linus.. Dave. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH]: drm: cleanup DRM_DEBUG() parameters
From: Márton Németh <[EMAIL PROTECTED]> As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending "\n" was added. Signed-off-by: Márton Németh <[EMAIL PROTECTED]> --- diff -uprN linux-2.6.23.orig/drivers/char/drm/ati_pcigart.c linux-2.6.23/drivers/char/drm/ati_pcigart.c --- linux-2.6.23.orig/drivers/char/drm/ati_pcigart.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/ati_pcigart.c 2007-10-13 17:54:48.0 +0200 @@ -41,7 +41,7 @@ static void *drm_ati_alloc_pcigart_table struct page *page; int i; - DRM_DEBUG("%s: alloc %d order\n", __FUNCTION__, order); + DRM_DEBUG("%d order\n", order); address = __get_free_pages(GFP_KERNEL | __GFP_COMP, order); @@ -54,7 +54,7 @@ static void *drm_ati_alloc_pcigart_table for (i = 0; i < order; i++, page++) SetPageReserved(page); - DRM_DEBUG("%s: returning 0x%08lx\n", __FUNCTION__, address); + DRM_DEBUG("returning 0x%08lx\n", address); return (void *)address; } @@ -63,7 +63,7 @@ static void drm_ati_free_pcigart_table(v struct page *page; int i; int num_pages = 1 << order; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); page = virt_to_page((unsigned long)address); diff -uprN linux-2.6.23.orig/drivers/char/drm/drm_irq.c linux-2.6.23/drivers/char/drm/drm_irq.c --- linux-2.6.23.orig/drivers/char/drm/drm_irq.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/drm_irq.c 2007-10-13 17:26:42.0 +0200 @@ -113,7 +113,7 @@ static int drm_irq_install(struct drm_de dev->irq_enabled = 1; mutex_unlock(>struct_mutex); - DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); + DRM_DEBUG("irq=%d\n", dev->irq); if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { init_waitqueue_head(>vbl_queue); @@ -170,7 +170,7 @@ int drm_irq_uninstall(struct drm_device if (!irq_enabled) return -EINVAL; - DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); + DRM_DEBUG("irq=%d\n", dev->irq); dev->driver->irq_uninstall(dev); diff -uprN linux-2.6.23.orig/drivers/char/drm/drm_scatter.c linux-2.6.23/drivers/char/drm/drm_scatter.c --- linux-2.6.23.orig/drivers/char/drm/drm_scatter.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/drm_scatter.c 2007-10-13 17:49:52.0 +0200 @@ -72,7 +72,7 @@ int drm_sg_alloc(struct inode *inode, st struct drm_sg_mem *entry; unsigned long pages, i, j; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; @@ -90,7 +90,7 @@ int drm_sg_alloc(struct inode *inode, st memset(entry, 0, sizeof(*entry)); pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE; - DRM_DEBUG("sg size=%ld pages=%ld\n", request.size, pages); + DRM_DEBUG("size=%ld pages=%ld\n", request.size, pages); entry->pages = pages; entry->pagelist = drm_alloc(pages * sizeof(*entry->pagelist), @@ -131,8 +131,8 @@ int drm_sg_alloc(struct inode *inode, st entry->handle = ScatterHandle((unsigned long)entry->virtual); - DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); - DRM_DEBUG("sg alloc virtual = %p\n", entry->virtual); + DRM_DEBUG("handle = %08lx\n", entry->handle); + DRM_DEBUG("virtual = %p\n", entry->virtual); for (i = (unsigned long)entry->virtual, j = 0; j < pages; i += PAGE_SIZE, j++) { @@ -220,7 +220,7 @@ int drm_sg_free(struct inode *inode, str if (!entry || entry->handle != request.handle) return -EINVAL; - DRM_DEBUG("sg free virtual = %p\n", entry->virtual); + DRM_DEBUG("virtual = %p\n", entry->virtual); drm_sg_cleanup(entry); diff -uprN linux-2.6.23.orig/drivers/char/drm/drm_vm.c linux-2.6.23/drivers/char/drm/drm_vm.c --- linux-2.6.23.orig/drivers/char/drm/drm_vm.c 2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/drm_vm.c 2007-10-13 17:48:30.0 +0200 @@ -180,7 +180,7 @@ static __inline__ struct page *drm_do_vm return NOPAGE_SIGBUS; get_page(page); - DRM_DEBUG("shm_nopage 0x%lx\n", address); + DRM_DEBUG("0x%lx\n", address); return page; } @@ -294,7 +294,7 @@ static __inline__ struct page *drm_do_vm get_page(page); - DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr); + DRM_DEBUG("0x%lx (page %lu)\n", address, page_nr); return page; } diff -uprN linux-2.6.23.orig/drivers/char/drm/i810_dma.c linux-2.6.23/drivers/char/drm/i810_dma.c --- linux-2.6.23.orig/drivers/char/drm/i810_dma.c 2007-10-09 22:31:38.0 +0200 +++
[PATCH]: drm: cleanup DRM_DEBUG() parameters
From: Márton Németh [EMAIL PROTECTED] As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending \n was added. Signed-off-by: Márton Németh [EMAIL PROTECTED] --- diff -uprN linux-2.6.23.orig/drivers/char/drm/ati_pcigart.c linux-2.6.23/drivers/char/drm/ati_pcigart.c --- linux-2.6.23.orig/drivers/char/drm/ati_pcigart.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/ati_pcigart.c 2007-10-13 17:54:48.0 +0200 @@ -41,7 +41,7 @@ static void *drm_ati_alloc_pcigart_table struct page *page; int i; - DRM_DEBUG(%s: alloc %d order\n, __FUNCTION__, order); + DRM_DEBUG(%d order\n, order); address = __get_free_pages(GFP_KERNEL | __GFP_COMP, order); @@ -54,7 +54,7 @@ static void *drm_ati_alloc_pcigart_table for (i = 0; i order; i++, page++) SetPageReserved(page); - DRM_DEBUG(%s: returning 0x%08lx\n, __FUNCTION__, address); + DRM_DEBUG(returning 0x%08lx\n, address); return (void *)address; } @@ -63,7 +63,7 @@ static void drm_ati_free_pcigart_table(v struct page *page; int i; int num_pages = 1 order; - DRM_DEBUG(%s\n, __FUNCTION__); + DRM_DEBUG(\n); page = virt_to_page((unsigned long)address); diff -uprN linux-2.6.23.orig/drivers/char/drm/drm_irq.c linux-2.6.23/drivers/char/drm/drm_irq.c --- linux-2.6.23.orig/drivers/char/drm/drm_irq.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/drm_irq.c 2007-10-13 17:26:42.0 +0200 @@ -113,7 +113,7 @@ static int drm_irq_install(struct drm_de dev-irq_enabled = 1; mutex_unlock(dev-struct_mutex); - DRM_DEBUG(%s: irq=%d\n, __FUNCTION__, dev-irq); + DRM_DEBUG(irq=%d\n, dev-irq); if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { init_waitqueue_head(dev-vbl_queue); @@ -170,7 +170,7 @@ int drm_irq_uninstall(struct drm_device if (!irq_enabled) return -EINVAL; - DRM_DEBUG(%s: irq=%d\n, __FUNCTION__, dev-irq); + DRM_DEBUG(irq=%d\n, dev-irq); dev-driver-irq_uninstall(dev); diff -uprN linux-2.6.23.orig/drivers/char/drm/drm_scatter.c linux-2.6.23/drivers/char/drm/drm_scatter.c --- linux-2.6.23.orig/drivers/char/drm/drm_scatter.c2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/drm_scatter.c 2007-10-13 17:49:52.0 +0200 @@ -72,7 +72,7 @@ int drm_sg_alloc(struct inode *inode, st struct drm_sg_mem *entry; unsigned long pages, i, j; - DRM_DEBUG(%s\n, __FUNCTION__); + DRM_DEBUG(\n); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; @@ -90,7 +90,7 @@ int drm_sg_alloc(struct inode *inode, st memset(entry, 0, sizeof(*entry)); pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE; - DRM_DEBUG(sg size=%ld pages=%ld\n, request.size, pages); + DRM_DEBUG(size=%ld pages=%ld\n, request.size, pages); entry-pages = pages; entry-pagelist = drm_alloc(pages * sizeof(*entry-pagelist), @@ -131,8 +131,8 @@ int drm_sg_alloc(struct inode *inode, st entry-handle = ScatterHandle((unsigned long)entry-virtual); - DRM_DEBUG(sg alloc handle = %08lx\n, entry-handle); - DRM_DEBUG(sg alloc virtual = %p\n, entry-virtual); + DRM_DEBUG(handle = %08lx\n, entry-handle); + DRM_DEBUG(virtual = %p\n, entry-virtual); for (i = (unsigned long)entry-virtual, j = 0; j pages; i += PAGE_SIZE, j++) { @@ -220,7 +220,7 @@ int drm_sg_free(struct inode *inode, str if (!entry || entry-handle != request.handle) return -EINVAL; - DRM_DEBUG(sg free virtual = %p\n, entry-virtual); + DRM_DEBUG(virtual = %p\n, entry-virtual); drm_sg_cleanup(entry); diff -uprN linux-2.6.23.orig/drivers/char/drm/drm_vm.c linux-2.6.23/drivers/char/drm/drm_vm.c --- linux-2.6.23.orig/drivers/char/drm/drm_vm.c 2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/drm_vm.c 2007-10-13 17:48:30.0 +0200 @@ -180,7 +180,7 @@ static __inline__ struct page *drm_do_vm return NOPAGE_SIGBUS; get_page(page); - DRM_DEBUG(shm_nopage 0x%lx\n, address); + DRM_DEBUG(0x%lx\n, address); return page; } @@ -294,7 +294,7 @@ static __inline__ struct page *drm_do_vm get_page(page); - DRM_DEBUG(dma_nopage 0x%lx (page %lu)\n, address, page_nr); + DRM_DEBUG(0x%lx (page %lu)\n, address, page_nr); return page; } diff -uprN linux-2.6.23.orig/drivers/char/drm/i810_dma.c linux-2.6.23/drivers/char/drm/i810_dma.c --- linux-2.6.23.orig/drivers/char/drm/i810_dma.c 2007-10-09 22:31:38.0 +0200 +++ linux-2.6.23/drivers/char/drm/i810_dma.c2007-10-13 17:46:05.0 +0200 @@ -641,7 +641,7 @@ static
Re: [PATCH]: drm: cleanup DRM_DEBUG() parameters
On 10/14/07, Németh Márton [EMAIL PROTECTED] wrote: From: Márton Németh [EMAIL PROTECTED] As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending \n was added. Signed-off-by: Márton Németh [EMAIL PROTECTED] Hi Márton, Could you rebase the patch against the drm-mm tree or against -mm kernel? as it conflicts with the stuff I'm about to push to Linus.. Dave. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/