diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-03-21 16:40:37 +0100 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-04-05 20:58:32 -0700 |
commit | 810c03d9d7c978b4ee5287d8987043a9be1d614e (patch) | |
tree | 09ceb3bd42ef0fb2c9d36ff93bf6c890a076e021 | |
parent | fe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff) | |
download | linux-stable-810c03d9d7c978b4ee5287d8987043a9be1d614e.tar.gz linux-stable-810c03d9d7c978b4ee5287d8987043a9be1d614e.tar.bz2 linux-stable-810c03d9d7c978b4ee5287d8987043a9be1d614e.zip |
rpmsg: qcom_smd: Make qcom_smd_unregister_edge() return void
This function returned zero unconditionally. Convert it to return no
value instead. This makes it more obvious what happens in the callers.
One caller is converted to return zero explicitly. The only other caller
(smd_subdev_stop() in drivers/remoteproc/qcom_common.c) already ignored
the return value before.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230321154039.355098-2-u.kleine-koenig@pengutronix.de
-rw-r--r-- | drivers/rpmsg/qcom_smd.c | 8 | ||||
-rw-r--r-- | include/linux/rpmsg/qcom_smd.h | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 1044cf03c542..38352f5792f4 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1533,7 +1533,7 @@ static int qcom_smd_remove_device(struct device *dev, void *data) * qcom_smd_unregister_edge() - release an edge and its children * @edge: edge reference acquired from qcom_smd_register_edge */ -int qcom_smd_unregister_edge(struct qcom_smd_edge *edge) +void qcom_smd_unregister_edge(struct qcom_smd_edge *edge) { int ret; @@ -1547,8 +1547,6 @@ int qcom_smd_unregister_edge(struct qcom_smd_edge *edge) mbox_free_channel(edge->mbox_chan); device_unregister(&edge->dev); - - return 0; } EXPORT_SYMBOL(qcom_smd_unregister_edge); @@ -1572,7 +1570,9 @@ static int qcom_smd_remove_edge(struct device *dev, void *data) { struct qcom_smd_edge *edge = to_smd_edge(dev); - return qcom_smd_unregister_edge(edge); + qcom_smd_unregister_edge(edge); + + return 0; } /* diff --git a/include/linux/rpmsg/qcom_smd.h b/include/linux/rpmsg/qcom_smd.h index 2e92d7407a85..3379bf4e1cb1 100644 --- a/include/linux/rpmsg/qcom_smd.h +++ b/include/linux/rpmsg/qcom_smd.h @@ -11,7 +11,7 @@ struct qcom_smd_edge; struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, struct device_node *node); -int qcom_smd_unregister_edge(struct qcom_smd_edge *edge); +void qcom_smd_unregister_edge(struct qcom_smd_edge *edge); #else @@ -22,9 +22,8 @@ qcom_smd_register_edge(struct device *parent, return NULL; } -static inline int qcom_smd_unregister_edge(struct qcom_smd_edge *edge) +static inline void qcom_smd_unregister_edge(struct qcom_smd_edge *edge) { - return 0; } #endif |