* [PATCH 1/2] i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions
@ 2014-03-11 1:21 Jingoo Han
[not found] ` <000501cf3cc8$4b7f8d90$e27ea8b0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-03-11 1:21 UTC (permalink / raw)
To: 'Wolfram Sang'
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, 'Naveen Krishna Ch',
'Taekgyun Ko', 'Jingoo Han'
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
the CONFIG_PM_SLEEP is enabled.
warning: 'exynos5_i2c_suspend_noirq' defined but not used [-Wunused-function]
warning: 'exynos5_i2c_resume_noirq' defined but not used [-Wunused-function]
Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
drivers/i2c/busses/i2c-exynos5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 9fd711c..60601ef 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -715,6 +715,7 @@ static int exynos5_i2c_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
static int exynos5_i2c_suspend_noirq(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -745,6 +746,7 @@ static int exynos5_i2c_resume_noirq(struct device *dev)
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_suspend_noirq,
exynos5_i2c_resume_noirq);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer
[not found] ` <000501cf3cc8$4b7f8d90$e27ea8b0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2014-03-11 1:22 ` Jingoo Han
[not found] ` <000601cf3cc8$70627460$51275d20$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-13 21:20 ` [PATCH 1/2] i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions Wolfram Sang
1 sibling, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-03-11 1:22 UTC (permalink / raw)
To: 'Wolfram Sang'
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, 'Naveen Krishna Ch',
'Taekgyun Ko', 'Jingoo Han'
Remove unnecessary cast of void pointer, because 'algo_data' of
'struct i2c_adapter' is a void pointer. Casting the void pointer
is redundant. The conversion from void pointer to any other
pointer type is guaranteed by the C programming language.
Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
drivers/i2c/busses/i2c-exynos5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 60601ef..00af0a0 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -566,7 +566,7 @@ static int exynos5_i2c_xfer_msg(struct exynos5_i2c *i2c,
static int exynos5_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
- struct exynos5_i2c *i2c = (struct exynos5_i2c *)adap->algo_data;
+ struct exynos5_i2c *i2c = adap->algo_data;
int i = 0, ret = 0, stop = 0;
if (i2c->suspended) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer
[not found] ` <000601cf3cc8$70627460$51275d20$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2014-03-12 17:09 ` Naveen Krishna Ch
2014-03-13 21:21 ` Wolfram Sang
1 sibling, 0 replies; 5+ messages in thread
From: Naveen Krishna Ch @ 2014-03-12 17:09 UTC (permalink / raw)
To: Jingoo Han
Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Naveen Krishna Ch,
Taekgyun Ko
Hello Mr. Han,
On 11 March 2014 10:22, Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> Remove unnecessary cast of void pointer, because 'algo_data' of
> 'struct i2c_adapter' is a void pointer. Casting the void pointer
> is redundant. The conversion from void pointer to any other
> pointer type is guaranteed by the C programming language.
>
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-exynos5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
> index 60601ef..00af0a0 100644
> --- a/drivers/i2c/busses/i2c-exynos5.c
> +++ b/drivers/i2c/busses/i2c-exynos5.c
> @@ -566,7 +566,7 @@ static int exynos5_i2c_xfer_msg(struct exynos5_i2c *i2c,
> static int exynos5_i2c_xfer(struct i2c_adapter *adap,
> struct i2c_msg *msgs, int num)
> {
> - struct exynos5_i2c *i2c = (struct exynos5_i2c *)adap->algo_data;
> + struct exynos5_i2c *i2c = adap->algo_data;
> int i = 0, ret = 0, stop = 0;
>
> if (i2c->suspended) {
> --
> 1.7.10.4
Thanks for the patch.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Shine bright,
(: Nav :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions
[not found] ` <000501cf3cc8$4b7f8d90$e27ea8b0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-11 1:22 ` [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer Jingoo Han
@ 2014-03-13 21:20 ` Wolfram Sang
1 sibling, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2014-03-13 21:20 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, 'Naveen Krishna Ch',
'Taekgyun Ko'
[-- Attachment #1: Type: text/plain, Size: 595 bytes --]
On Tue, Mar 11, 2014 at 10:21:57AM +0900, Jingoo Han wrote:
> Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
> build warning when CONFIG_PM_SLEEP is not selected. This is because
> sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
> the CONFIG_PM_SLEEP is enabled.
>
> warning: 'exynos5_i2c_suspend_noirq' defined but not used [-Wunused-function]
> warning: 'exynos5_i2c_resume_noirq' defined but not used [-Wunused-function]
>
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer
[not found] ` <000601cf3cc8$70627460$51275d20$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-12 17:09 ` Naveen Krishna Ch
@ 2014-03-13 21:21 ` Wolfram Sang
1 sibling, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2014-03-13 21:21 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, 'Naveen Krishna Ch',
'Taekgyun Ko'
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
On Tue, Mar 11, 2014 at 10:22:59AM +0900, Jingoo Han wrote:
> Remove unnecessary cast of void pointer, because 'algo_data' of
> 'struct i2c_adapter' is a void pointer. Casting the void pointer
> is redundant. The conversion from void pointer to any other
> pointer type is guaranteed by the C programming language.
>
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-13 21:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 1:21 [PATCH 1/2] i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions Jingoo Han
[not found] ` <000501cf3cc8$4b7f8d90$e27ea8b0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-11 1:22 ` [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer Jingoo Han
[not found] ` <000601cf3cc8$70627460$51275d20$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-12 17:09 ` Naveen Krishna Ch
2014-03-13 21:21 ` Wolfram Sang
2014-03-13 21:20 ` [PATCH 1/2] i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).