diff mbox

drm/i915: Fix a typo in vgt_balloon_space()

Message ID 1484661972-9366-1-git-send-email-zhi.a.wang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang, Zhi A Jan. 17, 2017, 2:06 p.m. UTC
From: Zhenyu Wang <zhenyuw@linux.intel.com>

Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a
helper") introduces this typo which can cause a driver loading failure
in Linux GVT-g guest.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
---
 drivers/gpu/drm/i915/i915_vgpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula Jan. 17, 2017, 2:27 p.m. UTC | #1
On Tue, 17 Jan 2017, Zhi Wang <zhi.a.wang@intel.com> wrote:
> From: Zhenyu Wang <zhenyuw@linux.intel.com>
>
> Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a
> helper") introduces this typo which can cause a driver loading failure
> in Linux GVT-g guest.

The proper format for fixes is:

Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper")

> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_vgpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> index f1ad4fb..d0abfd0 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.c
> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> @@ -122,7 +122,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
>  {
>  	unsigned long size = end - start;
>  
> -	if (start <= end)
> +	if (start >= end)
>  		return -EINVAL;
>  
>  	DRM_INFO("balloon space: range [ 0x%lx - 0x%lx ] %lu KiB.\n",
Chris Wilson Jan. 17, 2017, 2:37 p.m. UTC | #2
On Tue, Jan 17, 2017 at 10:06:11PM +0800, Zhi Wang wrote:
> From: Zhenyu Wang <zhenyuw@linux.intel.com>
> 
> Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a
> helper") introduces this typo which can cause a driver loading failure
> in Linux GVT-g guest.
> 
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_vgpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> index f1ad4fb..d0abfd0 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.c
> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> @@ -122,7 +122,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
>  {
>  	unsigned long size = end - start;
>  
> -	if (start <= end)
> +	if (start >= end)
>  		return -EINVAL;

Oops. Sorry,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Chris Wilson Jan. 17, 2017, 3:11 p.m. UTC | #3
On Tue, Jan 17, 2017 at 04:27:04PM +0200, Jani Nikula wrote:
> On Tue, 17 Jan 2017, Zhi Wang <zhi.a.wang@intel.com> wrote:
> > From: Zhenyu Wang <zhenyuw@linux.intel.com>
> >
> > Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a
> > helper") introduces this typo which can cause a driver loading failure
> > in Linux GVT-g guest.
> 
> The proper format for fixes is:
> 
> Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper")

Pushed the fix for my obvious oops.

Need to spend some more time looking at the pdp fix - it certainly
differs from the patches I have to fixup the same paths.
-Chris
Wang, Zhi A Jan. 18, 2017, 5:42 a.m. UTC | #4
Thanks, Will update it in V2 :P

于 01/17/17 22:27, Jani Nikula:
> On Tue, 17 Jan 2017, Zhi Wang <zhi.a.wang@intel.com> wrote:
>> From: Zhenyu Wang <zhenyuw@linux.intel.com>
>>
>> Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a
>> helper") introduces this typo which can cause a driver loading failure
>> in Linux GVT-g guest.
>
> The proper format for fixes is:
>
> Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper")
>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
>> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
>> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_vgpu.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
>> index f1ad4fb..d0abfd0 100644
>> --- a/drivers/gpu/drm/i915/i915_vgpu.c
>> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
>> @@ -122,7 +122,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
>>   {
>>   	unsigned long size = end - start;
>>
>> -	if (start <= end)
>> +	if (start >= end)
>>   		return -EINVAL;
>>
>>   	DRM_INFO("balloon space: range [ 0x%lx - 0x%lx ] %lu KiB.\n",
>
Wang, Zhi A Jan. 18, 2017, 5:43 a.m. UTC | #5
It doesn't matter now:P

于 01/17/17 22:37, Chris Wilson:
> On Tue, Jan 17, 2017 at 10:06:11PM +0800, Zhi Wang wrote:
>> From: Zhenyu Wang <zhenyuw@linux.intel.com>
>>
>> Commit 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a
>> helper") introduces this typo which can cause a driver loading failure
>> in Linux GVT-g guest.
>>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
>> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
>> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_vgpu.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
>> index f1ad4fb..d0abfd0 100644
>> --- a/drivers/gpu/drm/i915/i915_vgpu.c
>> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
>> @@ -122,7 +122,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
>>   {
>>   	unsigned long size = end - start;
>>
>> -	if (start <= end)
>> +	if (start >= end)
>>   		return -EINVAL;
>
> Oops. Sorry,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index f1ad4fb..d0abfd0 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -122,7 +122,7 @@  static int vgt_balloon_space(struct i915_ggtt *ggtt,
 {
 	unsigned long size = end - start;
 
-	if (start <= end)
+	if (start >= end)
 		return -EINVAL;
 
 	DRM_INFO("balloon space: range [ 0x%lx - 0x%lx ] %lu KiB.\n",