Re: [PATCH v2] bcm27xx: remove no-op patch pair
Hi Adrian, Nice catch :D. I didn’t see this pair when I removed the applied and reverted patches. P.D: I didn’t see the v2 >.< Acked-by: Álvaro Fernández Rojas > El 19 ago 2020, a las 13:49, Adrian Schmutzler > escribió: > > Patch 1 introduces a change, and patch 2 reverts it again. Remove > both patches and achieve the same outcome. > > Refreshed patches for the target as well. > > Cc: Álvaro Fernández Rojas > Signed-off-by: Adrian Schmutzler > --- > ...m-Fix-platform-device-unregistration.patch | 27 - > ...m-Register-vcsm-cma-as-a-platform-dr.patch | 6 ++-- > ...m-Register-bcm2835-codec-as-a-platfo.patch | 6 ++-- > ...m-Unify-the-unload-handling-of-platf.patch | 29 --- > 4 files changed, 6 insertions(+), 62 deletions(-) > delete mode 100644 > target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch > delete mode 100644 > target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch > > diff --git > a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch > > b/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch > deleted file mode 100644 > index a5300ca309..00 > --- > a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch > +++ /dev/null > @@ -1,27 +0,0 @@ > -From 7ba7db27d18d141973ad7eaf1f339218d81a31a4 Mon Sep 17 00:00:00 2001 > -From: Stefan Wahren > -Date: Sat, 13 Oct 2018 20:51:23 +0200 > -Subject: [PATCH] staging: vchiq_arm: Fix platform device > - unregistration > - > -In error case platform_device_register_data would return an ERR_PTR > -instead of NULL. So we better check this before unregistration. > - > -Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for > the camera driver.") > -Signed-off-by: Stefan Wahren > > - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++- > - 1 file changed, 2 insertions(+), 1 deletion(-) > - > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > -@@ -3258,7 +3258,8 @@ failed_platform_init: > - > - static int vchiq_remove(struct platform_device *pdev) > - { > --platform_device_unregister(bcm2835_camera); > -+if (!IS_ERR(bcm2835_camera)) > -+platform_device_unregister(bcm2835_camera); > - vchiq_debugfs_deinit(); > - device_destroy(vchiq_class, vchiq_devid); > - cdev_del(&vchiq_cdev); > diff --git > a/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch > > b/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch > index 28641fd327..7521434038 100644 > --- > a/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch > +++ > b/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch > @@ -30,10 +30,10 @@ Signed-off-by: Dave Stevenson > > bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); > bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); > > -@@ -3266,6 +3268,7 @@ static int vchiq_remove(struct platform_ > +@@ -3265,6 +3267,7 @@ failed_platform_init: > + static int vchiq_remove(struct platform_device *pdev) > { > - if (!IS_ERR(bcm2835_camera)) > - platform_device_unregister(bcm2835_camera); > + platform_device_unregister(bcm2835_camera); > + platform_device_unregister(vcsm_cma); > vchiq_debugfs_deinit(); > device_destroy(vchiq_class, vchiq_devid); > diff --git > a/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch > > b/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch > index 016e6c0aa5..499efe2b65 100644 > --- > a/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch > +++ > b/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch > @@ -30,10 +30,10 @@ Signed-off-by: Dave Stevenson > > bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); > bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); > > -@@ -3268,6 +3270,7 @@ static int vchiq_remove(struct platform_ > +@@ -3267,6 +3269,7 @@ failed_platform_init: > + static int vchiq_remove(struct platform_device *pdev) > { > - if (!IS_ERR(bcm2835_camera)) > - platform_device_unregister(bcm2835_camera); > + platform_device_unregister(bcm2835_camera); > + platform_device_unregister(bcm2835_codec); > platform_device_unregister(vcsm_cma); > vchiq_debugfs_deinit(); > diff --git > a/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload
[PATCH v2] bcm27xx: remove no-op patch pair
Patch 1 introduces a change, and patch 2 reverts it again. Remove both patches and achieve the same outcome. Refreshed patches for the target as well. Cc: Álvaro Fernández Rojas Signed-off-by: Adrian Schmutzler --- ...m-Fix-platform-device-unregistration.patch | 27 - ...m-Register-vcsm-cma-as-a-platform-dr.patch | 6 ++-- ...m-Register-bcm2835-codec-as-a-platfo.patch | 6 ++-- ...m-Unify-the-unload-handling-of-platf.patch | 29 --- 4 files changed, 6 insertions(+), 62 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch delete mode 100644 target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch diff --git a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch b/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch deleted file mode 100644 index a5300ca309..00 --- a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 7ba7db27d18d141973ad7eaf1f339218d81a31a4 Mon Sep 17 00:00:00 2001 -From: Stefan Wahren -Date: Sat, 13 Oct 2018 20:51:23 +0200 -Subject: [PATCH] staging: vchiq_arm: Fix platform device - unregistration - -In error case platform_device_register_data would return an ERR_PTR -instead of NULL. So we better check this before unregistration. - -Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") -Signed-off-by: Stefan Wahren - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -@@ -3258,7 +3258,8 @@ failed_platform_init: - - static int vchiq_remove(struct platform_device *pdev) - { -- platform_device_unregister(bcm2835_camera); -+ if (!IS_ERR(bcm2835_camera)) -+ platform_device_unregister(bcm2835_camera); - vchiq_debugfs_deinit(); - device_destroy(vchiq_class, vchiq_devid); - cdev_del(&vchiq_cdev); diff --git a/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch b/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch index 28641fd327..7521434038 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch @@ -30,10 +30,10 @@ Signed-off-by: Dave Stevenson bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); -@@ -3266,6 +3268,7 @@ static int vchiq_remove(struct platform_ +@@ -3265,6 +3267,7 @@ failed_platform_init: + static int vchiq_remove(struct platform_device *pdev) { - if (!IS_ERR(bcm2835_camera)) - platform_device_unregister(bcm2835_camera); + platform_device_unregister(bcm2835_camera); + platform_device_unregister(vcsm_cma); vchiq_debugfs_deinit(); device_destroy(vchiq_class, vchiq_devid); diff --git a/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch b/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch index 016e6c0aa5..499efe2b65 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch @@ -30,10 +30,10 @@ Signed-off-by: Dave Stevenson bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); -@@ -3268,6 +3270,7 @@ static int vchiq_remove(struct platform_ +@@ -3267,6 +3269,7 @@ failed_platform_init: + static int vchiq_remove(struct platform_device *pdev) { - if (!IS_ERR(bcm2835_camera)) - platform_device_unregister(bcm2835_camera); + platform_device_unregister(bcm2835_camera); + platform_device_unregister(bcm2835_codec); platform_device_unregister(vcsm_cma); vchiq_debugfs_deinit(); diff --git a/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch b/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch deleted file mode 100644 index 9bcd967b8a..00 --- a/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 91da858c9327352c17a1f20ec10e78113ed45c82 Mon Sep 17 00:00