diff mbox

[-next] drm/i915: fix a printk format

Message ID 20150226165354.GA6820@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Feb. 26, 2015, 4:53 p.m. UTC
This printk leads to the following Smatch warning:

	drivers/gpu/drm/i915/i915_gem_gtt.c:336 alloc_pt_range()
		error: '%pa' expects argument of type 'phys_addr_t*',
		argument 5 has type 'struct i915_page_table_entry*'

It looks like a simple typo to me where "%p" was intended instead of
"%pa".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Daniel Vetter Feb. 26, 2015, 7:21 p.m. UTC | #1
On Thu, Feb 26, 2015 at 07:53:54PM +0300, Dan Carpenter wrote:
> This printk leads to the following Smatch warning:
> 
> 	drivers/gpu/drm/i915/i915_gem_gtt.c:336 alloc_pt_range()
> 		error: '%pa' expects argument of type 'phys_addr_t*',
> 		argument 5 has type 'struct i915_page_table_entry*'
> 
> It looks like a simple typo to me where "%p" was intended instead of
> "%pa".
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Queued for -next, thanks for the patch.
-Daniel

> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index e05488e..48eff65 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -334,7 +334,7 @@ static int alloc_pt_range(struct i915_page_directory_entry *pd, uint16_t pde, si
>  			goto err_out;
>  		}
>  		WARN(pd->page_table[i],
> -		     "Leaking page directory entry %d (%pa)\n",
> +		     "Leaking page directory entry %d (%p)\n",
>  		     i, pd->page_table[i]);
>  		pd->page_table[i] = pt;
>  	}
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index e05488e..48eff65 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -334,7 +334,7 @@  static int alloc_pt_range(struct i915_page_directory_entry *pd, uint16_t pde, si
 			goto err_out;
 		}
 		WARN(pd->page_table[i],
-		     "Leaking page directory entry %d (%pa)\n",
+		     "Leaking page directory entry %d (%p)\n",
 		     i, pd->page_table[i]);
 		pd->page_table[i] = pt;
 	}