[Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree

2020-03-23 Thread Daniel Vetter
With this we can drop the final kfree from the release function.

Acked-by: Sam Ravnborg 
Reviewed-by: Noralf Trønnes 
Signed-off-by: Daniel Vetter 
Cc: "Noralf Trønnes" 
---
 drivers/gpu/drm/tiny/repaper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index f5ebcaf7ee3a..df5654ef53ee 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -910,13 +911,10 @@ static const struct drm_mode_config_funcs 
repaper_mode_config_funcs = {
 
 static void repaper_release(struct drm_device *drm)
 {
-   struct repaper_epd *epd = drm_to_epd(drm);
-
DRM_DEBUG_DRIVER("\n");
 
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
-   kfree(epd);
 }
 
 static const uint32_t repaper_formats[] = {
@@ -1024,6 +1022,7 @@ static int repaper_probe(struct spi_device *spi)
kfree(epd);
return ret;
}
+   drmm_add_final_kfree(drm, epd);
 
drm_mode_config_init(drm);
drm->mode_config.funcs = _mode_config_funcs;
-- 
2.25.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree

2020-03-06 Thread Sam Ravnborg
On Mon, Mar 02, 2020 at 11:25:55PM +0100, Daniel Vetter wrote:
> With this we can drop the final kfree from the release function.
> 
> Reviewed-by: Noralf Trønnes 
> Signed-off-by: Daniel Vetter 
> Cc: "Noralf Trønnes" 

Acked-by: Sam Ravnborg 

> ---
>  drivers/gpu/drm/tiny/repaper.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
> index f5ebcaf7ee3a..df5654ef53ee 100644
> --- a/drivers/gpu/drm/tiny/repaper.c
> +++ b/drivers/gpu/drm/tiny/repaper.c
> @@ -31,6 +31,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -910,13 +911,10 @@ static const struct drm_mode_config_funcs 
> repaper_mode_config_funcs = {
>  
>  static void repaper_release(struct drm_device *drm)
>  {
> - struct repaper_epd *epd = drm_to_epd(drm);
> -
>   DRM_DEBUG_DRIVER("\n");
>  
>   drm_mode_config_cleanup(drm);
>   drm_dev_fini(drm);
> - kfree(epd);
>  }
>  
>  static const uint32_t repaper_formats[] = {
> @@ -1024,6 +1022,7 @@ static int repaper_probe(struct spi_device *spi)
>   kfree(epd);
>   return ret;
>   }
> + drmm_add_final_kfree(drm, epd);
>  
>   drm_mode_config_init(drm);
>   drm->mode_config.funcs = _mode_config_funcs;
> -- 
> 2.24.1
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function.

Reviewed-by: Noralf Trønnes 
Signed-off-by: Daniel Vetter 
Cc: "Noralf Trønnes" 
---
 drivers/gpu/drm/tiny/repaper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index f5ebcaf7ee3a..df5654ef53ee 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -910,13 +911,10 @@ static const struct drm_mode_config_funcs 
repaper_mode_config_funcs = {
 
 static void repaper_release(struct drm_device *drm)
 {
-   struct repaper_epd *epd = drm_to_epd(drm);
-
DRM_DEBUG_DRIVER("\n");
 
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
-   kfree(epd);
 }
 
 static const uint32_t repaper_formats[] = {
@@ -1024,6 +1022,7 @@ static int repaper_probe(struct spi_device *spi)
kfree(epd);
return ret;
}
+   drmm_add_final_kfree(drm, epd);
 
drm_mode_config_init(drm);
drm->mode_config.funcs = _mode_config_funcs;
-- 
2.24.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree

2020-02-27 Thread Daniel Vetter
With this we can drop the final kfree from the release function.

Reviewed-by: Noralf Trønnes 
Signed-off-by: Daniel Vetter 
Cc: "Noralf Trønnes" 
---
 drivers/gpu/drm/tiny/repaper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index f5ebcaf7ee3a..df5654ef53ee 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -910,13 +911,10 @@ static const struct drm_mode_config_funcs 
repaper_mode_config_funcs = {
 
 static void repaper_release(struct drm_device *drm)
 {
-   struct repaper_epd *epd = drm_to_epd(drm);
-
DRM_DEBUG_DRIVER("\n");
 
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
-   kfree(epd);
 }
 
 static const uint32_t repaper_formats[] = {
@@ -1024,6 +1022,7 @@ static int repaper_probe(struct spi_device *spi)
kfree(epd);
return ret;
}
+   drmm_add_final_kfree(drm, epd);
 
drm_mode_config_init(drm);
drm->mode_config.funcs = _mode_config_funcs;
-- 
2.24.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function.

Reviewed-by: Noralf Trønnes 
Signed-off-by: Daniel Vetter 
Cc: "Noralf Trønnes" 
---
 drivers/gpu/drm/tiny/repaper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index f5ebcaf7ee3a..df5654ef53ee 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -910,13 +911,10 @@ static const struct drm_mode_config_funcs 
repaper_mode_config_funcs = {
 
 static void repaper_release(struct drm_device *drm)
 {
-   struct repaper_epd *epd = drm_to_epd(drm);
-
DRM_DEBUG_DRIVER("\n");
 
drm_mode_config_cleanup(drm);
drm_dev_fini(drm);
-   kfree(epd);
 }
 
 static const uint32_t repaper_formats[] = {
@@ -1024,6 +1022,7 @@ static int repaper_probe(struct spi_device *spi)
kfree(epd);
return ret;
}
+   drmm_add_final_kfree(drm, epd);
 
drm_mode_config_init(drm);
drm->mode_config.funcs = _mode_config_funcs;
-- 
2.24.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx