All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] constify uart_ops structures
@ 2016-09-01 17:51 ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel-janitors, linux-serial, Jiri Slaby, Greg Kroah-Hartman,
	linux-arm-kernel, kernel, Sören Brinkmann, linux-snps-arc

Constify uart_ops structures.

---

 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 drivers/tty/serial/arc_uart.c        |    2 +-
 drivers/tty/serial/atmel_serial.c    |    2 +-
 drivers/tty/serial/bcm63xx_uart.c    |    2 +-
 drivers/tty/serial/fsl_lpuart.c      |    4 ++--
 drivers/tty/serial/imx.c             |    2 +-
 drivers/tty/serial/jsm/jsm_tty.c     |    2 +-
 drivers/tty/serial/max3100.c         |    2 +-
 drivers/tty/serial/men_z135_uart.c   |    2 +-
 drivers/tty/serial/mxs-auart.c       |    2 +-
 drivers/tty/serial/pch_uart.c        |    2 +-
 drivers/tty/serial/sh-sci.c          |    2 +-
 drivers/tty/serial/st-asc.c          |    2 +-
 drivers/tty/serial/timbuart.c        |    2 +-
 drivers/tty/serial/uartlite.c        |    2 +-
 drivers/tty/serial/xilinx_uartps.c   |    2 +-
 17 files changed, 18 insertions(+), 18 deletions(-)

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

* [PATCH 0/9] constify uart_ops structures
@ 2016-09-01 17:51 ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Constify uart_ops structures.

---

 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 drivers/tty/serial/arc_uart.c        |    2 +-
 drivers/tty/serial/atmel_serial.c    |    2 +-
 drivers/tty/serial/bcm63xx_uart.c    |    2 +-
 drivers/tty/serial/fsl_lpuart.c      |    4 ++--
 drivers/tty/serial/imx.c             |    2 +-
 drivers/tty/serial/jsm/jsm_tty.c     |    2 +-
 drivers/tty/serial/max3100.c         |    2 +-
 drivers/tty/serial/men_z135_uart.c   |    2 +-
 drivers/tty/serial/mxs-auart.c       |    2 +-
 drivers/tty/serial/pch_uart.c        |    2 +-
 drivers/tty/serial/sh-sci.c          |    2 +-
 drivers/tty/serial/st-asc.c          |    2 +-
 drivers/tty/serial/timbuart.c        |    2 +-
 drivers/tty/serial/uartlite.c        |    2 +-
 drivers/tty/serial/xilinx_uartps.c   |    2 +-
 17 files changed, 18 insertions(+), 18 deletions(-)

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

* [PATCH 0/9] constify uart_ops structures
@ 2016-09-01 17:51 ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel, Greg Kroah-Hartman, kernel-janitors,
	Sören Brinkmann, linux-serial, Jiri Slaby, linux-snps-arc,
	linux-arm-kernel

Constify uart_ops structures.

---

 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 drivers/tty/serial/arc_uart.c        |    2 +-
 drivers/tty/serial/atmel_serial.c    |    2 +-
 drivers/tty/serial/bcm63xx_uart.c    |    2 +-
 drivers/tty/serial/fsl_lpuart.c      |    4 ++--
 drivers/tty/serial/imx.c             |    2 +-
 drivers/tty/serial/jsm/jsm_tty.c     |    2 +-
 drivers/tty/serial/max3100.c         |    2 +-
 drivers/tty/serial/men_z135_uart.c   |    2 +-
 drivers/tty/serial/mxs-auart.c       |    2 +-
 drivers/tty/serial/pch_uart.c        |    2 +-
 drivers/tty/serial/sh-sci.c          |    2 +-
 drivers/tty/serial/st-asc.c          |    2 +-
 drivers/tty/serial/timbuart.c        |    2 +-
 drivers/tty/serial/uartlite.c        |    2 +-
 drivers/tty/serial/xilinx_uartps.c   |    2 +-
 17 files changed, 18 insertions(+), 18 deletions(-)

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

* [PATCH 0/9] constify uart_ops structures
@ 2016-09-01 17:51 ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-snps-arc

Constify uart_ops structures.

---

 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 drivers/tty/serial/arc_uart.c        |    2 +-
 drivers/tty/serial/atmel_serial.c    |    2 +-
 drivers/tty/serial/bcm63xx_uart.c    |    2 +-
 drivers/tty/serial/fsl_lpuart.c      |    4 ++--
 drivers/tty/serial/imx.c             |    2 +-
 drivers/tty/serial/jsm/jsm_tty.c     |    2 +-
 drivers/tty/serial/max3100.c         |    2 +-
 drivers/tty/serial/men_z135_uart.c   |    2 +-
 drivers/tty/serial/mxs-auart.c       |    2 +-
 drivers/tty/serial/pch_uart.c        |    2 +-
 drivers/tty/serial/sh-sci.c          |    2 +-
 drivers/tty/serial/st-asc.c          |    2 +-
 drivers/tty/serial/timbuart.c        |    2 +-
 drivers/tty/serial/uartlite.c        |    2 +-
 drivers/tty/serial/xilinx_uartps.c   |    2 +-
 17 files changed, 18 insertions(+), 18 deletions(-)

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

* [PATCH 0/9] constify uart_ops structures
@ 2016-09-01 17:51 ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Constify uart_ops structures.

