* [PATCH 0/2] Small adjustments in drivers/clk/clk.c
@ 2015-05-07 0:50 Murilo Opsfelder Araujo
2015-05-07 0:51 ` [PATCH 1/2] drivers: clk: clk.c: Add comments indicating the matching #ifdef blocks Murilo Opsfelder Araujo
2015-05-07 0:51 ` [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF Murilo Opsfelder Araujo
0 siblings, 2 replies; 6+ messages in thread
From: Murilo Opsfelder Araujo @ 2015-05-07 0:50 UTC (permalink / raw)
To: linux-kernel
Cc: linux-clk, Stephen Boyd, Mike Turquette, Murilo Opsfelder Araujo
The first patch just improves code readability by addig comments after
#endif statements; the second one gets rid of a warning message during
kernel build.
Murilo Opsfelder Araujo (2):
drivers: clk: clk.c: Add comments indicating the matching #ifdef
blocks
drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF
drivers/clk/clk.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] drivers: clk: clk.c: Add comments indicating the matching #ifdef blocks
2015-05-07 0:50 [PATCH 0/2] Small adjustments in drivers/clk/clk.c Murilo Opsfelder Araujo
@ 2015-05-07 0:51 ` Murilo Opsfelder Araujo
2015-05-07 0:51 ` [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF Murilo Opsfelder Araujo
1 sibling, 0 replies; 6+ messages in thread
From: Murilo Opsfelder Araujo @ 2015-05-07 0:51 UTC (permalink / raw)
To: linux-kernel
Cc: linux-clk, Stephen Boyd, Mike Turquette, Murilo Opsfelder Araujo
Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
drivers/clk/clk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 087a092..a961eb6 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2226,7 +2226,7 @@ static inline void clk_debug_reparent(struct clk_core *core,
static inline void clk_debug_unregister(struct clk_core *core)
{
}
-#endif
+#endif /* CONFIG_DEBUG_FS */
static bool clk_is_orphan(const struct clk *clk)
{
@@ -3144,4 +3144,4 @@ void __init of_clk_init(const struct of_device_id *matches)
force = true;
}
}
-#endif
+#endif /* CONFIG_OF */
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF
2015-05-07 0:50 [PATCH 0/2] Small adjustments in drivers/clk/clk.c Murilo Opsfelder Araujo
2015-05-07 0:51 ` [PATCH 1/2] drivers: clk: clk.c: Add comments indicating the matching #ifdef blocks Murilo Opsfelder Araujo
@ 2015-05-07 0:51 ` Murilo Opsfelder Araujo
2015-05-07 0:55 ` Stephen Boyd
1 sibling, 1 reply; 6+ messages in thread
From: Murilo Opsfelder Araujo @ 2015-05-07 0:51 UTC (permalink / raw)
To: linux-kernel
Cc: linux-clk, Stephen Boyd, Mike Turquette, Murilo Opsfelder Araujo
The function clk_is_orphan() is called only by
__of_clk_get_from_provider(), which depends on CONFIG_OF, so it does
make sense the move.
This change also gets rid of the following build message when CONFIG_OF
is not set:
drivers/clk/clk.c:2231:13: warning: ‘clk_is_orphan’ defined but not used [-Wunused-function]
Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
drivers/clk/clk.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index a961eb6..d748aa2 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2228,14 +2228,6 @@ static inline void clk_debug_unregister(struct clk_core *core)
}
#endif /* CONFIG_DEBUG_FS */
-static bool clk_is_orphan(const struct clk *clk)
-{
- if (!clk)
- return false;
-
- return clk->core->orphan;
-}
-
/**
* __clk_init - initialize the data structures in a struct clk
* @dev: device initializing this clk, placeholder for now
@@ -2950,6 +2942,14 @@ void of_clk_del_provider(struct device_node *np)
}
EXPORT_SYMBOL_GPL(of_clk_del_provider);
+static bool clk_is_orphan(const struct clk *clk)
+{
+ if (!clk)
+ return false;
+
+ return clk->core->orphan;
+}
+
struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec,
const char *dev_id, const char *con_id)
{
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF
2015-05-07 0:51 ` [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF Murilo Opsfelder Araujo
@ 2015-05-07 0:55 ` Stephen Boyd
2015-05-07 0:59 ` Murilo Opsfelder Araújo
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2015-05-07 0:55 UTC (permalink / raw)
To: Murilo Opsfelder Araujo, linux-kernel; +Cc: linux-clk, Mike Turquette
On 05/06/15 17:51, Murilo Opsfelder Araujo wrote:
> The function clk_is_orphan() is called only by
> __of_clk_get_from_provider(), which depends on CONFIG_OF, so it does
> make sense the move.
>
> This change also gets rid of the following build message when CONFIG_OF
> is not set:
>
> drivers/clk/clk.c:2231:13: warning: ‘clk_is_orphan’ defined but not used [-Wunused-function]
>
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
The patch that introduces this problem is gone now.
> ---
> drivers/clk/clk.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index a961eb6..d748aa2 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -2228,14 +2228,6 @@ static inline void clk_debug_unregister(struct clk_core *core)
> }
> #endif /* CONFIG_DEBUG_FS */
>
> -static bool clk_is_orphan(const struct clk *clk)
> -{
> - if (!clk)
> - return false;
> -
> - return clk->core->orphan;
> -}
> -
> /**
> * __clk_init - initialize the data structures in a struct clk
> * @dev: device initializing this clk, placeholder for now
> @@ -2950,6 +2942,14 @@ void of_clk_del_provider(struct device_node *np)
> }
> EXPORT_SYMBOL_GPL(of_clk_del_provider);
>
> +static bool clk_is_orphan(const struct clk *clk)
> +{
> + if (!clk)
> + return false;
> +
> + return clk->core->orphan;
> +}
> +
> struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec,
> const char *dev_id, const char *con_id)
> {
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF
2015-05-07 0:55 ` Stephen Boyd
@ 2015-05-07 0:59 ` Murilo Opsfelder Araújo
0 siblings, 0 replies; 6+ messages in thread
From: Murilo Opsfelder Araújo @ 2015-05-07 0:59 UTC (permalink / raw)
To: Stephen Boyd; +Cc: Linux Kernel Mailing List, linux-clk, Mike Turquette
On Wed, May 6, 2015 at 9:55 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 05/06/15 17:51, Murilo Opsfelder Araujo wrote:
>> The function clk_is_orphan() is called only by
>> __of_clk_get_from_provider(), which depends on CONFIG_OF, so it does
>> make sense the move.
>>
>> This change also gets rid of the following build message when CONFIG_OF
>> is not set:
>>
>> drivers/clk/clk.c:2231:13: warning: ‘clk_is_orphan’ defined but not used [-Wunused-function]
>>
>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>
> The patch that introduces this problem is gone now.
>
Nice to know it is gone. I'm using next-20150506 which still contains
that. Probably the fix will land a next -next release.
Thanks, Stephen.
--
Murilo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF
@ 2015-05-07 0:59 ` Murilo Opsfelder Araújo
0 siblings, 0 replies; 6+ messages in thread
From: Murilo Opsfelder Araújo @ 2015-05-07 0:59 UTC (permalink / raw)
To: Stephen Boyd; +Cc: Linux Kernel Mailing List, linux-clk, Mike Turquette
On Wed, May 6, 2015 at 9:55 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 05/06/15 17:51, Murilo Opsfelder Araujo wrote:
>> The function clk_is_orphan() is called only by
>> __of_clk_get_from_provider(), which depends on CONFIG_OF, so it does
>> make sense the move.
>>
>> This change also gets rid of the following build message when CONFIG_OF
>> is not set:
>>
>> drivers/clk/clk.c:2231:13: warning: =E2=80=98clk_is_orphan=E2=80=99 defi=
ned but not used [-Wunused-function]
>>
>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>
> The patch that introduces this problem is gone now.
>
Nice to know it is gone. I'm using next-20150506 which still contains
that. Probably the fix will land a next -next release.
Thanks, Stephen.
--=20
Murilo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-07 1:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 0:50 [PATCH 0/2] Small adjustments in drivers/clk/clk.c Murilo Opsfelder Araujo
2015-05-07 0:51 ` [PATCH 1/2] drivers: clk: clk.c: Add comments indicating the matching #ifdef blocks Murilo Opsfelder Araujo
2015-05-07 0:51 ` [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF Murilo Opsfelder Araujo
2015-05-07 0:55 ` Stephen Boyd
2015-05-07 0:59 ` Murilo Opsfelder Araújo
2015-05-07 0:59 ` Murilo Opsfelder Araújo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.