2017-11-17 18:59:11

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH 01/10] staging: fsl-mc: drop unused dpcon APIs

From: Laurentiu Tudor <[email protected]>

Couple of API functions are not used so lets drop them together with
the associated structures and defines.

Signed-off-by: Laurentiu Tudor <[email protected]>
---
drivers/staging/fsl-mc/bus/dpcon-cmd.h | 6 ---
drivers/staging/fsl-mc/bus/dpcon.c | 69 ----------------------------------
drivers/staging/fsl-mc/include/dpcon.h | 10 -----
3 files changed, 85 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpcon-cmd.h
index 2bb6698..d2ba819 100644
--- a/drivers/staging/fsl-mc/bus/dpcon-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpcon-cmd.h
@@ -45,13 +45,11 @@
/* Command IDs */
#define DPCON_CMDID_CLOSE DPCON_CMD(0x800)
#define DPCON_CMDID_OPEN DPCON_CMD(0x808)
-#define DPCON_CMDID_GET_API_VERSION DPCON_CMD(0xa08)

#define DPCON_CMDID_ENABLE DPCON_CMD(0x002)
#define DPCON_CMDID_DISABLE DPCON_CMD(0x003)
#define DPCON_CMDID_GET_ATTR DPCON_CMD(0x004)
#define DPCON_CMDID_RESET DPCON_CMD(0x005)
-#define DPCON_CMDID_IS_ENABLED DPCON_CMD(0x006)

#define DPCON_CMDID_SET_NOTIFICATION DPCON_CMD(0x100)

@@ -61,10 +59,6 @@ struct dpcon_cmd_open {

#define DPCON_ENABLE 1

-struct dpcon_rsp_is_enabled {
- u8 enabled;
-};
-
struct dpcon_rsp_get_attr {
/* response word 0 */
__le32 id;
diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/staging/fsl-mc/bus/dpcon.c
index ca1da85..ce7c0bf 100644
--- a/drivers/staging/fsl-mc/bus/dpcon.c
+++ b/drivers/staging/fsl-mc/bus/dpcon.c
@@ -156,42 +156,6 @@ int dpcon_disable(struct fsl_mc_io *mc_io,
EXPORT_SYMBOL(dpcon_disable);

/**
- * dpcon_is_enabled() - Check if the DPCON is enabled.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPCON object
- * @en: Returns '1' if object is enabled; '0' otherwise
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpcon_is_enabled(struct fsl_mc_io *mc_io,
- u32 cmd_flags,
- u16 token,
- int *en)
-{
- struct mc_command cmd = { 0 };
- struct dpcon_rsp_is_enabled *dpcon_rsp;
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPCON_CMDID_IS_ENABLED,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- dpcon_rsp = (struct dpcon_rsp_is_enabled *)cmd.params;
- *en = dpcon_rsp->enabled & DPCON_ENABLE;
-
- return 0;
-}
-EXPORT_SYMBOL(dpcon_is_enabled);
-
-/**
* dpcon_reset() - Reset the DPCON, 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_'
@@ -282,36 +246,3 @@ int dpcon_set_notification(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
EXPORT_SYMBOL(dpcon_set_notification);
-
-/**
- * dpcon_get_api_version - Get Data Path Concentrator API version
- * @mc_io: Pointer to MC portal's DPCON object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @major_ver: Major version of DPCON API
- * @minor_ver: Minor version of DPCON API
- *
- * Return: '0' on Success; Error code otherwise
- */
-int dpcon_get_api_version(struct fsl_mc_io *mc_io,
- u32 cmd_flags,
- u16 *major_ver,
- u16 *minor_ver)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPCON_CMDID_GET_API_VERSION,
- cmd_flags, 0);
-
- /* send command to mc */
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- mc_cmd_read_api_version(&cmd, major_ver, minor_ver);
-
- return 0;
-}
-EXPORT_SYMBOL(dpcon_get_api_version);
diff --git a/drivers/staging/fsl-mc/include/dpcon.h b/drivers/staging/fsl-mc/include/dpcon.h
index efa2390..425749e 100644
--- a/drivers/staging/fsl-mc/include/dpcon.h
+++ b/drivers/staging/fsl-mc/include/dpcon.h
@@ -62,11 +62,6 @@ int dpcon_disable(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token);

-int dpcon_is_enabled(struct fsl_mc_io *mc_io,
- u32 cmd_flags,
- u16 token,
- int *en);
-
int dpcon_reset(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token);
@@ -107,9 +102,4 @@ int dpcon_set_notification(struct fsl_mc_io *mc_io,
u16 token,
struct dpcon_notification_cfg *cfg);

-int dpcon_get_api_version(struct fsl_mc_io *mc_io,
- u32 cmd_flags,
- u16 *major_ver,
- u16 *minor_ver);
-
#endif /* __FSL_DPCON_H */
--
2.9.4


From 1583682464797032041@xxx Fri Nov 10 12:34:52 +0000 2017
X-GM-THRID: 1583483187310885262
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread


2017-11-17 18:59:39

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH 05/10] staging: fsl-mc: consistently use EXPORT_SYMBOL_GPL()

