From: Charles Manning <cdhmanning@gmail.com>
To: linux-kernel@vger.kernel.org, s.trumtrar@pengutronix.de,
dinguyen@altera.com, cslee@altera.com
Cc: Charles Manning <cdhmanning@gmail.com>
Subject: [PATCH 1/3] clk : Clean up checkpatch warnings
Date: Tue, 22 Jul 2014 14:20:32 +1200 [thread overview]
Message-ID: <1405995634-3297-2-git-send-email-cdhmanning@gmail.com> (raw)
In-Reply-To: <1405995634-3297-1-git-send-email-cdhmanning@gmail.com>
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
---
drivers/clk/clk.c | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 8b73ede..ec41922 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -99,7 +99,7 @@ static void clk_enable_unlock(unsigned long flags)
static struct dentry *rootdir;
static struct dentry *orphandir;
-static int inited = 0;
+static int inited;
static void clk_summary_show_one(struct seq_file *s, struct clk *c, int level)
{
@@ -182,11 +182,11 @@ static void clk_dump_subtree(struct seq_file *s, struct clk *c, int level)
clk_dump_one(s, c, level);
hlist_for_each_entry(child, &c->children, child_node) {
- seq_printf(s, ",");
+ seq_puts(s, ",");
clk_dump_subtree(s, child, level + 1);
}
- seq_printf(s, "}");
+ seq_puts(s, "}");
}
static int clk_dump(struct seq_file *s, void *data)
@@ -194,25 +194,25 @@ static int clk_dump(struct seq_file *s, void *data)
struct clk *c;
bool first_node = true;
- seq_printf(s, "{");
+ seq_puts(s, "{");
clk_prepare_lock();
hlist_for_each_entry(c, &clk_root_list, child_node) {
if (!first_node)
- seq_printf(s, ",");
+ seq_puts(s, ",");
first_node = false;
clk_dump_subtree(s, c, 0);
}
hlist_for_each_entry(c, &clk_orphan_list, child_node) {
- seq_printf(s, ",");
+ seq_puts(s, ",");
clk_dump_subtree(s, c, 0);
}
clk_prepare_unlock();
- seq_printf(s, "}");
+ seq_puts(s, "}");
return 0;
}
@@ -294,7 +294,7 @@ out:
static int clk_debug_create_subtree(struct clk *clk, struct dentry *pdentry)
{
struct clk *child;
- int ret = -EINVAL;;
+ int ret = -EINVAL;
if (!clk || !pdentry)
goto out;
@@ -1455,7 +1455,8 @@ out:
* so that in case of an error we can walk down the whole tree again and
* abort the change.
*/
-static struct clk *clk_propagate_rate_change(struct clk *clk, unsigned long event)
+static struct clk *clk_propagate_rate_change(struct clk *clk,
+ unsigned long event)
{
struct clk *child, *tmp_clk, *fail_clk = NULL;
int ret = NOTIFY_DONE;
@@ -1798,14 +1799,14 @@ int __clk_init(struct device *dev, struct clk *clk)
if (clk->ops->set_rate &&
!((clk->ops->round_rate || clk->ops->determine_rate) &&
clk->ops->recalc_rate)) {
- pr_warning("%s: %s must implement .round_rate or .determine_rate in addition to .recalc_rate\n",
+ pr_warn("%s: %s must implement .round_rate or .determine_rate in addition to .recalc_rate\n",
__func__, clk->name);
ret = -EINVAL;
goto out;
}
if (clk->ops->set_parent && !clk->ops->get_parent) {
- pr_warning("%s: %s must implement .get_parent & .set_parent\n",
+ pr_warn("%s: %s must implement .get_parent & .set_parent\n",
__func__, clk->name);
ret = -EINVAL;
goto out;
@@ -2116,8 +2117,8 @@ void clk_unregister(struct clk *clk)
{
unsigned long flags;
- if (!clk || WARN_ON_ONCE(IS_ERR(clk)))
- return;
+ if (!clk || WARN_ON_ONCE(IS_ERR(clk)))
+ return;
clk_prepare_lock();
@@ -2194,6 +2195,7 @@ EXPORT_SYMBOL_GPL(devm_clk_register);
static int devm_clk_match(struct device *dev, void *res, void *data)
{
struct clk *c = res;
+
if (WARN_ON(!c))
return 0;
return c == data;
@@ -2409,8 +2411,9 @@ EXPORT_SYMBOL_GPL(of_clk_src_onecell_get);
* @data: context pointer for @clk_src_get callback.
*/
int of_clk_add_provider(struct device_node *np,
- struct clk *(*clk_src_get)(struct of_phandle_args *clkspec,
- void *data),
+ struct clk *(*clk_src_get)
+ (struct of_phandle_args *clkspec,
+ void *data),
void *data)
{
struct of_clk_provider *cp;
--
1.9.1
next prev parent reply other threads:[~2014-07-22 2:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 2:20 [PATCH 0/3] clk : Fix SOCFPGA clk crash and some clean up Charles Manning
2014-07-22 2:20 ` Charles Manning [this message]
2014-07-30 12:19 ` [PATCH 1/3] clk : Clean up checkpatch warnings Pavel Machek
2014-07-22 2:20 ` [PATCH 2/3] clk: Prevent a hanging pointer being abused Charles Manning
2014-07-30 12:20 ` Pavel Machek
2014-07-22 2:20 ` [PATCH 3/3] clk: socfpga Change name look-up to not use the init pointer Charles Manning
2014-07-22 6:00 ` [PATCH 0/3] clk : Fix SOCFPGA clk crash and some clean up Steffen Trumtrar
2014-07-22 15:34 ` Dinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405995634-3297-2-git-send-email-cdhmanning@gmail.com \
--to=cdhmanning@gmail.com \
--cc=cslee@altera.com \
--cc=dinguyen@altera.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.trumtrar@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox