* [PATCH] staging: ccree: constify dev_pm_ops structures.
@ 2017-06-29 9:30 Arvind Yadav
2017-06-29 14:17 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Arvind Yadav @ 2017-06-29 9:30 UTC (permalink / raw)
To: gregkh, lkp; +Cc: devel, linux-kernel
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
3800 488 0 4288 10c0 drivers/staging/ccree/ssi_driver.o
File size After adding 'const':
text data bss dec hex filename
4010 288 0 4298 10ca drivers/staging/ccree/ssi_driver.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/staging/ccree/ssi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index bc19adc..27e8f63 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -516,7 +516,7 @@ static int cc7x_remove(struct platform_device *plat_dev)
return 0;
}
#if defined (CONFIG_PM_RUNTIME) || defined (CONFIG_PM_SLEEP)
-static struct dev_pm_ops arm_cc7x_driver_pm = {
+static const struct dev_pm_ops arm_cc7x_driver_pm = {
SET_RUNTIME_PM_OPS(ssi_power_mgr_runtime_suspend, ssi_power_mgr_runtime_resume, NULL)
};
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: ccree: constify dev_pm_ops structures.
2017-06-29 9:30 [PATCH] staging: ccree: constify dev_pm_ops structures Arvind Yadav
@ 2017-06-29 14:17 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2017-06-29 14:17 UTC (permalink / raw)
To: Arvind Yadav; +Cc: lkp, devel, linux-kernel
On Thu, Jun 29, 2017 at 03:00:28PM +0530, Arvind Yadav wrote:
> dev_pm_ops are not supposed to change at runtime. All functions
> working with dev_pm_ops provided by <linux/device.h> work with const
> dev_pm_ops. So mark the non-const structs as const.
>
> File size before:
> text data bss dec hex filename
> 3800 488 0 4288 10c0 drivers/staging/ccree/ssi_driver.o
>
> File size After adding 'const':
> text data bss dec hex filename
> 4010 288 0 4298 10ca drivers/staging/ccree/ssi_driver.o
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/staging/ccree/ssi_driver.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
No longer applies to my staging-testing branch at all due to other
changes happening there. Please rebase and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] staging: ccree: constify dev_pm_ops structures.
@ 2017-08-08 9:23 ` Arvind Yadav
0 siblings, 0 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-08 9:23 UTC (permalink / raw)
To: gilad, gregkh; +Cc: linux-kernel, linux-crypto, driverdev-devel, devel
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/staging/ccree/ssi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index e0faca0..1753906 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -549,7 +549,7 @@ static int cc7x_remove(struct platform_device *plat_dev)
}
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
-static struct dev_pm_ops arm_cc7x_driver_pm = {
+static const struct dev_pm_ops arm_cc7x_driver_pm = {
SET_RUNTIME_PM_OPS(ssi_power_mgr_runtime_suspend, ssi_power_mgr_runtime_resume, NULL)
};
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] staging: ccree: constify dev_pm_ops structures.
@ 2017-08-08 9:23 ` Arvind Yadav
0 siblings, 0 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-08 9:23 UTC (permalink / raw)
To: gilad, gregkh; +Cc: devel, driverdev-devel, linux-kernel, linux-crypto
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/staging/ccree/ssi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index e0faca0..1753906 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -549,7 +549,7 @@ static int cc7x_remove(struct platform_device *plat_dev)
}
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
-static struct dev_pm_ops arm_cc7x_driver_pm = {
+static const struct dev_pm_ops arm_cc7x_driver_pm = {
SET_RUNTIME_PM_OPS(ssi_power_mgr_runtime_suspend, ssi_power_mgr_runtime_resume, NULL)
};
#endif
--
1.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-08 9:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 9:30 [PATCH] staging: ccree: constify dev_pm_ops structures Arvind Yadav
2017-06-29 14:17 ` Greg KH
2017-08-08 9:23 Arvind Yadav
2017-08-08 9:23 ` Arvind Yadav
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.