---

 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 drivers/tty/serial/arc_uart.c        |    2 +-
 drivers/tty/serial/atmel_serial.c    |    2 +-
 drivers/tty/serial/bcm63xx_uart.c    |    2 +-
 drivers/tty/serial/fsl_lpuart.c      |    4 ++--
 drivers/tty/serial/imx.c             |    2 +-
 drivers/tty/serial/jsm/jsm_tty.c     |    2 +-
 drivers/tty/serial/max3100.c         |    2 +-
 drivers/tty/serial/men_z135_uart.c   |    2 +-
 drivers/tty/serial/mxs-auart.c       |    2 +-
 drivers/tty/serial/pch_uart.c        |    2 +-
 drivers/tty/serial/sh-sci.c          |    2 +-
 drivers/tty/serial/st-asc.c          |    2 +-
 drivers/tty/serial/timbuart.c        |    2 +-
 drivers/tty/serial/uartlite.c        |    2 +-
 drivers/tty/serial/xilinx_uartps.c   |    2 +-
 17 files changed, 18 insertions(+), 18 deletions(-)

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

* [PATCH 1/9] serial: st-asc: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
  (?)
  (?)
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby,
	linux-arm-kernel, kernel, linux-serial, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/st-asc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 2d78cb3..379e5bd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -639,7 +639,7 @@ static void asc_put_poll_char(struct uart_port *port, unsigned char c)
 
 /*---------------------------------------------------------------------*/
 