From: Laurentiu Tudor <[email protected]>

The bus driver is mixing EXPORT_SYMBOL()/EXPORT_SYMBOL_GPL() usage.
Change it to consistently use EXPORT_SYMBOL_GPL().

Signed-off-by: Laurentiu Tudor <[email protected]>
---
drivers/staging/fsl-mc/bus/dpbp.c | 16 ++++++++--------
drivers/staging/fsl-mc/bus/dpcon.c | 14 +++++++-------
drivers/staging/fsl-mc/bus/dprc.c | 16 ++++++++--------
drivers/staging/fsl-mc/bus/mc-sys.c | 2 +-
4 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/staging/fsl-mc/bus/dpbp.c
index 363730a..fc76e90 100644
--- a/drivers/staging/fsl-mc/bus/dpbp.c
+++ b/drivers/staging/fsl-mc/bus/dpbp.c
@@ -77,7 +77,7 @@ int dpbp_open(struct fsl_mc_io *mc_io,

return err;
}
-EXPORT_SYMBOL(dpbp_open);
+EXPORT_SYMBOL_GPL(dpbp_open);

/**
* dpbp_close() - Close the control session of the object
@@ -103,7 +103,7 @@ int dpbp_close(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpbp_close);
+EXPORT_SYMBOL_GPL(dpbp_close);

/**
* dpbp_enable() - Enable the DPBP.
@@ -126,7 +126,7 @@ int dpbp_enable(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpbp_enable);
+EXPORT_SYMBOL_GPL(dpbp_enable);

/**
* dpbp_disable() - Disable the DPBP.
@@ -149,7 +149,7 @@ int dpbp_disable(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpbp_disable);
+EXPORT_SYMBOL_GPL(dpbp_disable);

/**
* dpbp_is_enabled() - Check if the DPBP is enabled.
@@ -183,7 +183,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dpbp_is_enabled);
+EXPORT_SYMBOL_GPL(dpbp_is_enabled);

/**
* dpbp_reset() - Reset the DPBP, returns the object to initial state.
@@ -206,7 +206,7 @@ int dpbp_reset(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpbp_reset);
+EXPORT_SYMBOL_GPL(dpbp_reset);

/**
* dpbp_get_attributes - Retrieve DPBP attributes.
@@ -243,7 +243,7 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dpbp_get_attributes);
+EXPORT_SYMBOL_GPL(dpbp_get_attributes);

/**
* dpbp_get_api_version - Get Data Path Buffer Pool API version
@@ -276,4 +276,4 @@ int dpbp_get_api_version(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dpbp_get_api_version);
+EXPORT_SYMBOL_GPL(dpbp_get_api_version);
diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/staging/fsl-mc/bus/dpcon.c
index ce7c0bf..5ba1a0f 100644
--- a/drivers/staging/fsl-mc/bus/dpcon.c
+++ b/drivers/staging/fsl-mc/bus/dpcon.c
@@ -78,7 +78,7 @@ int dpcon_open(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dpcon_open);
+EXPORT_SYMBOL_GPL(dpcon_open);

/**
* dpcon_close() - Close the control session of the object
@@ -105,7 +105,7 @@ int dpcon_close(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpcon_close);
+EXPORT_SYMBOL_GPL(dpcon_close);

/**
* dpcon_enable() - Enable the DPCON
@@ -129,7 +129,7 @@ int dpcon_enable(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpcon_enable);
+EXPORT_SYMBOL_GPL(dpcon_enable);

/**
* dpcon_disable() - Disable the DPCON
@@ -153,7 +153,7 @@ int dpcon_disable(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpcon_disable);
+EXPORT_SYMBOL_GPL(dpcon_disable);

/**
* dpcon_reset() - Reset the DPCON, returns the object to initial state.
@@ -176,7 +176,7 @@ int dpcon_reset(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpcon_reset);
+EXPORT_SYMBOL_GPL(dpcon_reset);

/**
* dpcon_get_attributes() - Retrieve DPCON attributes.
@@ -214,7 +214,7 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dpcon_get_attributes);
+EXPORT_SYMBOL_GPL(dpcon_get_attributes);

/**
* dpcon_set_notification() - Set DPCON notification destination
@@ -245,4 +245,4 @@ int dpcon_set_notification(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dpcon_set_notification);
+EXPORT_SYMBOL_GPL(dpcon_set_notification);
diff --git a/drivers/staging/fsl-mc/bus/dprc.c b/drivers/staging/fsl-mc/bus/dprc.c
index 6f6c65a..f29ea3e 100644
--- a/drivers/staging/fsl-mc/bus/dprc.c
+++ b/drivers/staging/fsl-mc/bus/dprc.c
@@ -71,7 +71,7 @@ int dprc_open(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dprc_open);
+EXPORT_SYMBOL_GPL(dprc_open);

/**
* dprc_close() - Close the control session of the object
@@ -97,7 +97,7 @@ int dprc_close(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dprc_close);
+EXPORT_SYMBOL_GPL(dprc_close);

/**
* dprc_get_irq() - Get IRQ information from the DPRC.
@@ -475,7 +475,7 @@ int dprc_get_obj_count(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dprc_get_obj_count);
+EXPORT_SYMBOL_GPL(dprc_get_obj_count);

/**
* dprc_get_obj() - Get general information on an object
@@ -531,7 +531,7 @@ int dprc_get_obj(struct fsl_mc_io *mc_io,
obj_desc->label[15] = '\0';
return 0;
}
-EXPORT_SYMBOL(dprc_get_obj);
+EXPORT_SYMBOL_GPL(dprc_get_obj);

/**
* dprc_set_obj_irq() - Set IRQ information for object to trigger an interrupt.
@@ -572,7 +572,7 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-EXPORT_SYMBOL(dprc_set_obj_irq);
+EXPORT_SYMBOL_GPL(dprc_set_obj_irq);

/**
* dprc_get_obj_irq() - Get IRQ information from object.
@@ -626,7 +626,7 @@ int dprc_get_obj_irq(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dprc_get_obj_irq);
+EXPORT_SYMBOL_GPL(dprc_get_obj_irq);

/**
* dprc_get_res_count() - Obtains the number of free resources that are assigned
@@ -669,7 +669,7 @@ int dprc_get_res_count(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dprc_get_res_count);
+EXPORT_SYMBOL_GPL(dprc_get_res_count);

/**
* dprc_get_obj_region() - Get region information for a specified object.
@@ -717,7 +717,7 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io,

return 0;
}
-EXPORT_SYMBOL(dprc_get_obj_region);
+EXPORT_SYMBOL_GPL(dprc_get_obj_region);

/**
* dprc_get_api_version - Get Data Path Resource Container API version
diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c
index 7ce105b..a2854e5 100644
--- a/drivers/staging/fsl-mc/bus/mc-sys.c
+++ b/drivers/staging/fsl-mc/bus/mc-sys.c
@@ -320,4 +320,4 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)

return error;
}
-EXPORT_SYMBOL(mc_send_command);
+EXPORT_SYMBOL_GPL(mc_send_command);
--
2.9.4


From 1583622519571366691@xxx Thu Nov 09 20:42:03 +0000 2017
X-GM-THRID: 1583622519571366691
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread