Skip to contentSkip to conversation

staging: greybus: Remove unused function 'to_fw_mgmt_connection'

PATCH In review Jeremy Dean Clifton 2 participants 3 messages Oct 13 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 staging: greybus: Remove unused function 'to_fw_mgmt_connection'

Remove unused function from greybus driver to_fw_mgmt_connection.

This function is not exported or called from anywhere tree-wide.

Confirmed with git grep and cscope.

---
 drivers/staging/greybus/fw-core.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/greybus/fw-core.c +0 -7
index 78321be80013..46b35ef55090 100644
@@ -21,13 +21,6 @@ struct gb_fw_core {
 
 static struct spilib_ops *spilib_ops;
 
-struct gb_connection *to_fw_mgmt_connection(struct device *dev)
-{
-	struct gb_fw_core *fw_core = dev_get_drvdata(dev);
-
-	return fw_core->mgmt_connection;
-}
-
 static int gb_fw_spi_connection_init(struct gb_connection *connection)
 {
 	int ret;
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#2 lore raw
Quoted 7 lines · Jeremy Dean Clifton

Remove unused function from greybus driver to_fw_mgmt_connection.

This function is not exported or called from anywhere tree-wide.

Confirmed with git grep and cscope.

Looks good to me. Are there other unused functions like this?

Quoted 22 lines
---
  drivers/staging/greybus/fw-core.c | 7 -------
  1 file changed, 7 deletions(-)
drivers/staging/greybus/fw-core.c +0 -7
index 78321be80013..46b35ef55090 100644
@@ -21,13 +21,6 @@ struct gb_fw_core {
 
  static struct spilib_ops *spilib_ops;
 
-struct gb_connection *to_fw_mgmt_connection(struct device *dev)
-{
-	struct gb_fw_core *fw_core = dev_get_drvdata(dev);
-
-	return fw_core->mgmt_connection;
-}
-
  static int gb_fw_spi_connection_init(struct gb_connection *connection)
  {
  	int ret;
#3 lore raw
Quoted 12 lines · Alex Elder
Quoted 7 lines · Jeremy Dean Clifton

Remove unused function from greybus driver to_fw_mgmt_connection.

This function is not exported or called from anywhere tree-wide.

Confirmed with git grep and cscope.

Looks good to me.  Are there other unused functions like this?

I did not find any others like this one. There may be some in rtl. I think that is going away soon, though.

Quoted 1 line

Thank you

Quoted 21 lines
Quoted 20 lines

---
  drivers/staging/greybus/fw-core.c | 7 -------

  1 file changed, 7 deletions(-)
drivers/staging/greybus/fw-core.c +0 -7
index 78321be80013..46b35ef55090 100644
@@ -21,13 +21,6 @@ struct gb_fw_core {
   static struct spilib_ops *spilib_ops;
-struct gb_connection *to_fw_mgmt_connection(struct device *dev)
-{
-    struct gb_fw_core *fw_core = dev_get_drvdata(dev);
-
-    return fw_core->mgmt_connection;
-}
-
   static int gb_fw_spi_connection_init(struct gb_connection *connection)
   {
       int ret;