staging: sm750fb: wrong type for print
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 10 Mar 2015 08:45:35 +0000 (14:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2015 12:56:23 +0000 (13:56 +0100)
mention correct format specifier while printing.
fixes all the build warnings about incorrect argument type while
printing.
since this is a framebuffer device and it should follow what the
framebuffer layer is suggesting in struct fb_fix_screeninfo at
smem_start and mmio_start, so accordingly changed the datatypes of
vidmem_start, vidreg_start, vidmem_size and vidreg_size.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c
drivers/staging/sm750fb/sm750.h
drivers/staging/sm750fb/sm750_hw.c

index 520c69e3ab74fc736e8fef7cab95132e03fd9172..753869e3686da560df99a9be8be75902082928e5 100644 (file)
@@ -530,20 +530,20 @@ static int lynxfb_ops_mmap(struct fb_info * info, struct vm_area_struct * vma)
        if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
                return -EINVAL;
        off = vma->vm_pgoff << PAGE_SHIFT;
-       printk("lynxfb mmap pgoff: %x\n", vma->vm_pgoff);
-       printk("lynxfb mmap off 1: %x\n", off);
+       printk("lynxfb mmap pgoff: %lx\n", vma->vm_pgoff);
+       printk("lynxfb mmap off 1: %lx\n", off);
        
        /* frame buffer memory */
        start = info->fix.smem_start;
        len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len);
        
-       printk("lynxfb mmap start 1: %x\n", start);
+       printk("lynxfb mmap start 1: %lx\n", start);
        printk("lynxfb mmap len 1: %x\n", len);
        
        if (off >= len) {
                /* memory mapped io */
                off -= len;
-               printk("lynxfb mmap off 2: %x\n", off);
+               printk("lynxfb mmap off 2: %lx\n", off);
                if (info->var.accel_flags) {
                        printk("lynxfb mmap accel flags true");
                        return -EINVAL;
@@ -551,28 +551,28 @@ static int lynxfb_ops_mmap(struct fb_info * info, struct vm_area_struct * vma)
                start = info->fix.mmio_start;
                len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.mmio_len);
                
-               printk("lynxfb mmap start 2: %x\n", start);
+               printk("lynxfb mmap start 2: %lx\n", start);
                printk("lynxfb mmap len 2: %x\n", len);
        }
        start &= PAGE_MASK;
-       printk("lynxfb mmap start 3: %x\n", start);
-       printk("lynxfb mmap vm start: %x\n", vma->vm_start);
-       printk("lynxfb mmap vm end: %x\n", vma->vm_end);
+       printk("lynxfb mmap start 3: %lx\n", start);
+       printk("lynxfb mmap vm start: %lx\n", vma->vm_start);
+       printk("lynxfb mmap vm end: %lx\n", vma->vm_end);
        printk("lynxfb mmap len: %x\n", len);
-       printk("lynxfb mmap off: %x\n", off);
+       printk("lynxfb mmap off: %lx\n", off);
        if ((vma->vm_end - vma->vm_start + off) > len)
        {
                return -EINVAL;
        }
        off += start;
-       printk("lynxfb mmap off 3: %x\n", off);
+       printk("lynxfb mmap off 3: %lx\n", off);
        vma->vm_pgoff = off >> PAGE_SHIFT;
        /* This is an IO map - tell maydump to skip this VMA */
        vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
        vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
        fb_pgprotect(file, vma, off);
-       printk("lynxfb mmap off 4: %x\n", off);
-       printk("lynxfb mmap pgprot: %x\n", vma->vm_page_prot);
+       printk("lynxfb mmap off 4: %lx\n", off);
+       printk("lynxfb mmap pgprot: %lx\n", (unsigned long) pgprot_val(vma->vm_page_prot));
        if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
                             vma->vm_end - vma->vm_start, vma->vm_page_prot))
                return -EAGAIN;
index 711676c58839c7982a90700477163b5c67299c2e..d39968c2d5c1d120a33525d469a5f58179f08f4b 100644 (file)
@@ -59,10 +59,10 @@ struct lynx_share{
                }mtrr;
 #endif
        /* all smi graphic adaptor got below attributes */
-       resource_size_t vidmem_start;
-       resource_size_t vidreg_start;
-       resource_size_t vidmem_size;
-       resource_size_t vidreg_size;
+       unsigned long vidmem_start;
+       unsigned long vidreg_start;
+       __u32 vidmem_size;
+       __u32 vidreg_size;
        volatile unsigned char __iomem * pvReg;
        unsigned char __iomem * pvMem;
        /* locks*/
index cd971bd41637909b4f4e91cf72778855c0aa6f39..ec2d4995907280ac102e3a7104de2e974a7ac039 100644 (file)
@@ -36,7 +36,7 @@ int hw_sm750_map(struct lynx_share* share,struct pci_dev* pdev)
        share->vidreg_start  = pci_resource_start(pdev,1);
        share->vidreg_size = MB(2);
 
-       pr_info("mmio phyAddr = %x\n",share->vidreg_start);
+       pr_info("mmio phyAddr = %lx\n", share->vidreg_start);
 
        /* reserve the vidreg space of smi adaptor
         * if you do this, u need to add release region code
@@ -73,7 +73,7 @@ int hw_sm750_map(struct lynx_share* share,struct pci_dev* pdev)
         * @hw_sm750_getVMSize function can be safe.
         * */
        share->vidmem_size = hw_sm750_getVMSize(share);
-       pr_info("video memory phyAddr = %x, size = %d bytes\n",
+       pr_info("video memory phyAddr = %lx, size = %u bytes\n",
        share->vidmem_start,share->vidmem_size);
 
        /* reserve the vidmem space of smi adaptor */