]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bus: fsl-mc: Remove deadcode
authorDr. David Alan Gilbert <linux@treblig.org>
Fri, 15 Nov 2024 15:20:55 +0000 (15:20 +0000)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 21 Mar 2025 08:46:08 +0000 (09:46 +0100)
fsl_mc_allocator_driver_exit() was added explicitly by
commit 1e8ac83b6caf ("bus: fsl-mc: add fsl_mc_allocator cleanup function")
but was never used.

Remove it.

fsl_mc_portal_reset() was added in 2015 by
commit 197f4d6a4a00 ("staging: fsl-mc: fsl-mc object allocator driver")
but was never used.

Remove it.

fsl_mc_portal_reset() was the only caller of dpmcp_reset().

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20241115152055.279732-1-linux@treblig.org
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
drivers/bus/fsl-mc/dpmcp.c
drivers/bus/fsl-mc/fsl-mc-allocator.c
drivers/bus/fsl-mc/fsl-mc-private.h
drivers/bus/fsl-mc/mc-io.c
include/linux/fsl/mc.h

index 5fbd0dbde24a404a2f7092cd8d6f08d4c3ea158b..7816c0a728ef425b418fdbf757223be6f659b45b 100644 (file)
@@ -75,25 +75,3 @@ int dpmcp_close(struct fsl_mc_io *mc_io,
        /* send command to mc*/
        return mc_send_command(mc_io, &cmd);
 }
-
-/**
- * dpmcp_reset() - Reset the DPMCP, returns the object to initial state.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPMCP object
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpmcp_reset(struct fsl_mc_io *mc_io,
-               u32 cmd_flags,
-               u16 token)
-{
-       struct fsl_mc_command cmd = { 0 };
-
-       /* prepare command */
-       cmd.header = mc_encode_cmd_header(DPMCP_CMDID_RESET,
-                                         cmd_flags, token);
-
-       /* send command to mc*/
-       return mc_send_command(mc_io, &cmd);
-}
index b5e8c021fa1fb4e62479c2486bd05ead1bf8b08c..6c3beb82dd1b73c6f104155d37cf9d77f6e749fa 100644 (file)
@@ -656,8 +656,3 @@ int __init fsl_mc_allocator_driver_init(void)
 {
        return fsl_mc_driver_register(&fsl_mc_allocator_driver);
 }
-
-void fsl_mc_allocator_driver_exit(void)
-{
-       fsl_mc_driver_unregister(&fsl_mc_allocator_driver);
-}
index b3520ea1b9f4c85222e47ebd94ae2e0991aa7379..e1b7ec3ed1a73b0f2d7f75c169ef83069e59df27 100644 (file)
@@ -66,10 +66,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io,
                u32 cmd_flags,
                u16 token);
 
-int dpmcp_reset(struct fsl_mc_io *mc_io,
-               u32 cmd_flags,
-               u16 token);
-
 /*
  * Data Path Resource Container (DPRC) API
  */
@@ -631,8 +627,6 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev,
 
 int __init fsl_mc_allocator_driver_init(void);
 
-void fsl_mc_allocator_driver_exit(void);
-
 void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
 
 void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
index 95b10a6cf3073ff476584e45373b63a7599c1a24..a0ad7866cbfcbab8981bc87287dba9b2fe3e2452 100644 (file)
@@ -263,23 +263,3 @@ void fsl_mc_portal_free(struct fsl_mc_io *mc_io)
        dpmcp_dev->consumer_link = NULL;
 }
 EXPORT_SYMBOL_GPL(fsl_mc_portal_free);
-
-/**
- * fsl_mc_portal_reset - Resets the dpmcp object for a given fsl_mc_io object
- *
- * @mc_io: Pointer to the fsl_mc_io object that wraps the MC portal to free
- */
-int fsl_mc_portal_reset(struct fsl_mc_io *mc_io)
-{
-       int error;
-       struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
-
-       error = dpmcp_reset(mc_io, 0, dpmcp_dev->mc_handle);
-       if (error < 0) {
-               dev_err(&dpmcp_dev->dev, "dpmcp_reset() failed: %d\n", error);
-               return error;
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(fsl_mc_portal_reset);
index 99f30c7d620852cb17df2a4108359775c2f5c912..897d6211c1635c5e715d17f9f4aa8d75979ebbac 100644 (file)
@@ -417,8 +417,6 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
 
 void fsl_mc_portal_free(struct fsl_mc_io *mc_io);
 
-int fsl_mc_portal_reset(struct fsl_mc_io *mc_io);
-
 int __must_check fsl_mc_object_allocate(struct fsl_mc_device *mc_dev,
                                        enum fsl_mc_pool_type pool_type,
                                        struct fsl_mc_device **new_mc_adev);