linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parport: make parport_ip32_ops const and __initconst
@ 2017-09-18 16:31 Bhumika Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Bhumika Goyal @ 2017-09-18 16:31 UTC (permalink / raw)
  To: julia.lawall, sudipm.mukherjee, linux-kernel; +Cc: Bhumika Goyal

Make this const as it is only used during a copy operation. This usage
is inside init function and the structure is not referenced after
initialisation, so make it __initconst too.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/parport/parport_ip32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c
index 0186db7..6287307 100644
--- a/drivers/parport/parport_ip32.c
+++ b/drivers/parport/parport_ip32.c
@@ -1769,7 +1769,7 @@ static size_t parport_ip32_ecp_write_data(struct parport *p,
 
 /*--- Default parport operations ---------------------------------------*/
 
-static __initdata struct parport_operations parport_ip32_ops = {
+static const struct parport_operations parport_ip32_ops __initconst = {
 	.write_data		= parport_ip32_write_data,
 	.read_data		= parport_ip32_read_data,
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] parport: make parport_ip32_ops const and __initconst
@ 2017-10-15 21:04 Sudip Mukherjee
  0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2017-10-15 21:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Sudip Mukherjee

From: Bhumika Goyal <bhumirks@gmail.com>

Make this const as it is only used during a copy operation. This usage
is inside init function and the structure is not referenced after
initialisation, so make it __initconst too.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 drivers/parport/parport_ip32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c
index 0186db7..6287307 100644
--- a/drivers/parport/parport_ip32.c
+++ b/drivers/parport/parport_ip32.c
@@ -1769,7 +1769,7 @@ static size_t parport_ip32_ecp_write_data(struct parport *p,
 
 /*--- Default parport operations ---------------------------------------*/
 
-static __initdata struct parport_operations parport_ip32_ops = {
+static const struct parport_operations parport_ip32_ops __initconst = {
 	.write_data		= parport_ip32_write_data,
 	.read_data		= parport_ip32_read_data,
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-15 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-15 21:04 [PATCH] parport: make parport_ip32_ops const and __initconst Sudip Mukherjee
  -- strict thread matches above, loose matches on Subject: below --
2017-09-18 16:31 Bhumika Goyal

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).