mei: Remove unused functions
Subsystems (2)
PATCH 1/1 mei: Remove unused functions
From: "Dr. David Alan Gilbert" <[email protected]>
The following functions have been in the mei code for a long time but have never been used.
mei_txe_setup_satt2() was added in 2014 by commit 32e2b59fca2c ("mei: txe: add hw-txe.c")
mei_me_cl_rm_by_uuid_id() was added in 2015 by
commit 79563db9ddd3 ("mei: add reference counting for me clients")
mei_cldev_uuid() was added in 2015 by
commit baeacd037697 ("mei: bus: export uuid and protocol version to mei_cl bus drivers")
mei_cldev_recv_nonblock() was added in 2016 by commit 076802d00615 ("mei: bus: enable non-blocking RX") it is the only user of mei_cldev_recv_nonblock_vtag().
Remove them.
--- drivers/misc/mei/bus.c | 52 -------------------------------------- drivers/misc/mei/client.c | 22 ---------------- drivers/misc/mei/client.h | 2 -- drivers/misc/mei/hw-txe.c | 45 --------------------------------- drivers/misc/mei/hw-txe.h | 2 -- include/linux/mei_cl_bus.h | 5 ---- 6 files changed, 128 deletions(-)
drivers/misc/mei/bus.c +0 -52
@@ -323,28 +323,6 @@ ssize_t mei_cldev_recv_vtag(struct mei_cl_device *cldev, u8 *buf, size_t length, }EXPORT_SYMBOL_GPL (mei_cldev_recv_vtag); -/** -* mei_cldev_recv_nonblock_vtag - non block client receive with vtag (read) -* -* @cldev: me client device -* @buf: buffer to receive -* @length: buffer length -* @vtag: virtual tag -* -* Return: -* * read size in bytes -* * -EAGAIN if function will block. -* * < 0 on other error -*/ -ssize_t mei_cldev_recv_nonblock_vtag (struct mei_cl_device *cldev,u8 *buf, -size_t length,u8 *vtag) -{ -struct mei_cl *cl = cldev->cl; - -return __mei_cl_recv (cl, buf, length, vtag,MEI_CL_IO_RX_NONBLOCK ,0 ); -} -EXPORT_SYMBOL_GPL (mei_cldev_recv_nonblock_vtag); -/** * mei_cldev_recv_timeout - client receive with timeout (read) *
@@ -438,23 +416,6 @@ ssize_t mei_cldev_recv(struct mei_cl_device *cldev, u8 *buf, size_t length) }EXPORT_SYMBOL_GPL (mei_cldev_recv); -/** -* mei_cldev_recv_nonblock - non block client receive (read) -* -* @cldev: me client device -* @buf: buffer to receive -* @length: buffer length -* -* Return: read size in bytes of < 0 on error -* -EAGAIN if function will block. -*/ -ssize_t mei_cldev_recv_nonblock (struct mei_cl_device *cldev,u8 *buf, -size_t length) -{ -return mei_cldev_recv_nonblock_vtag (cldev, buf, length,NULL ); -} -EXPORT_SYMBOL_GPL (mei_cldev_recv_nonblock); -/** * mei_cl_bus_rx_work - dispatch rx event for a bus device *
@@ -640,19 +601,6 @@ void mei_cldev_set_drvdata(struct mei_cl_device *cldev, void *data) }EXPORT_SYMBOL_GPL (mei_cldev_set_drvdata); -/** -* mei_cldev_uuid - return uuid of the underlying me client -* -* @cldev: mei client device -* -* Return: me client uuid -*/ -const uuid_le *mei_cldev_uuid (const struct mei_cl_device *cldev) -{ -return mei_me_cl_uuid (cldev->me_cl); -} -EXPORT_SYMBOL_GPL (mei_cldev_uuid); -/** * mei_cldev_ver - return protocol version of the underlying me client *
drivers/misc/mei/client.c +0 -22
@@ -271,28 +271,6 @@ void mei_me_cl_rm_by_uuid(struct mei_device *dev, const uuid_le *uuid)up_write (&dev->me_clients_rwsem); } -/** -* mei_me_cl_rm_by_uuid_id - remove all me clients matching client id -* -* @dev: the device structure -* @uuid: me client uuid -* @id: me client id -* -* Locking: called under "dev->device_lock" lock -*/ -void mei_me_cl_rm_by_uuid_id (struct mei_device *dev,const uuid_le *uuid,u8 id) -{ -struct mei_me_client *me_cl; - -dev_dbg (dev->dev,"remove %pUl %d\n" , uuid, id); - -down_write (&dev->me_clients_rwsem); - me_cl =__mei_me_cl_by_uuid_id (dev, uuid, id); -__mei_me_cl_del (dev, me_cl); -mei_me_cl_put (me_cl); -up_write (&dev->me_clients_rwsem); -} -/** * mei_me_cl_rm_all - remove all me clients *
drivers/misc/mei/client.h +0 -2
@@ -29,8 +29,6 @@ struct mei_me_client *mei_me_cl_by_id(struct mei_device *dev, u8 client_id);struct mei_me_client *mei_me_cl_by_uuid_id (struct mei_device *dev,const uuid_le *uuid,u8 client_id);void mei_me_cl_rm_by_uuid (struct mei_device *dev,const uuid_le *uuid); -void mei_me_cl_rm_by_uuid_id (struct mei_device *dev, -const uuid_le *uuid,u8 id);void mei_me_cl_rm_all (struct mei_device *dev);/**
drivers/misc/mei/hw-txe.c +0 -45
48 lines not on this page · raw message
drivers/misc/mei/hw-txe.h +0 -2
@@ -59,7 +59,5 @@ irqreturn_t mei_txe_irq_thread_handler(int irq, void *dev_id);int mei_txe_aliveness_set_sync (struct mei_device *dev,u32 req); -int mei_txe_setup_satt2 (struct mei_device *dev,phys_addr_t addr,u32 range); -#endif /* _MEI_HW_TXE_H_ */
include/linux/mei_cl_bus.h +0 -5
@@ -97,8 +97,6 @@ ssize_t mei_cldev_send(struct mei_cl_device *cldev, const u8 *buf,ssize_t mei_cldev_send_timeout (struct mei_cl_device *cldev,const u8 *buf,size_t length,unsigned long timeout);ssize_t mei_cldev_recv (struct mei_cl_device *cldev,u8 *buf,size_t length); -ssize_t mei_cldev_recv_nonblock (struct mei_cl_device *cldev,u8 *buf, -size_t length);ssize_t mei_cldev_recv_timeout (struct mei_cl_device *cldev,u8 *buf,size_t length,unsigned long timeout); ssize_t mei_cldev_send_vtag(struct mei_cl_device *cldev, const u8 *buf,
@@ -107,8 +105,6 @@ ssize_t mei_cldev_send_vtag_timeout(struct mei_cl_device *cldev, const u8 *buf, size_t length, u8 vtag, unsigned long timeout);ssize_t mei_cldev_recv_vtag (struct mei_cl_device *cldev,u8 *buf,size_t length,u8 *vtag); -ssize_t mei_cldev_recv_nonblock_vtag (struct mei_cl_device *cldev,u8 *buf, -size_t length,u8 *vtag);ssize_t mei_cldev_recv_vtag_timeout (struct mei_cl_device *cldev,u8 *buf,size_t length,u8 *vtag,unsigned long timeout);
@@ -116,7 +112,6 @@ int mei_cldev_register_rx_cb(struct mei_cl_device *cldev, mei_cldev_cb_t rx_cb);int mei_cldev_register_notif_cb (struct mei_cl_device *cldev,mei_cldev_cb_t notif_cb); -const uuid_le *mei_cldev_uuid (const struct mei_cl_device *cldev);u8 mei_cldev_ver (const struct mei_cl_device *cldev);void *mei_cldev_get_drvdata (const struct mei_cl_device *cldev);
Signature · 1 line
2.48.1
Quoted 1 line · On Thu, Jan 30, 2025, at 02:26, [email protected] wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
It looks like git-send-email failed to find your cleartext name in gitconfig.
Quoted 13 lines
The following functions have been in the mei code for a long time but have never been used.
mei_txe_setup_satt2()was added in 2014 by commit32e2b59fca2c("mei: txe: addhw-txe.c")
mei_me_cl_rm_by_uuid_id()was added in 2015 by
commit79563db9ddd3("mei: add reference counting for me clients")
mei_cldev_uuid()was added in 2015 by
commitbaeacd037697("mei: bus: export uuid and protocol version tomei_clbus drivers")
Quoted 7 lines
mei_cldev_recv_nonblock()was added in 2016 by commit076802d00615("mei: bus: enable non-blocking RX") it is the only user ofmei_cldev_recv_nonblock_vtag().Remove them.
Signed-off-by Dr. David Alan Gilbert <[email protected]>
Makes sense to me. IIRC there are part of mei that are only used by out of tree code, but this is normally discouraged, so no objections from me on that.
Arnd
Quoted 38 lines
-----Original Message-----
From: Arnd Bergmann <[email protected]>
Sent: Friday, January 31, 2025 9:10 AM
To: [email protected]; Usyskin, Alexander <[email protected]>; Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] mei: Remove unused functionsQuoted 1 line · On Thu, Jan 30, 2025, at 02:26, [email protected] wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
It looks like git-send-email failed to find your cleartext name in gitconfig.
Quoted 11 lines
The following functions have been in the mei code for a long time but have never been used.
mei_txe_setup_satt2()was added in 2014 by commit32e2b59fca2c("mei: txe: addhw-txe.c")
mei_me_cl_rm_by_uuid_id()was added in 2015 by
commit79563db9ddd3("mei: add reference counting for me clients")
mei_cldev_uuid()was added in 2015 by
commitbaeacd037697("mei: bus: export uuid and protocol version to
mei_clQuoted 9 lines
bus drivers")
mei_cldev_recv_nonblock()was added in 2016 by commit076802d00615("mei: bus: enable non-blocking RX") it is the only user ofmei_cldev_recv_nonblock_vtag().Remove them.
Signed-off-by Dr. David Alan Gilbert <[email protected]>
Quoted 7 lines
Makes sense to me. IIRC there are part of mei that are only used by out of tree code, but this is normally discouraged, so no objections from me on that.
Acked-by Arnd Bergmann <[email protected]>Arnd
Let out of tree code bring them, if needed.
- -
Thanks,
Sasha