-static struct uart_ops asc_uart_ops = {
+static const struct uart_ops asc_uart_ops = {
 	.tx_empty	= asc_tx_empty,
 	.set_mctrl	= asc_set_mctrl,
 	.get_mctrl	= asc_get_mctrl,

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

* [PATCH 1/9] serial: st-asc: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/st-asc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 2d78cb3..379e5bd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -639,7 +639,7 @@ static void asc_put_poll_char(struct uart_port *port, unsigned char c)
 
 /*---------------------------------------------------------------------*/
 
-static struct uart_ops asc_uart_ops = {
+static const struct uart_ops asc_uart_ops = {
 	.tx_empty	= asc_tx_empty,
 	.set_mctrl	= asc_set_mctrl,
 	.get_mctrl	= asc_get_mctrl,


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

* [PATCH 1/9] serial: st-asc: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: kernel, Greg Kroah-Hartman, kernel-janitors, linux-kernel,
	linux-serial, Jiri Slaby, linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/st-asc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 2d78cb3..379e5bd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -639,7 +639,7 @@ static void asc_put_poll_char(struct uart_port *port, unsigned char c)
 
 /*---------------------------------------------------------------------*/
 
-static struct uart_ops asc_uart_ops = {
+static const struct uart_ops asc_uart_ops = {
 	.tx_empty	= asc_tx_empty,
 	.set_mctrl	= asc_set_mctrl,
 	.get_mctrl	= asc_get_mctrl,

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

* [PATCH 1/9] serial: st-asc: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i at p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i at p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/st-asc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 2d78cb3..379e5bd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -639,7 +639,7 @@ static void asc_put_poll_char(struct uart_port *port, unsigned char c)
 
 /*---------------------------------------------------------------------*/
 
-static struct uart_ops asc_uart_ops = {
+static const struct uart_ops asc_uart_ops = {
 	.tx_empty	= asc_tx_empty,
 	.set_mctrl	= asc_set_mctrl,
 	.get_mctrl	= asc_get_mctrl,

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

* [PATCH 2/9] tty/serial: at91: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/atmel_serial.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 2eaa18d..963a72f 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2292,7 +2292,7 @@ static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
 }
 #endif
 
-static struct uart_ops atmel_pops = {
+static const struct uart_ops atmel_pops = {
 	.tx_empty	= atmel_tx_empty,
 	.set_mctrl	= atmel_set_mctrl,
 	.get_mctrl	= atmel_get_mctrl,

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

* [PATCH 2/9] tty/serial: at91: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/atmel_serial.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 2eaa18d..963a72f 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2292,7 +2292,7 @@ static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
 }
 #endif
 
-static struct uart_ops atmel_pops = {
+static const struct uart_ops atmel_pops = {
 	.tx_empty	= atmel_tx_empty,
 	.set_mctrl	= atmel_set_mctrl,
 	.get_mctrl	= atmel_get_mctrl,


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

* [PATCH 3/9] serial: altera: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	nios2-dev, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 32df2a0..e409d7d 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -280,7 +280,7 @@ static int altera_jtaguart_verify_port(struct uart_port *port,
 /*
  *	Define the basic serial functions we support.
  */
-static struct uart_ops altera_jtaguart_ops = {
+static const struct uart_ops altera_jtaguart_ops = {
 	.tx_empty	= altera_jtaguart_tx_empty,
 	.get_mctrl	= altera_jtaguart_get_mctrl,
 	.set_mctrl	= altera_jtaguart_set_mctrl,
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 61b607f..820a742 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -404,7 +404,7 @@ static void altera_uart_poll_put_char(struct uart_port *port, unsigned char c)
 /*
  *	Define the basic serial functions we support.
  */
-static struct uart_ops altera_uart_ops = {
+static const struct uart_ops altera_uart_ops = {
 	.tx_empty	= altera_uart_tx_empty,
 	.get_mctrl	= altera_uart_get_mctrl,
 	.set_mctrl	= altera_uart_set_mctrl,

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

* [PATCH 3/9] serial: altera: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	nios2-dev, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 32df2a0..e409d7d 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -280,7 +280,7 @@ static int altera_jtaguart_verify_port(struct uart_port *port,
 /*
  *	Define the basic serial functions we support.
  */
-static struct uart_ops altera_jtaguart_ops = {
+static const struct uart_ops altera_jtaguart_ops = {
 	.tx_empty	= altera_jtaguart_tx_empty,
 	.get_mctrl	= altera_jtaguart_get_mctrl,
 	.set_mctrl	= altera_jtaguart_set_mctrl,
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 61b607f..820a742 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -404,7 +404,7 @@ static void altera_uart_poll_put_char(struct uart_port *port, unsigned char c)
 /*
  *	Define the basic serial functions we support.
  */
-static struct uart_ops altera_uart_ops = {
+static const struct uart_ops altera_uart_ops = {
 	.tx_empty	= altera_uart_tx_empty,
 	.get_mctrl	= altera_uart_get_mctrl,
 	.set_mctrl	= altera_uart_set_mctrl,


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

* [PATCH 4/9] serial/bcm63xx_uart: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
  (?)
  (?)
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, Florian Fainelli,
	bcm-kernel-feedback-list, linux-serial, linux-arm-kernel,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/bcm63xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 5108fab..583c9a0 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -631,7 +631,7 @@ static int bcm_uart_verify_port(struct uart_port *port,
 }
 
 /* serial core callbacks */
-static struct uart_ops bcm_uart_ops = {
+static const struct uart_ops bcm_uart_ops = {
 	.tx_empty	= bcm_uart_tx_empty,
 	.get_mctrl	= bcm_uart_get_mctrl,
 	.set_mctrl	= bcm_uart_set_mctrl,

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

* [PATCH 4/9] serial/bcm63xx_uart: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/bcm63xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 5108fab..583c9a0 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -631,7 +631,7 @@ static int bcm_uart_verify_port(struct uart_port *port,
 }
 
 /* serial core callbacks */
-static struct uart_ops bcm_uart_ops = {
+static const struct uart_ops bcm_uart_ops = {
 	.tx_empty	= bcm_uart_tx_empty,
 	.get_mctrl	= bcm_uart_get_mctrl,
 	.set_mctrl	= bcm_uart_set_mctrl,


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

* [PATCH 4/9] serial/bcm63xx_uart: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Florian Fainelli, kernel-janitors, linux-kernel,
	bcm-kernel-feedback-list, linux-serial, Jiri Slaby,
	linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/bcm63xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 5108fab..583c9a0 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -631,7 +631,7 @@ static int bcm_uart_verify_port(struct uart_port *port,
 }
 
 /* serial core callbacks */
-static struct uart_ops bcm_uart_ops = {
+static const struct uart_ops bcm_uart_ops = {
 	.tx_empty	= bcm_uart_tx_empty,
 	.get_mctrl	= bcm_uart_get_mctrl,
 	.set_mctrl	= bcm_uart_set_mctrl,

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

* [PATCH 4/9] serial/bcm63xx_uart: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i at p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i at p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/bcm63xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 5108fab..583c9a0 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -631,7 +631,7 @@ static int bcm_uart_verify_port(struct uart_port *port,
 }
 
 /* serial core callbacks */
-static struct uart_ops bcm_uart_ops = {
+static const struct uart_ops bcm_uart_ops = {
 	.tx_empty	= bcm_uart_tx_empty,
 	.get_mctrl	= bcm_uart_get_mctrl,
 	.set_mctrl	= bcm_uart_set_mctrl,

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

* [PATCH 5/9] tty: serial: jsm_tty: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/jsm/jsm_tty.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index c5ddfe5..ec7d838 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -346,7 +346,7 @@ static void jsm_config_port(struct uart_port *port, int flags)
 	port->type = PORT_JSM;
 }
 
-static struct uart_ops jsm_ops = {
+static const struct uart_ops jsm_ops = {
 	.tx_empty	= jsm_tty_tx_empty,
 	.set_mctrl	= jsm_tty_set_mctrl,
 	.get_mctrl	= jsm_tty_get_mctrl,

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

* [PATCH 5/9] tty: serial: jsm_tty: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/jsm/jsm_tty.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index c5ddfe5..ec7d838 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -346,7 +346,7 @@ static void jsm_config_port(struct uart_port *port, int flags)
 	port->type = PORT_JSM;
 }
 
-static struct uart_ops jsm_ops = {
+static const struct uart_ops jsm_ops = {
 	.tx_empty	= jsm_tty_tx_empty,
 	.set_mctrl	= jsm_tty_set_mctrl,
 	.get_mctrl	= jsm_tty_get_mctrl,


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

* [PATCH 6/9] tty: serial: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/fsl_lpuart.c    |    4 ++--
 drivers/tty/serial/imx.c           |    2 +-
 drivers/tty/serial/max3100.c       |    2 +-
 drivers/tty/serial/men_z135_uart.c |    2 +-
 drivers/tty/serial/mxs-auart.c     |    2 +-
 drivers/tty/serial/pch_uart.c      |    2 +-
 drivers/tty/serial/sh-sci.c        |    2 +-
 drivers/tty/serial/timbuart.c      |    2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 7f95f78..55e5e21 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1494,7 +1494,7 @@ static int lpuart_verify_port(struct uart_port *port, struct serial_struct *ser)
 	return ret;
 }
 
-static struct uart_ops lpuart_pops = {
+static const struct uart_ops lpuart_pops = {
 	.tx_empty	= lpuart_tx_empty,
 	.set_mctrl	= lpuart_set_mctrl,
 	.get_mctrl	= lpuart_get_mctrl,
@@ -1513,7 +1513,7 @@ static struct uart_ops lpuart_pops = {
 	.flush_buffer	= lpuart_flush_buffer,
 };
 
-static struct uart_ops lpuart32_pops = {
+static const struct uart_ops lpuart32_pops = {
 	.tx_empty	= lpuart32_tx_empty,
 	.set_mctrl	= lpuart32_set_mctrl,
 	.get_mctrl	= lpuart32_get_mctrl,
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 0df2b1c..9bbf2a4 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1690,7 +1690,7 @@ static int imx_rs485_config(struct uart_port *port,
 	return 0;
 }
 
-static struct uart_ops imx_pops = {
+static const struct uart_ops imx_pops = {
 	.tx_empty	= imx_tx_empty,
 	.set_mctrl	= imx_set_mctrl,
 	.get_mctrl	= imx_get_mctrl,
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 5c4c280..ace8264 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -712,7 +712,7 @@ static void max3100_break_ctl(struct uart_port *port, int break_state)
 	dev_dbg(&s->spi->dev, "%s\n", __func__);
 }
 
-static struct uart_ops max3100_ops = {
+static const struct uart_ops max3100_ops = {
 	.tx_empty	= max3100_tx_empty,
 	.set_mctrl	= max3100_set_mctrl,
 	.get_mctrl	= max3100_get_mctrl,
diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c
index a44290e..e72ea61 100644
--- a/drivers/tty/serial/men_z135_uart.c
+++ b/drivers/tty/serial/men_z135_uart.c
@@ -775,7 +775,7 @@ static int men_z135_verify_port(struct uart_port *port,
 	return -EINVAL;
 }
 
-static struct uart_ops men_z135_ops = {
+static const struct uart_ops men_z135_ops = {
 	.tx_empty = men_z135_tx_empty,
 	.set_mctrl = men_z135_set_mctrl,
 	.get_mctrl = men_z135_get_mctrl,
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index eb54e5c..2f04ec2 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1317,7 +1317,7 @@ static void mxs_auart_break_ctl(struct uart_port *u, int ctl)
 		mxs_clr(AUART_LINECTRL_BRK, s, REG_LINECTRL);
 }
 
-static struct uart_ops mxs_auart_ops = {
+static const struct uart_ops mxs_auart_ops = {
 	.tx_empty       = mxs_auart_tx_empty,
 	.start_tx       = mxs_auart_start_tx,
 	.stop_tx	= mxs_auart_stop_tx,
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index ea4ffc2..b5874d1 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -1603,7 +1603,7 @@ static void pch_uart_put_poll_char(struct uart_port *port,
 }
 #endif /* CONFIG_CONSOLE_POLL */
 
-static struct uart_ops pch_uart_ops = {
+static const struct uart_ops pch_uart_ops = {
 	.tx_empty = pch_uart_tx_empty,
 	.set_mctrl = pch_uart_set_mctrl,
 	.get_mctrl = pch_uart_get_mctrl,
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index d86eee3..4b26252 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2533,7 +2533,7 @@ static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)
 	return 0;
 }
 
-static struct uart_ops sci_uart_ops = {
+static const struct uart_ops sci_uart_ops = {
 	.tx_empty	= sci_tx_empty,
 	.set_mctrl	= sci_set_mctrl,
 	.get_mctrl	= sci_get_mctrl,
diff --git a/drivers/tty/serial/timbuart.c b/drivers/tty/serial/timbuart.c
index 512c162..5da7fe4 100644
--- a/drivers/tty/serial/timbuart.c
+++ b/drivers/tty/serial/timbuart.c
@@ -394,7 +394,7 @@ static int timbuart_verify_port(struct uart_port *port,
 	return -EINVAL;
 }
 
-static struct uart_ops timbuart_ops = {
+static const struct uart_ops timbuart_ops = {
 	.tx_empty = timbuart_tx_empty,
 	.set_mctrl = timbuart_set_mctrl,
 	.get_mctrl = timbuart_get_mctrl,

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

* [PATCH 6/9] tty: serial: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, linux-serial, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/fsl_lpuart.c    |    4 ++--
 drivers/tty/serial/imx.c           |    2 +-
 drivers/tty/serial/max3100.c       |    2 +-
 drivers/tty/serial/men_z135_uart.c |    2 +-
 drivers/tty/serial/mxs-auart.c     |    2 +-
 drivers/tty/serial/pch_uart.c      |    2 +-
 drivers/tty/serial/sh-sci.c        |    2 +-
 drivers/tty/serial/timbuart.c      |    2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 7f95f78..55e5e21 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1494,7 +1494,7 @@ static int lpuart_verify_port(struct uart_port *port, struct serial_struct *ser)
 	return ret;
 }
 
-static struct uart_ops lpuart_pops = {
+static const struct uart_ops lpuart_pops = {
 	.tx_empty	= lpuart_tx_empty,
 	.set_mctrl	= lpuart_set_mctrl,
 	.get_mctrl	= lpuart_get_mctrl,
@@ -1513,7 +1513,7 @@ static struct uart_ops lpuart_pops = {
 	.flush_buffer	= lpuart_flush_buffer,
 };
 
-static struct uart_ops lpuart32_pops = {
+static const struct uart_ops lpuart32_pops = {
 	.tx_empty	= lpuart32_tx_empty,
 	.set_mctrl	= lpuart32_set_mctrl,
 	.get_mctrl	= lpuart32_get_mctrl,
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 0df2b1c..9bbf2a4 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1690,7 +1690,7 @@ static int imx_rs485_config(struct uart_port *port,
 	return 0;
 }
 
-static struct uart_ops imx_pops = {
+static const struct uart_ops imx_pops = {
 	.tx_empty	= imx_tx_empty,
 	.set_mctrl	= imx_set_mctrl,
 	.get_mctrl	= imx_get_mctrl,
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 5c4c280..ace8264 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -712,7 +712,7 @@ static void max3100_break_ctl(struct uart_port *port, int break_state)
 	dev_dbg(&s->spi->dev, "%s\n", __func__);
 }
 
-static struct uart_ops max3100_ops = {
+static const struct uart_ops max3100_ops = {
 	.tx_empty	= max3100_tx_empty,
 	.set_mctrl	= max3100_set_mctrl,
 	.get_mctrl	= max3100_get_mctrl,
diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c
index a44290e..e72ea61 100644
--- a/drivers/tty/serial/men_z135_uart.c
+++ b/drivers/tty/serial/men_z135_uart.c
@@ -775,7 +775,7 @@ static int men_z135_verify_port(struct uart_port *port,
 	return -EINVAL;
 }
 
-static struct uart_ops men_z135_ops = {
+static const struct uart_ops men_z135_ops = {
 	.tx_empty = men_z135_tx_empty,
 	.set_mctrl = men_z135_set_mctrl,
 	.get_mctrl = men_z135_get_mctrl,
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index eb54e5c..2f04ec2 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1317,7 +1317,7 @@ static void mxs_auart_break_ctl(struct uart_port *u, int ctl)
 		mxs_clr(AUART_LINECTRL_BRK, s, REG_LINECTRL);
 }
 
-static struct uart_ops mxs_auart_ops = {
+static const struct uart_ops mxs_auart_ops = {
 	.tx_empty       = mxs_auart_tx_empty,
 	.start_tx       = mxs_auart_start_tx,
 	.stop_tx	= mxs_auart_stop_tx,
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index ea4ffc2..b5874d1 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -1603,7 +1603,7 @@ static void pch_uart_put_poll_char(struct uart_port *port,
 }
 #endif /* CONFIG_CONSOLE_POLL */
 
-static struct uart_ops pch_uart_ops = {
+static const struct uart_ops pch_uart_ops = {
 	.tx_empty = pch_uart_tx_empty,
 	.set_mctrl = pch_uart_set_mctrl,
 	.get_mctrl = pch_uart_get_mctrl,
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index d86eee3..4b26252 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2533,7 +2533,7 @@ static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)
 	return 0;
 }
 
-static struct uart_ops sci_uart_ops = {
+static const struct uart_ops sci_uart_ops = {
 	.tx_empty	= sci_tx_empty,
 	.set_mctrl	= sci_set_mctrl,
 	.get_mctrl	= sci_get_mctrl,
diff --git a/drivers/tty/serial/timbuart.c b/drivers/tty/serial/timbuart.c
index 512c162..5da7fe4 100644
--- a/drivers/tty/serial/timbuart.c
+++ b/drivers/tty/serial/timbuart.c
@@ -394,7 +394,7 @@ static int timbuart_verify_port(struct uart_port *port,
 	return -EINVAL;
 }
 
-static struct uart_ops timbuart_ops = {
+static const struct uart_ops timbuart_ops = {
 	.tx_empty = timbuart_tx_empty,
 	.set_mctrl = timbuart_set_mctrl,
 	.get_mctrl = timbuart_get_mctrl,


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

* [PATCH 7/9] tty: xuartps: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
  (?)
  (?)
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Jiri Slaby, Michal Simek, Sören Brinkmann,
	linux-serial, linux-arm-kernel, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/xilinx_uartps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 9ca1a4d..11a2b36 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -993,7 +993,7 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
 	}
 }
 
-static struct uart_ops cdns_uart_ops = {
+static const struct uart_ops cdns_uart_ops = {
 	.set_mctrl	= cdns_uart_set_mctrl,
 	.get_mctrl	= cdns_uart_get_mctrl,
 	.start_tx	= cdns_uart_start_tx,

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

* [PATCH 7/9] tty: xuartps: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/xilinx_uartps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 9ca1a4d..11a2b36 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -993,7 +993,7 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
 	}
 }
 
-static struct uart_ops cdns_uart_ops = {
+static const struct uart_ops cdns_uart_ops = {
 	.set_mctrl	= cdns_uart_set_mctrl,
 	.get_mctrl	= cdns_uart_get_mctrl,
 	.start_tx	= cdns_uart_start_tx,


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

* [PATCH 7/9] tty: xuartps: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel-janitors, Michal Simek, linux-kernel,
	Sören Brinkmann, linux-serial, Jiri Slaby, linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/xilinx_uartps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 9ca1a4d..11a2b36 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -993,7 +993,7 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
 	}
 }
 
-static struct uart_ops cdns_uart_ops = {
+static const struct uart_ops cdns_uart_ops = {
 	.set_mctrl	= cdns_uart_set_mctrl,
 	.get_mctrl	= cdns_uart_get_mctrl,
 	.start_tx	= cdns_uart_start_tx,

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

* [PATCH 7/9] tty: xuartps: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i at p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i at p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/xilinx_uartps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 9ca1a4d..11a2b36 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -993,7 +993,7 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
 	}
 }
 
-static struct uart_ops cdns_uart_ops = {
+static const struct uart_ops cdns_uart_ops = {
 	.set_mctrl	= cdns_uart_set_mctrl,
 	.get_mctrl	= cdns_uart_get_mctrl,
 	.start_tx	= cdns_uart_start_tx,

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

* [PATCH 8/9] serial-uartlite: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Peter Korsgaard
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/uartlite.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 05089b6..817bb0d 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -387,7 +387,7 @@ static void ulite_put_poll_char(struct uart_port *port, unsigned char ch)
 }
 #endif
 
-static struct uart_ops ulite_ops = {
+static const struct uart_ops ulite_ops = {
 	.tx_empty	= ulite_tx_empty,
 	.set_mctrl	= ulite_set_mctrl,
 	.get_mctrl	= ulite_get_mctrl,

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

* [PATCH 8/9] serial-uartlite: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Peter Korsgaard
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/uartlite.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 05089b6..817bb0d 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -387,7 +387,7 @@ static void ulite_put_poll_char(struct uart_port *port, unsigned char ch)
 }
 #endif
 
-static struct uart_ops ulite_ops = {
+static const struct uart_ops ulite_ops = {
 	.tx_empty	= ulite_tx_empty,
 	.set_mctrl	= ulite_set_mctrl,
 	.get_mctrl	= ulite_get_mctrl,


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

* [PATCH 9/9] serial/arc: constify uart_ops structures
  2016-09-01 17:51 ` Julia Lawall
  (?)
  (?)
@ 2016-09-01 17:51   ` Julia Lawall
  -1 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-snps-arc,
	linux-serial, linux-kernel

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/arc_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 3a1de5c..5ac06fc 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
 }
 #endif
 
-static struct uart_ops arc_serial_pops = {
+static const struct uart_ops arc_serial_pops = {
 	.tx_empty	= arc_serial_tx_empty,
 	.set_mctrl	= arc_serial_set_mctrl,
 	.get_mctrl	= arc_serial_get_mctrl,

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

* [PATCH 9/9] serial/arc: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: Greg Kroah-Hartman, kernel-janitors, linux-kernel, linux-serial,
	Jiri Slaby, linux-snps-arc

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/arc_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 3a1de5c..5ac06fc 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
 }
 #endif
 
-static struct uart_ops arc_serial_pops = {
+static const struct uart_ops arc_serial_pops = {
 	.tx_empty	= arc_serial_tx_empty,
 	.set_mctrl	= arc_serial_set_mctrl,
 	.get_mctrl	= arc_serial_get_mctrl,


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

* [PATCH 9/9] serial/arc: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: Greg Kroah-Hartman, kernel-janitors, linux-kernel, linux-serial,
	Jiri Slaby, linux-snps-arc

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/arc_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 3a1de5c..5ac06fc 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
 }
 #endif
 
-static struct uart_ops arc_serial_pops = {
+static const struct uart_ops arc_serial_pops = {
 	.tx_empty	= arc_serial_tx_empty,
 	.set_mctrl	= arc_serial_set_mctrl,
 	.get_mctrl	= arc_serial_get_mctrl,

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

* [PATCH 9/9] serial/arc: constify uart_ops structures
@ 2016-09-01 17:51   ` Julia Lawall
  0 siblings, 0 replies; 46+ messages in thread
From: Julia Lawall @ 2016-09-01 17:51 UTC (permalink / raw)
  To: linux-snps-arc

Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i at p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i at p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall at lip6.fr>

---
 drivers/tty/serial/arc_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 3a1de5c..5ac06fc 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
 }
 #endif
 
-static struct uart_ops arc_serial_pops = {
+static const struct uart_ops arc_serial_pops = {
 	.tx_empty	= arc_serial_tx_empty,
 	.set_mctrl	= arc_serial_set_mctrl,
 	.get_mctrl	= arc_serial_get_mctrl,

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

* Re: [PATCH 9/9] serial/arc: constify uart_ops structures
  2016-09-01 17:51   ` Julia Lawall
  (?)
  (?)
@ 2016-09-01 18:49     ` Vineet Gupta
  -1 siblings, 0 replies; 46+ messages in thread
From: Vineet Gupta @ 2016-09-01 18:49 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Greg Kroah-Hartman, kernel-janitors, linux-kernel, linux-serial,
	Jiri Slaby, linux-snps-arc

On 09/01/2016 10:51 AM, Julia Lawall wrote:
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Vineet Gupta <vgupta@synopsys.com>

Thx for making it better Julia !
-Vineet

> 
> ---
>  drivers/tty/serial/arc_uart.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
> index 3a1de5c..5ac06fc 100644
> --- a/drivers/tty/serial/arc_uart.c
> +++ b/drivers/tty/serial/arc_uart.c
> @@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
>  }
>  #endif
>  
> -static struct uart_ops arc_serial_pops = {
> +static const struct uart_ops arc_serial_pops = {
>  	.tx_empty	= arc_serial_tx_empty,
>  	.set_mctrl	= arc_serial_set_mctrl,
>  	.get_mctrl	= arc_serial_get_mctrl,
> 

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

* Re: [PATCH 9/9] serial/arc: constify uart_ops structures
@ 2016-09-01 18:49     ` Vineet Gupta
  0 siblings, 0 replies; 46+ messages in thread
From: Vineet Gupta @ 2016-09-01 18:49 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Greg Kroah-Hartman, kernel-janitors, linux-kernel, linux-serial,
	Jiri Slaby, linux-snps-arc

On 09/01/2016 10:51 AM, Julia Lawall wrote:
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Vineet Gupta <vgupta@synopsys.com>

Thx for making it better Julia !
-Vineet

> 
> ---
>  drivers/tty/serial/arc_uart.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
> index 3a1de5c..5ac06fc 100644
> --- a/drivers/tty/serial/arc_uart.c
> +++ b/drivers/tty/serial/arc_uart.c
> @@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
>  }
>  #endif
>  
> -static struct uart_ops arc_serial_pops = {
> +static const struct uart_ops arc_serial_pops = {
>  	.tx_empty	= arc_serial_tx_empty,
>  	.set_mctrl	= arc_serial_set_mctrl,
>  	.get_mctrl	= arc_serial_get_mctrl,
> 


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

* Re: [PATCH 9/9] serial/arc: constify uart_ops structures
@ 2016-09-01 18:49     ` Vineet Gupta
  0 siblings, 0 replies; 46+ messages in thread
From: Vineet Gupta @ 2016-09-01 18:49 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Greg Kroah-Hartman, kernel-janitors, linux-kernel, linux-serial,
	Jiri Slaby, linux-snps-arc

On 09/01/2016 10:51 AM, Julia Lawall wrote:
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Vineet Gupta <vgupta@synopsys.com>

Thx for making it better Julia !
-Vineet

> 
> ---
>  drivers/tty/serial/arc_uart.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
> index 3a1de5c..5ac06fc 100644
> --- a/drivers/tty/serial/arc_uart.c
> +++ b/drivers/tty/serial/arc_uart.c
> @@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
>  }
>  #endif
>  
> -static struct uart_ops arc_serial_pops = {
> +static const struct uart_ops arc_serial_pops = {
>  	.tx_empty	= arc_serial_tx_empty,
>  	.set_mctrl	= arc_serial_set_mctrl,
>  	.get_mctrl	= arc_serial_get_mctrl,
> 

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

* [PATCH 9/9] serial/arc: constify uart_ops structures
@ 2016-09-01 18:49     ` Vineet Gupta
  0 siblings, 0 replies; 46+ messages in thread
From: Vineet Gupta @ 2016-09-01 18:49 UTC (permalink / raw)
  To: linux-snps-arc

On 09/01/2016 10:51 AM, Julia Lawall wrote:
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i at p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i at p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e at i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall at lip6.fr>

Acked-by: Vineet Gupta <vgupta at synopsys.com>

Thx for making it better Julia !
-Vineet

> 
> ---
>  drivers/tty/serial/arc_uart.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
> index 3a1de5c..5ac06fc 100644
> --- a/drivers/tty/serial/arc_uart.c
> +++ b/drivers/tty/serial/arc_uart.c
> @@ -464,7 +464,7 @@ static int arc_serial_poll_getchar(struct uart_port *port)
>  }
>  #endif
>  
> -static struct uart_ops arc_serial_pops = {
> +static const struct uart_ops arc_serial_pops = {
>  	.tx_empty	= arc_serial_tx_empty,
>  	.set_mctrl	= arc_serial_set_mctrl,
>  	.get_mctrl	= arc_serial_get_mctrl,
> 

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

* Re: [STLinux Kernel] [PATCH 1/9] serial: st-asc: constify uart_ops structures
  2016-09-01 17:51   ` Julia Lawall
  (?)
  (?)
@ 2016-09-01 19:55     ` Peter Griffin
  -1 siblings, 0 replies; 46+ messages in thread
From: Peter Griffin @ 2016-09-01 19:55 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Patrice Chotard, kernel, Greg Kroah-Hartman, kernel-janitors,
	linux-kernel, linux-serial, Jiri Slaby, linux-arm-kernel

On Thu, 01 Sep 2016, Julia Lawall wrote:

> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.

Acked-by: Peter Griffin <peter.griffin@linaro.org>

regards,

Peter.

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

* Re: [STLinux Kernel] [PATCH 1/9] serial: st-asc: constify uart_ops structures
@ 2016-09-01 19:55     ` Peter Griffin
  0 siblings, 0 replies; 46+ messages in thread
From: Peter Griffin @ 2016-09-01 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 01 Sep 2016, Julia Lawall wrote:

> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.

Acked-by: Peter Griffin <peter.griffin@linaro.org>

regards,

Peter.

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

* Re: [STLinux Kernel] [PATCH 1/9] serial: st-asc: constify uart_ops structures
@ 2016-09-01 19:55     ` Peter Griffin
  0 siblings, 0 replies; 46+ messages in thread
From: Peter Griffin @ 2016-09-01 19:55 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel, Greg Kroah-Hartman, kernel-janitors, Patrice Chotard,
	linux-kernel, linux-serial, Jiri Slaby, linux-arm-kernel

On Thu, 01 Sep 2016, Julia Lawall wrote:

> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.

Acked-by: Peter Griffin <peter.griffin@linaro.org>

regards,

Peter.

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

* [STLinux Kernel] [PATCH 1/9] serial: st-asc: constify uart_ops structures
@ 2016-09-01 19:55     ` Peter Griffin
  0 siblings, 0 replies; 46+ messages in thread
From: Peter Griffin @ 2016-09-01 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 01 Sep 2016, Julia Lawall wrote:

> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.

Acked-by: Peter Griffin <peter.griffin@linaro.org>

regards,

Peter.

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

* Re: [PATCH 5/9] tty: serial: jsm_tty: constify uart_ops structures
  2016-09-01 17:51   ` Julia Lawall
@ 2016-09-01 22:58     ` Gabriel Krisman Bertazi
  -1 siblings, 0 replies; 46+ messages in thread
From: Gabriel Krisman Bertazi @ 2016-09-01 22:58 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Julia Lawall <Julia.Lawall@lip6.fr> writes:

> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
>
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
>
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
>

Acked-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>

-- 
Gabriel Krisman Bertazi

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

* Re: [PATCH 5/9] tty: serial: jsm_tty: constify uart_ops structures
@ 2016-09-01 22:58     ` Gabriel Krisman Bertazi
  0 siblings, 0 replies; 46+ messages in thread
From: Gabriel Krisman Bertazi @ 2016-09-01 22:58 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

Julia Lawall <Julia.Lawall@lip6.fr> writes:

> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
>
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
>
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
>

Acked-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>

-- 
Gabriel Krisman Bertazi


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

* Re: [PATCH 2/9] tty/serial: at91: constify uart_ops structures
  2016-09-01 17:51   ` Julia Lawall
  (?)
@ 2016-09-02  7:55     ` Nicolas Ferre
  -1 siblings, 0 replies; 46+ messages in thread
From: Nicolas Ferre @ 2016-09-02  7:55 UTC (permalink / raw)
  To: Julia Lawall, Greg Kroah-Hartman, linux-serial
  Cc: kernel-janitors, Jiri Slaby, linux-kernel

Le 01/09/2016 à 19:51, Julia Lawall a écrit :
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks Julia.
Bye,

> ---
>  drivers/tty/serial/atmel_serial.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2eaa18d..963a72f 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2292,7 +2292,7 @@ static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
>  }
>  #endif
>  
> -static struct uart_ops atmel_pops = {
> +static const struct uart_ops atmel_pops = {
>  	.tx_empty	= atmel_tx_empty,
>  	.set_mctrl	= atmel_set_mctrl,
>  	.get_mctrl	= atmel_get_mctrl,
> 
> 


-- 
Nicolas Ferre

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

* Re: [PATCH 2/9] tty/serial: at91: constify uart_ops structures
@ 2016-09-02  7:55     ` Nicolas Ferre
  0 siblings, 0 replies; 46+ messages in thread
From: Nicolas Ferre @ 2016-09-02  7:55 UTC (permalink / raw)
  To: Julia Lawall, Greg Kroah-Hartman, linux-serial
  Cc: kernel-janitors, Jiri Slaby, linux-kernel

Le 01/09/2016 à 19:51, Julia Lawall a écrit :
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks Julia.
Bye,

> ---
>  drivers/tty/serial/atmel_serial.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2eaa18d..963a72f 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2292,7 +2292,7 @@ static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
>  }
>  #endif
>  
> -static struct uart_ops atmel_pops = {
> +static const struct uart_ops atmel_pops = {
>  	.tx_empty	= atmel_tx_empty,
>  	.set_mctrl	= atmel_set_mctrl,
>  	.get_mctrl	= atmel_get_mctrl,
> 
> 


-- 
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/9] tty/serial: at91: constify uart_ops structures
@ 2016-09-02  7:55     ` Nicolas Ferre
  0 siblings, 0 replies; 46+ messages in thread
From: Nicolas Ferre @ 2016-09-02  7:55 UTC (permalink / raw)
  To: Julia Lawall, Greg Kroah-Hartman, linux-serial
  Cc: kernel-janitors, Jiri Slaby, linux-kernel

Le 01/09/2016 à 19:51, Julia Lawall a écrit :
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks Julia.
Bye,

> ---
>  drivers/tty/serial/atmel_serial.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2eaa18d..963a72f 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2292,7 +2292,7 @@ static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
>  }
>  #endif
>  
> -static struct uart_ops atmel_pops = {
> +static const struct uart_ops atmel_pops = {
>  	.tx_empty	= atmel_tx_empty,
>  	.set_mctrl	= atmel_set_mctrl,
>  	.get_mctrl	= atmel_get_mctrl,
> 
> 


-- 
Nicolas Ferre

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

* Re: [PATCH 3/9] serial: altera: constify uart_ops structures
  2016-09-01 17:51   ` Julia Lawall
@ 2016-09-02  8:36     ` Tobias Klauser
  -1 siblings, 0 replies; 46+ messages in thread
From: Tobias Klauser @ 2016-09-02  8:36 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	nios2-dev, linux-kernel

On 2016-09-01 at 19:51:32 +0200, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Tobias Klauser <tklauser@distanz.ch>

Thanks a lot.

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

* Re: [PATCH 3/9] serial: altera: constify uart_ops structures
@ 2016-09-02  8:36     ` Tobias Klauser
  0 siblings, 0 replies; 46+ messages in thread
From: Tobias Klauser @ 2016-09-02  8:36 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	nios2-dev, linux-kernel

On 2016-09-01 at 19:51:32 +0200, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> Check for uart_ops structures that are only stored in the ops field of a
> uart_port structure.  This field is declared const, so uart_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct uart_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct uart_port e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct uart_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct uart_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Tobias Klauser <tklauser@distanz.ch>

Thanks a lot.

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

end of thread, other threads:[~2016-09-02  8:47 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 17:51 [PATCH 0/9] constify uart_ops structures Julia Lawall
2016-09-01 17:51 ` Julia Lawall
2016-09-01 17:51 ` Julia Lawall
2016-09-01 17:51 ` Julia Lawall
2016-09-01 17:51 ` Julia Lawall
2016-09-01 17:51 ` [PATCH 1/9] serial: st-asc: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 19:55   ` [STLinux Kernel] " Peter Griffin
2016-09-01 19:55     ` Peter Griffin
2016-09-01 19:55     ` Peter Griffin
2016-09-01 19:55     ` Peter Griffin
2016-09-01 17:51 ` [PATCH 2/9] tty/serial: at91: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-02  7:55   ` Nicolas Ferre
2016-09-02  7:55     ` Nicolas Ferre
2016-09-02  7:55     ` Nicolas Ferre
2016-09-01 17:51 ` [PATCH 3/9] serial: altera: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-02  8:36   ` Tobias Klauser
2016-09-02  8:36     ` Tobias Klauser
2016-09-01 17:51 ` [PATCH 4/9] serial/bcm63xx_uart: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51 ` [PATCH 5/9] tty: serial: jsm_tty: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 22:58   ` Gabriel Krisman Bertazi
2016-09-01 22:58     ` Gabriel Krisman Bertazi
2016-09-01 17:51 ` [PATCH 6/9] tty: serial: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51 ` [PATCH 7/9] tty: xuartps: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51 ` [PATCH 8/9] serial-uartlite: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51 ` [PATCH 9/9] serial/arc: " Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 17:51   ` Julia Lawall
2016-09-01 18:49   ` Vineet Gupta
2016-09-01 18:49     ` Vineet Gupta
2016-09-01 18:49     ` Vineet Gupta
2016-09-01 18:49     ` Vineet Gupta

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.