All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: simplify the return expression of i915_driver_open()
@ 2022-05-05  2:16 ` cgel.zte
  0 siblings, 0 replies; 5+ messages in thread
From: cgel.zte @ 2022-05-05  2:16 UTC (permalink / raw)
  To: jani.nikula
  Cc: tvrtko.ursulin, airlied, intel-gfx, linux-kernel, dri-devel,
	Minghao Chi, rodrigo.vivi, Zeal Robot

From: Minghao Chi <chi.minghao@zte.com.cn>

Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/gpu/drm/i915/i915_driver.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 09de45d3e274..d11a7445909a 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -977,13 +977,8 @@ static void i915_driver_release(struct drm_device *dev)
 static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
 {
 	struct drm_i915_private *i915 = to_i915(dev);
-	int ret;
 
-	ret = i915_gem_open(i915, file);
-	if (ret)
-		return ret;
-
-	return 0;
+	return i915_gem_open(i915, file);
 }
 
 /**
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] drm/i915: simplify the return expression of i915_driver_open()
@ 2022-05-05  2:16 ` cgel.zte
  0 siblings, 0 replies; 5+ messages in thread
From: cgel.zte @ 2022-05-05  2:16 UTC (permalink / raw)
  To: jani.nikula
  Cc: joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin, airlied, intel-gfx,
	dri-devel, linux-kernel, Minghao Chi, Zeal Robot

From: Minghao Chi <chi.minghao@zte.com.cn>

Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/gpu/drm/i915/i915_driver.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 09de45d3e274..d11a7445909a 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -977,13 +977,8 @@ static void i915_driver_release(struct drm_device *dev)
 static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
 {
 	struct drm_i915_private *i915 = to_i915(dev);
-	int ret;
 
-	ret = i915_gem_open(i915, file);
-	if (ret)
-		return ret;
-
-	return 0;
+	return i915_gem_open(i915, file);
 }
 
 /**
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: simplify the return expression of i915_driver_open()
  2022-05-05  2:16 ` cgel.zte
  (?)
@ 2022-05-05  9:32   ` Jani Nikula
  -1 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2022-05-05  9:32 UTC (permalink / raw)
  To: cgel.zte
  Cc: airlied, intel-gfx, linux-kernel, dri-devel, Minghao Chi,
	rodrigo.vivi, Zeal Robot

On Thu, 05 May 2022, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>

No, I don't want this. Please stop sending these return expression
"simplifications". The cocci script to do this was removed in commit
b784c7707502 ("coccinnelle: Remove ptr_ret script") specifically to stop
these changes. Please read the commit message for that.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/i915_driver.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 09de45d3e274..d11a7445909a 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -977,13 +977,8 @@ static void i915_driver_release(struct drm_device *dev)
>  static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
>  {
>  	struct drm_i915_private *i915 = to_i915(dev);
> -	int ret;
>  
> -	ret = i915_gem_open(i915, file);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return i915_gem_open(i915, file);
>  }
>  
>  /**

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: simplify the return expression of i915_driver_open()
@ 2022-05-05  9:32   ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2022-05-05  9:32 UTC (permalink / raw)
  To: cgel.zte
  Cc: tvrtko.ursulin, airlied, intel-gfx, linux-kernel, dri-devel,
	Minghao Chi, rodrigo.vivi, Zeal Robot

On Thu, 05 May 2022, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>

No, I don't want this. Please stop sending these return expression
"simplifications". The cocci script to do this was removed in commit
b784c7707502 ("coccinnelle: Remove ptr_ret script") specifically to stop
these changes. Please read the commit message for that.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/i915_driver.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 09de45d3e274..d11a7445909a 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -977,13 +977,8 @@ static void i915_driver_release(struct drm_device *dev)
>  static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
>  {
>  	struct drm_i915_private *i915 = to_i915(dev);
> -	int ret;
>  
> -	ret = i915_gem_open(i915, file);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return i915_gem_open(i915, file);
>  }
>  
>  /**

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: simplify the return expression of i915_driver_open()
@ 2022-05-05  9:32   ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2022-05-05  9:32 UTC (permalink / raw)
  To: cgel.zte
  Cc: joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin, airlied, intel-gfx,
	dri-devel, linux-kernel, Minghao Chi, Zeal Robot

On Thu, 05 May 2022, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>

No, I don't want this. Please stop sending these return expression
"simplifications". The cocci script to do this was removed in commit
b784c7707502 ("coccinnelle: Remove ptr_ret script") specifically to stop
these changes. Please read the commit message for that.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/i915_driver.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 09de45d3e274..d11a7445909a 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -977,13 +977,8 @@ static void i915_driver_release(struct drm_device *dev)
>  static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
>  {
>  	struct drm_i915_private *i915 = to_i915(dev);
> -	int ret;
>  
> -	ret = i915_gem_open(i915, file);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return i915_gem_open(i915, file);
>  }
>  
>  /**

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-05  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-05  2:16 [PATCH] drm/i915: simplify the return expression of i915_driver_open() cgel.zte
2022-05-05  2:16 ` cgel.zte
2022-05-05  9:32 ` [Intel-gfx] " Jani Nikula
2022-05-05  9:32   ` Jani Nikula
2022-05-05  9:32   ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.