mbox series

[0/4] media: Drop empty platform remove functions

Message ID 20221213153553.648871-1-u.kleine-koenig@pengutronix.de (mailing list archive)
Headers show
Series media: Drop empty platform remove functions | expand

Message

Uwe Kleine-König Dec. 13, 2022, 3:35 p.m. UTC
Hello,

this series removes all platform remove functions that only return zero
below drivers/media. There is no reason to have these, as the only
caller is platform core code doing:

        if (drv->remove) {
                int ret = drv->remove(dev);

                if (ret)
                        dev_warn(...)
        }

(in platform_remove()) and so having no remove function is both
equivalent and simpler.

Uwe Kleine-König (4):
  media: ti/davinci: vpbe_osd: Drop empty platform remove function
  media: ti/davinci: vpbe_venc: Drop empty platform remove function
  media: rc/ir-rx51: Drop empty platform remove function
  media: chips-media/imx-vdoa: Drop empty platform remove function

 drivers/media/platform/chips-media/imx-vdoa.c | 6 ------
 drivers/media/platform/ti/davinci/vpbe_osd.c  | 6 ------
 drivers/media/platform/ti/davinci/vpbe_venc.c | 6 ------
 drivers/media/rc/ir-rx51.c                    | 6 ------
 4 files changed, 24 deletions(-)


base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476

Comments

Uwe Kleine-König Jan. 12, 2023, 9:59 p.m. UTC | #1
Hello,

On Tue, Dec 13, 2022 at 04:35:49PM +0100, Uwe Kleine-König wrote:
> this series removes all platform remove functions that only return zero
> below drivers/media. There is no reason to have these, as the only
> caller is platform core code doing:
> 
>         if (drv->remove) {
>                 int ret = drv->remove(dev);
> 
>                 if (ret)
>                         dev_warn(...)
>         }
> 
> (in platform_remove()) and so having no remove function is both
> equivalent and simpler.

I didn't get any feedback in reply to this series yet. Gentle ping!

Best regards
Uwe
Sean Young Jan. 13, 2023, 8:02 a.m. UTC | #2
On Thu, Jan 12, 2023 at 10:59:55PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> On Tue, Dec 13, 2022 at 04:35:49PM +0100, Uwe Kleine-König wrote:
> > this series removes all platform remove functions that only return zero
> > below drivers/media. There is no reason to have these, as the only
> > caller is platform core code doing:
> > 
> >         if (drv->remove) {
> >                 int ret = drv->remove(dev);
> > 
> >                 if (ret)
> >                         dev_warn(...)
> >         }
> > 
> > (in platform_remove()) and so having no remove function is both
> > equivalent and simpler.
> 
> I didn't get any feedback in reply to this series yet. Gentle ping!

I've sent the the ir-rx51.c patch to Mauro on the 30th of december to
pull. He will probably merge it at some point but who knows when.


Sean
Lad, Prabhakar Jan. 13, 2023, 8:39 a.m. UTC | #3
Hi Uwe,

On Tue, Dec 13, 2022 at 3:36 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series removes all platform remove functions that only return zero
> below drivers/media. There is no reason to have these, as the only
> caller is platform core code doing:
>
>         if (drv->remove) {
>                 int ret = drv->remove(dev);
>
>                 if (ret)
>                         dev_warn(...)
>         }
>
> (in platform_remove()) and so having no remove function is both
> equivalent and simpler.
>
> Uwe Kleine-König (4):
>   media: ti/davinci: vpbe_osd: Drop empty platform remove function
>   media: ti/davinci: vpbe_venc: Drop empty platform remove function
Ive reviewed the above two patches. I believe Hans will pick this up
soon for v6.3.

Cheers,
Prabhakar


>   media: rc/ir-rx51: Drop empty platform remove function
>   media: chips-media/imx-vdoa: Drop empty platform remove function
>
>  drivers/media/platform/chips-media/imx-vdoa.c | 6 ------
>  drivers/media/platform/ti/davinci/vpbe_osd.c  | 6 ------
>  drivers/media/platform/ti/davinci/vpbe_venc.c | 6 ------
>  drivers/media/rc/ir-rx51.c                    | 6 ------
>  4 files changed, 24 deletions(-)
>
>
> base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
> --
> 2.38.1
>
Lad, Prabhakar Jan. 13, 2023, 11:44 a.m. UTC | #4
Hi Uwe,

On Fri, Jan 13, 2023 at 8:39 AM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
>
> Hi Uwe,
>
> On Tue, Dec 13, 2022 at 3:36 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > Hello,
> >
> > this series removes all platform remove functions that only return zero
> > below drivers/media. There is no reason to have these, as the only
> > caller is platform core code doing:
> >
> >         if (drv->remove) {
> >                 int ret = drv->remove(dev);
> >
> >                 if (ret)
> >                         dev_warn(...)
> >         }
> >
> > (in platform_remove()) and so having no remove function is both
> > equivalent and simpler.
> >
> > Uwe Kleine-König (4):
> >   media: ti/davinci: vpbe_osd: Drop empty platform remove function
> >   media: ti/davinci: vpbe_venc: Drop empty platform remove function
> Ive reviewed the above two patches. I believe Hans will pick this up
> soon for v6.3.
>
I totally forgot davinci drivers are being dropped now [0].

[0] https://lore.kernel.org/lkml/20221019152947.3857217-15-arnd@kernel.org/

Cheers,
Prabhakar