* [PATCH v2] drivers: reset: Mark function as static and remove unused function in core.c
@ 2013-12-19 8:41 Rashika Kheria
2014-01-06 17:27 ` Philipp Zabel
0 siblings, 1 reply; 2+ messages in thread
From: Rashika Kheria @ 2013-12-19 8:41 UTC (permalink / raw)
To: linux-kernel
Cc: Philipp Zabel, Pavel Machek, Stephen Warren, Dan Carpenter,
Shawn Guo, josh
Mark function of_reset_simple_xlate() as static in core.c
because it is not used outside this file.
Also, remove functions devm_reset_control_put() and
devm_reset_control_match() because they are unused.
This eliminates the following warnings in core.c:
drivers/reset/core.c:46:5: warning: no previous prototype for ‘of_reset_simple_xlate’ [-Wmissing-prototypes]
drivers/reset/core.c:262:6: warning: no previous prototype for ‘devm_reset_control_put’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
Changes since v1:
Incorrect Fix
drivers/reset/core.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index d1b6089..129bb85 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -43,7 +43,7 @@ struct reset_control {
* This simple translation function should be used for reset controllers
* with 1:1 mapping, where reset lines can be indexed by number without gaps.
*/
-int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
+static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
const struct of_phandle_args *reset_spec)
{
if (WARN_ON(reset_spec->args_count != rcdev->of_reset_n_cells))
@@ -54,7 +54,6 @@ int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
return reset_spec->args[0];
}
-EXPORT_SYMBOL_GPL(of_reset_simple_xlate);
/**
* reset_controller_register - register a reset controller device
@@ -243,33 +242,6 @@ struct reset_control *devm_reset_control_get(struct device *dev, const char *id)
}
EXPORT_SYMBOL_GPL(devm_reset_control_get);
-static int devm_reset_control_match(struct device *dev, void *res, void *data)
-{
- struct reset_control **rstc = res;
- if (WARN_ON(!rstc || !*rstc))
- return 0;
- return *rstc == data;
-}
-
-/**
- * devm_reset_control_put - resource managed reset_control_put()
- * @rstc: reset controller to free
- *
- * Deallocate a reset control allocated withd devm_reset_control_get().
- * This function will not need to be called normally, as devres will take
- * care of freeing the resource.
- */
-void devm_reset_control_put(struct reset_control *rstc)
-{
- int ret;
-
- ret = devres_release(rstc->dev, devm_reset_control_release,
- devm_reset_control_match, rstc);
- if (ret)
- WARN_ON(ret);
-}
-EXPORT_SYMBOL_GPL(devm_reset_control_put);
-
/**
* device_reset - find reset controller associated with the device
* and perform reset
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] drivers: reset: Mark function as static and remove unused function in core.c
2013-12-19 8:41 [PATCH v2] drivers: reset: Mark function as static and remove unused function in core.c Rashika Kheria
@ 2014-01-06 17:27 ` Philipp Zabel
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2014-01-06 17:27 UTC (permalink / raw)
To: Rashika Kheria
Cc: linux-kernel, Pavel Machek, Stephen Warren, Dan Carpenter,
Shawn Guo, josh
Am Donnerstag, den 19.12.2013, 14:11 +0530 schrieb Rashika Kheria:
> Mark function of_reset_simple_xlate() as static in core.c
> because it is not used outside this file.
> Also, remove functions devm_reset_control_put() and
> devm_reset_control_match() because they are unused.
>
> This eliminates the following warnings in core.c:
> drivers/reset/core.c:46:5: warning: no previous prototype for ‘of_reset_simple_xlate’ [-Wmissing-prototypes]
> drivers/reset/core.c:262:6: warning: no previous prototype for ‘devm_reset_control_put’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
>
> Changes since v1:
> Incorrect Fix
[...]
I have overlooked this earlier, will apply it as-is.
thanks
Philipp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-06 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 8:41 [PATCH v2] drivers: reset: Mark function as static and remove unused function in core.c Rashika Kheria
2014-01-06 17:27 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox