All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: Joe Perches <joe@perches.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	linux-ia64@vger.kernel.org, kernel@stlinux.com,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Timur Tabi <timur@tabi.org>,
	linux-kernel@vger.kernel.org, Pat Gefre <pfg@sgi.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Daniel Walker <dwalker@fifo99.com>,
	sparclinux@vger.kernel.org, Peter Korsgaard <jacmet@sunsite.dk>,
	Sonic Zhang <sonic.zhang@analog.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org,
	Tobias Klauser <tklauser@distanz.ch>,
	Stephen Warren <swarren@wwwdotorg.org>,
	linux-arm-msm@vger.kernel.org,
	adi-buildroot-devel@lists.sourceforge.net,
	Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>linux
Subject: Re: [PATCH] tty: serial: Add const to struct uart_ops declarations
Date: Sun, 05 Apr 2015 00:04:29 +0200	[thread overview]
Message-ID: <a938a0e86638588e5ccff85771fa3b95@agner.ch> (raw)
In-Reply-To: <1428169665.2775.53.camel@perches.com>

Hi Joe,

See comment below...

On 2015-04-04 19:47, Joe Perches wrote:
> These structs can be const, so make them const.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 
> Done with:
> sed -r -i -e 's/\bstruct\s+uart_ops\s+(\w+)\s*=\s*/const struct
> uart_ops \1 = /g' drivers/tty/serial/*.c
> 
> Compiled x86 only, not cross-compiled.  Untested.
> 
>  drivers/tty/serial/21285.c                  | 2 +-
>  drivers/tty/serial/altera_jtaguart.c        | 2 +-
>  drivers/tty/serial/altera_uart.c            | 2 +-
>  drivers/tty/serial/amba-pl010.c             | 2 +-
>  drivers/tty/serial/amba-pl011.c             | 2 +-
>  drivers/tty/serial/apbuart.c                | 2 +-
>  drivers/tty/serial/ar933x_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/bfin_sport_uart.c        | 2 +-
>  drivers/tty/serial/bfin_uart.c              | 2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
>  drivers/tty/serial/dz.c                     | 2 +-
>  drivers/tty/serial/efm32-uart.c             | 2 +-
>  drivers/tty/serial/fsl_lpuart.c             | 4 ++--
>  drivers/tty/serial/icom.c                   | 2 +-
>  drivers/tty/serial/imx.c                    | 2 +-
>  drivers/tty/serial/ioc3_serial.c            | 2 +-
>  drivers/tty/serial/ioc4_serial.c            | 2 +-
>  drivers/tty/serial/ip22zilog.c              | 2 +-
>  drivers/tty/serial/jsm/jsm_tty.c            | 2 +-
>  drivers/tty/serial/lantiq.c                 | 2 +-
>  drivers/tty/serial/lpc32xx_hs.c             | 2 +-
>  drivers/tty/serial/m32r_sio.c               | 2 +-
>  drivers/tty/serial/max3100.c                | 2 +-
>  drivers/tty/serial/men_z135_uart.c          | 2 +-
>  drivers/tty/serial/meson_uart.c             | 2 +-
>  drivers/tty/serial/mpc52xx_uart.c           | 2 +-
>  drivers/tty/serial/mpsc.c                   | 2 +-
>  drivers/tty/serial/msm_serial.c             | 2 +-
>  drivers/tty/serial/mux.c                    | 2 +-
>  drivers/tty/serial/mxs-auart.c              | 2 +-
>  drivers/tty/serial/netx-serial.c            | 2 +-
>  drivers/tty/serial/nwpserial.c              | 2 +-
>  drivers/tty/serial/omap-serial.c            | 2 +-
>  drivers/tty/serial/pch_uart.c               | 2 +-
>  drivers/tty/serial/pmac_zilog.c             | 2 +-
>  drivers/tty/serial/pnx8xxx_uart.c           | 2 +-
>  drivers/tty/serial/pxa.c                    | 2 +-
>  drivers/tty/serial/sa1100.c                 | 2 +-
>  drivers/tty/serial/samsung.c                | 2 +-
>  drivers/tty/serial/serial-tegra.c           | 2 +-
>  drivers/tty/serial/serial_ks8695.c          | 2 +-
>  drivers/tty/serial/serial_txx9.c            | 2 +-
>  drivers/tty/serial/sh-sci.c                 | 2 +-
>  drivers/tty/serial/sirfsoc_uart.c           | 2 +-
>  drivers/tty/serial/sn_console.c             | 2 +-
>  drivers/tty/serial/sprd_serial.c            | 2 +-
>  drivers/tty/serial/st-asc.c                 | 2 +-
>  drivers/tty/serial/sunhv.c                  | 2 +-
>  drivers/tty/serial/sunsab.c                 | 2 +-
>  drivers/tty/serial/sunsu.c                  | 2 +-
>  drivers/tty/serial/sunzilog.c               | 2 +-
>  drivers/tty/serial/timbuart.c               | 2 +-
>  drivers/tty/serial/uartlite.c               | 2 +-
>  drivers/tty/serial/ucc_uart.c               | 2 +-
>  drivers/tty/serial/vr41xx_siu.c             | 2 +-
>  drivers/tty/serial/vt8500_serial.c          | 2 +-
>  drivers/tty/serial/xilinx_uartps.c          | 2 +-
>  drivers/tty/serial/zs.c                     | 2 +-
>  61 files changed, 62 insertions(+), 62 deletions(-)
> 

<snip>

> --- a/drivers/tty/serial/efm32-uart.c
> +++ b/drivers/tty/serial/efm32-uart.c
> @@ -487,7 +487,7 @@ static int efm32_uart_verify_port(struct uart_port *port,
>  	return ret;
>  }
>  
> -static struct uart_ops efm32_uart_pops = {
> +static const struct uart_ops efm32_uart_pops = {
>  	.tx_empty = efm32_uart_tx_empty,
>  	.set_mctrl = efm32_uart_set_mctrl,
>  	.get_mctrl = efm32_uart_get_mctrl,
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 08ce76f..738b5c4 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 const struct uart_ops lpuart_pops = {

Something went wrong in this driver, const is twice...

Probably because we have two struct uart_ops in one driver?

>  	.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 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/icom.c b/drivers/tty/serial/icom.c
> index 45fc323..3915443 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1287,7 +1287,7 @@ static void icom_config_port(struct uart_port
> *port, int flags)
>  	port->type = PORT_ICOM;
>  }
>  

<snip>

--
Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Agner <stefan@agner.ch>
To: Joe Perches <joe@perches.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jslaby@suse.cz>,
	linux-ia64@vger.kernel.org, kernel@stlinux.com,
	"Nicolas Ferre" <nicolas.ferre@atmel.com>,
	"Timur Tabi" <timur@tabi.org>,
	linux-kernel@vger.kernel.org, "Pat Gefre" <pfg@sgi.com>,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	"Daniel Walker" <dwalker@fifo99.com>,
	sparclinux@vger.kernel.org, "Peter Korsgaard" <jacmet@sunsite.dk>,
	"Sonic Zhang" <sonic.zhang@analog.com>,
	"Alexandre Courbot" <gnurou@gmail.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Michal Simek" <michal.simek@xilinx.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org,
	"Tobias Klauser" <tklauser@distanz.ch>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	linux-arm-msm@vger.kernel.org,
	adi-buildroot-devel@lists.sourceforge.net,
	"Thadeu Lima de Souza Cascardo" <cascardo@linux.vnet.ibm.com>,
	linux-tegra@vger.kernel.org,
	"David Brown" <davidb@codeaurora.org>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	"Maxime Coquelin" <maxime.coquelin@st.com>,
	"Barry Song" <baohua@kernel.org>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	"Patrice Chotard" <patrice.chotard@st.com>,
	"Tony Prisk" <linux@prisktech.co.nz>,
	"Bryan Huntsman" <bryanh@codeaurora.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <kernel@pengutronix.de>,
	"Srinivas Kandagatla" <srinivas.kandagatla@gmail.com>,
	nios2-dev@lists.rocketboards.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] tty: serial: Add const to struct uart_ops declarations
Date: Sun, 05 Apr 2015 00:04:29 +0200	[thread overview]
Message-ID: <a938a0e86638588e5ccff85771fa3b95@agner.ch> (raw)
In-Reply-To: <1428169665.2775.53.camel@perches.com>

Hi Joe,

See comment below...

On 2015-04-04 19:47, Joe Perches wrote:
> These structs can be const, so make them const.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 
> Done with:
> sed -r -i -e 's/\bstruct\s+uart_ops\s+(\w+)\s*=\s*/const struct
> uart_ops \1 = /g' drivers/tty/serial/*.c
> 
> Compiled x86 only, not cross-compiled.  Untested.
> 
>  drivers/tty/serial/21285.c                  | 2 +-
>  drivers/tty/serial/altera_jtaguart.c        | 2 +-
>  drivers/tty/serial/altera_uart.c            | 2 +-
>  drivers/tty/serial/amba-pl010.c             | 2 +-
>  drivers/tty/serial/amba-pl011.c             | 2 +-
>  drivers/tty/serial/apbuart.c                | 2 +-
>  drivers/tty/serial/ar933x_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/bfin_sport_uart.c        | 2 +-
>  drivers/tty/serial/bfin_uart.c              | 2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
>  drivers/tty/serial/dz.c                     | 2 +-
>  drivers/tty/serial/efm32-uart.c             | 2 +-
>  drivers/tty/serial/fsl_lpuart.c             | 4 ++--
>  drivers/tty/serial/icom.c                   | 2 +-
>  drivers/tty/serial/imx.c                    | 2 +-
>  drivers/tty/serial/ioc3_serial.c            | 2 +-
>  drivers/tty/serial/ioc4_serial.c            | 2 +-
>  drivers/tty/serial/ip22zilog.c              | 2 +-
>  drivers/tty/serial/jsm/jsm_tty.c            | 2 +-
>  drivers/tty/serial/lantiq.c                 | 2 +-
>  drivers/tty/serial/lpc32xx_hs.c             | 2 +-
>  drivers/tty/serial/m32r_sio.c               | 2 +-
>  drivers/tty/serial/max3100.c                | 2 +-
>  drivers/tty/serial/men_z135_uart.c          | 2 +-
>  drivers/tty/serial/meson_uart.c             | 2 +-
>  drivers/tty/serial/mpc52xx_uart.c           | 2 +-
>  drivers/tty/serial/mpsc.c                   | 2 +-
>  drivers/tty/serial/msm_serial.c             | 2 +-
>  drivers/tty/serial/mux.c                    | 2 +-
>  drivers/tty/serial/mxs-auart.c              | 2 +-
>  drivers/tty/serial/netx-serial.c            | 2 +-
>  drivers/tty/serial/nwpserial.c              | 2 +-
>  drivers/tty/serial/omap-serial.c            | 2 +-
>  drivers/tty/serial/pch_uart.c               | 2 +-
>  drivers/tty/serial/pmac_zilog.c             | 2 +-
>  drivers/tty/serial/pnx8xxx_uart.c           | 2 +-
>  drivers/tty/serial/pxa.c                    | 2 +-
>  drivers/tty/serial/sa1100.c                 | 2 +-
>  drivers/tty/serial/samsung.c                | 2 +-
>  drivers/tty/serial/serial-tegra.c           | 2 +-
>  drivers/tty/serial/serial_ks8695.c          | 2 +-
>  drivers/tty/serial/serial_txx9.c            | 2 +-
>  drivers/tty/serial/sh-sci.c                 | 2 +-
>  drivers/tty/serial/sirfsoc_uart.c           | 2 +-
>  drivers/tty/serial/sn_console.c             | 2 +-
>  drivers/tty/serial/sprd_serial.c            | 2 +-
>  drivers/tty/serial/st-asc.c                 | 2 +-
>  drivers/tty/serial/sunhv.c                  | 2 +-
>  drivers/tty/serial/sunsab.c                 | 2 +-
>  drivers/tty/serial/sunsu.c                  | 2 +-
>  drivers/tty/serial/sunzilog.c               | 2 +-
>  drivers/tty/serial/timbuart.c               | 2 +-
>  drivers/tty/serial/uartlite.c               | 2 +-
>  drivers/tty/serial/ucc_uart.c               | 2 +-
>  drivers/tty/serial/vr41xx_siu.c             | 2 +-
>  drivers/tty/serial/vt8500_serial.c          | 2 +-
>  drivers/tty/serial/xilinx_uartps.c          | 2 +-
>  drivers/tty/serial/zs.c                     | 2 +-
>  61 files changed, 62 insertions(+), 62 deletions(-)
> 

<snip>

> --- a/drivers/tty/serial/efm32-uart.c
> +++ b/drivers/tty/serial/efm32-uart.c
> @@ -487,7 +487,7 @@ static int efm32_uart_verify_port(struct uart_port *port,
>  	return ret;
>  }
>  
> -static struct uart_ops efm32_uart_pops = {
> +static const struct uart_ops efm32_uart_pops = {
>  	.tx_empty = efm32_uart_tx_empty,
>  	.set_mctrl = efm32_uart_set_mctrl,
>  	.get_mctrl = efm32_uart_get_mctrl,
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 08ce76f..738b5c4 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 const struct uart_ops lpuart_pops = {

Something went wrong in this driver, const is twice...

Probably because we have two struct uart_ops in one driver?

>  	.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 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/icom.c b/drivers/tty/serial/icom.c
> index 45fc323..3915443 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1287,7 +1287,7 @@ static void icom_config_port(struct uart_port
> *port, int flags)
>  	port->type = PORT_ICOM;
>  }
>  

<snip>

--
Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Agner <stefan@agner.ch>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] tty: serial: Add const to struct uart_ops declarations
Date: Sat, 04 Apr 2015 22:04:29 +0000	[thread overview]
Message-ID: <a938a0e86638588e5ccff85771fa3b95@agner.ch> (raw)
In-Reply-To: <1428169665.2775.53.camel@perches.com>

Hi Joe,

See comment below...

On 2015-04-04 19:47, Joe Perches wrote:
> These structs can be const, so make them const.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 
> Done with:
> sed -r -i -e 's/\bstruct\s+uart_ops\s+(\w+)\s*=\s*/const struct
> uart_ops \1 = /g' drivers/tty/serial/*.c
> 
> Compiled x86 only, not cross-compiled.  Untested.
> 
>  drivers/tty/serial/21285.c                  | 2 +-
>  drivers/tty/serial/altera_jtaguart.c        | 2 +-
>  drivers/tty/serial/altera_uart.c            | 2 +-
>  drivers/tty/serial/amba-pl010.c             | 2 +-
>  drivers/tty/serial/amba-pl011.c             | 2 +-
>  drivers/tty/serial/apbuart.c                | 2 +-
>  drivers/tty/serial/ar933x_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/bfin_sport_uart.c        | 2 +-
>  drivers/tty/serial/bfin_uart.c              | 2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
>  drivers/tty/serial/dz.c                     | 2 +-
>  drivers/tty/serial/efm32-uart.c             | 2 +-
>  drivers/tty/serial/fsl_lpuart.c             | 4 ++--
>  drivers/tty/serial/icom.c                   | 2 +-
>  drivers/tty/serial/imx.c                    | 2 +-
>  drivers/tty/serial/ioc3_serial.c            | 2 +-
>  drivers/tty/serial/ioc4_serial.c            | 2 +-
>  drivers/tty/serial/ip22zilog.c              | 2 +-
>  drivers/tty/serial/jsm/jsm_tty.c            | 2 +-
>  drivers/tty/serial/lantiq.c                 | 2 +-
>  drivers/tty/serial/lpc32xx_hs.c             | 2 +-
>  drivers/tty/serial/m32r_sio.c               | 2 +-
>  drivers/tty/serial/max3100.c                | 2 +-
>  drivers/tty/serial/men_z135_uart.c          | 2 +-
>  drivers/tty/serial/meson_uart.c             | 2 +-
>  drivers/tty/serial/mpc52xx_uart.c           | 2 +-
>  drivers/tty/serial/mpsc.c                   | 2 +-
>  drivers/tty/serial/msm_serial.c             | 2 +-
>  drivers/tty/serial/mux.c                    | 2 +-
>  drivers/tty/serial/mxs-auart.c              | 2 +-
>  drivers/tty/serial/netx-serial.c            | 2 +-
>  drivers/tty/serial/nwpserial.c              | 2 +-
>  drivers/tty/serial/omap-serial.c            | 2 +-
>  drivers/tty/serial/pch_uart.c               | 2 +-
>  drivers/tty/serial/pmac_zilog.c             | 2 +-
>  drivers/tty/serial/pnx8xxx_uart.c           | 2 +-
>  drivers/tty/serial/pxa.c                    | 2 +-
>  drivers/tty/serial/sa1100.c                 | 2 +-
>  drivers/tty/serial/samsung.c                | 2 +-
>  drivers/tty/serial/serial-tegra.c           | 2 +-
>  drivers/tty/serial/serial_ks8695.c          | 2 +-
>  drivers/tty/serial/serial_txx9.c            | 2 +-
>  drivers/tty/serial/sh-sci.c                 | 2 +-
>  drivers/tty/serial/sirfsoc_uart.c           | 2 +-
>  drivers/tty/serial/sn_console.c             | 2 +-
>  drivers/tty/serial/sprd_serial.c            | 2 +-
>  drivers/tty/serial/st-asc.c                 | 2 +-
>  drivers/tty/serial/sunhv.c                  | 2 +-
>  drivers/tty/serial/sunsab.c                 | 2 +-
>  drivers/tty/serial/sunsu.c                  | 2 +-
>  drivers/tty/serial/sunzilog.c               | 2 +-
>  drivers/tty/serial/timbuart.c               | 2 +-
>  drivers/tty/serial/uartlite.c               | 2 +-
>  drivers/tty/serial/ucc_uart.c               | 2 +-
>  drivers/tty/serial/vr41xx_siu.c             | 2 +-
>  drivers/tty/serial/vt8500_serial.c          | 2 +-
>  drivers/tty/serial/xilinx_uartps.c          | 2 +-
>  drivers/tty/serial/zs.c                     | 2 +-
>  61 files changed, 62 insertions(+), 62 deletions(-)
> 

<snip>

> --- a/drivers/tty/serial/efm32-uart.c
> +++ b/drivers/tty/serial/efm32-uart.c
> @@ -487,7 +487,7 @@ static int efm32_uart_verify_port(struct uart_port *port,
>  	return ret;
>  }
>  
> -static struct uart_ops efm32_uart_pops = {
> +static const struct uart_ops efm32_uart_pops = {
>  	.tx_empty = efm32_uart_tx_empty,
>  	.set_mctrl = efm32_uart_set_mctrl,
>  	.get_mctrl = efm32_uart_get_mctrl,
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 08ce76f..738b5c4 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 const struct uart_ops lpuart_pops = {

Something went wrong in this driver, const is twice...

Probably because we have two struct uart_ops in one driver?

>  	.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 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/icom.c b/drivers/tty/serial/icom.c
> index 45fc323..3915443 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1287,7 +1287,7 @@ static void icom_config_port(struct uart_port
> *port, int flags)
>  	port->type = PORT_ICOM;
>  }
>  

<snip>

--
Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Agner <stefan@agner.ch>
To: Joe Perches <joe@perches.com>
Cc: linux-ia64@vger.kernel.org, kernel@stlinux.com,
	"Nicolas Ferre" <nicolas.ferre@atmel.com>,
	"Timur Tabi" <timur@tabi.org>,
	"Patrice Chotard" <patrice.chotard@st.com>,
	"Pat Gefre" <pfg@sgi.com>,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	"Daniel Walker" <dwalker@fifo99.com>,
	sparclinux@vger.kernel.org,
	"Sonic Zhang" <sonic.zhang@analog.com>,
	"Jiri Slaby" <jslaby@suse.cz>,
	"Alexandre Courbot" <gnurou@gmail.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	linux-serial@vger.kernel.org,
	"Tobias Klauser" <tklauser@distanz.ch>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	linux-arm-msm@vger.kernel.org,
	adi-buildroot-devel@lists.sourceforge.net,
	"Thadeu Lima de Souza Cascardo" <cascardo@linux.vnet.ibm.com>,
	linux-tegra@vger.kernel.org,
	"David Brown" <davidb@codeaurora.org>,
	linux-arm-kernel@lists.infradead.org,
	"Maxime Coquelin" <maxime.coquelin@st.com>,
	"Barry Song" <baohua@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	"Tony Prisk" <linux@prisktech.co.nz>,
	"Bryan Huntsman" <bryanh@codeaurora.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <kernel@pengutronix.de>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	nios2-dev@lists.rocketboards.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Srinivas Kandagatla" <srinivas.kandagatla@gmail.com>
Subject: Re: [PATCH] tty: serial: Add const to struct uart_ops declarations
Date: Sun, 05 Apr 2015 00:04:29 +0200	[thread overview]
Message-ID: <a938a0e86638588e5ccff85771fa3b95@agner.ch> (raw)
In-Reply-To: <1428169665.2775.53.camel@perches.com>

Hi Joe,

See comment below...

On 2015-04-04 19:47, Joe Perches wrote:
> These structs can be const, so make them const.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 
> Done with:
> sed -r -i -e 's/\bstruct\s+uart_ops\s+(\w+)\s*=\s*/const struct
> uart_ops \1 = /g' drivers/tty/serial/*.c
> 
> Compiled x86 only, not cross-compiled.  Untested.
> 
>  drivers/tty/serial/21285.c                  | 2 +-
>  drivers/tty/serial/altera_jtaguart.c        | 2 +-
>  drivers/tty/serial/altera_uart.c            | 2 +-
>  drivers/tty/serial/amba-pl010.c             | 2 +-
>  drivers/tty/serial/amba-pl011.c             | 2 +-
>  drivers/tty/serial/apbuart.c                | 2 +-
>  drivers/tty/serial/ar933x_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/bfin_sport_uart.c        | 2 +-
>  drivers/tty/serial/bfin_uart.c              | 2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
>  drivers/tty/serial/dz.c                     | 2 +-
>  drivers/tty/serial/efm32-uart.c             | 2 +-
>  drivers/tty/serial/fsl_lpuart.c             | 4 ++--
>  drivers/tty/serial/icom.c                   | 2 +-
>  drivers/tty/serial/imx.c                    | 2 +-
>  drivers/tty/serial/ioc3_serial.c            | 2 +-
>  drivers/tty/serial/ioc4_serial.c            | 2 +-
>  drivers/tty/serial/ip22zilog.c              | 2 +-
>  drivers/tty/serial/jsm/jsm_tty.c            | 2 +-
>  drivers/tty/serial/lantiq.c                 | 2 +-
>  drivers/tty/serial/lpc32xx_hs.c             | 2 +-
>  drivers/tty/serial/m32r_sio.c               | 2 +-
>  drivers/tty/serial/max3100.c                | 2 +-
>  drivers/tty/serial/men_z135_uart.c          | 2 +-
>  drivers/tty/serial/meson_uart.c             | 2 +-
>  drivers/tty/serial/mpc52xx_uart.c           | 2 +-
>  drivers/tty/serial/mpsc.c                   | 2 +-
>  drivers/tty/serial/msm_serial.c             | 2 +-
>  drivers/tty/serial/mux.c                    | 2 +-
>  drivers/tty/serial/mxs-auart.c              | 2 +-
>  drivers/tty/serial/netx-serial.c            | 2 +-
>  drivers/tty/serial/nwpserial.c              | 2 +-
>  drivers/tty/serial/omap-serial.c            | 2 +-
>  drivers/tty/serial/pch_uart.c               | 2 +-
>  drivers/tty/serial/pmac_zilog.c             | 2 +-
>  drivers/tty/serial/pnx8xxx_uart.c           | 2 +-
>  drivers/tty/serial/pxa.c                    | 2 +-
>  drivers/tty/serial/sa1100.c                 | 2 +-
>  drivers/tty/serial/samsung.c                | 2 +-
>  drivers/tty/serial/serial-tegra.c           | 2 +-
>  drivers/tty/serial/serial_ks8695.c          | 2 +-
>  drivers/tty/serial/serial_txx9.c            | 2 +-
>  drivers/tty/serial/sh-sci.c                 | 2 +-
>  drivers/tty/serial/sirfsoc_uart.c           | 2 +-
>  drivers/tty/serial/sn_console.c             | 2 +-
>  drivers/tty/serial/sprd_serial.c            | 2 +-
>  drivers/tty/serial/st-asc.c                 | 2 +-
>  drivers/tty/serial/sunhv.c                  | 2 +-
>  drivers/tty/serial/sunsab.c                 | 2 +-
>  drivers/tty/serial/sunsu.c                  | 2 +-
>  drivers/tty/serial/sunzilog.c               | 2 +-
>  drivers/tty/serial/timbuart.c               | 2 +-
>  drivers/tty/serial/uartlite.c               | 2 +-
>  drivers/tty/serial/ucc_uart.c               | 2 +-
>  drivers/tty/serial/vr41xx_siu.c             | 2 +-
>  drivers/tty/serial/vt8500_serial.c          | 2 +-
>  drivers/tty/serial/xilinx_uartps.c          | 2 +-
>  drivers/tty/serial/zs.c                     | 2 +-
>  61 files changed, 62 insertions(+), 62 deletions(-)
> 

<snip>

> --- a/drivers/tty/serial/efm32-uart.c
> +++ b/drivers/tty/serial/efm32-uart.c
> @@ -487,7 +487,7 @@ static int efm32_uart_verify_port(struct uart_port *port,
>  	return ret;
>  }
>  
> -static struct uart_ops efm32_uart_pops = {
> +static const struct uart_ops efm32_uart_pops = {
>  	.tx_empty = efm32_uart_tx_empty,
>  	.set_mctrl = efm32_uart_set_mctrl,
>  	.get_mctrl = efm32_uart_get_mctrl,
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 08ce76f..738b5c4 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 const struct uart_ops lpuart_pops = {

Something went wrong in this driver, const is twice...

Probably because we have two struct uart_ops in one driver?

>  	.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 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/icom.c b/drivers/tty/serial/icom.c
> index 45fc323..3915443 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1287,7 +1287,7 @@ static void icom_config_port(struct uart_port
> *port, int flags)
>  	port->type = PORT_ICOM;
>  }
>  

<snip>

--
Stefan

WARNING: multiple messages have this Message-ID (diff)
From: stefan@agner.ch (Stefan Agner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] tty: serial: Add const to struct uart_ops declarations
Date: Sun, 05 Apr 2015 00:04:29 +0200	[thread overview]
Message-ID: <a938a0e86638588e5ccff85771fa3b95@agner.ch> (raw)
In-Reply-To: <1428169665.2775.53.camel@perches.com>

Hi Joe,

See comment below...

On 2015-04-04 19:47, Joe Perches wrote:
> These structs can be const, so make them const.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 
> Done with:
> sed -r -i -e 's/\bstruct\s+uart_ops\s+(\w+)\s*=\s*/const struct
> uart_ops \1 = /g' drivers/tty/serial/*.c
> 
> Compiled x86 only, not cross-compiled.  Untested.
> 
>  drivers/tty/serial/21285.c                  | 2 +-
>  drivers/tty/serial/altera_jtaguart.c        | 2 +-
>  drivers/tty/serial/altera_uart.c            | 2 +-
>  drivers/tty/serial/amba-pl010.c             | 2 +-
>  drivers/tty/serial/amba-pl011.c             | 2 +-
>  drivers/tty/serial/apbuart.c                | 2 +-
>  drivers/tty/serial/ar933x_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/bfin_sport_uart.c        | 2 +-
>  drivers/tty/serial/bfin_uart.c              | 2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
>  drivers/tty/serial/dz.c                     | 2 +-
>  drivers/tty/serial/efm32-uart.c             | 2 +-
>  drivers/tty/serial/fsl_lpuart.c             | 4 ++--
>  drivers/tty/serial/icom.c                   | 2 +-
>  drivers/tty/serial/imx.c                    | 2 +-
>  drivers/tty/serial/ioc3_serial.c            | 2 +-
>  drivers/tty/serial/ioc4_serial.c            | 2 +-
>  drivers/tty/serial/ip22zilog.c              | 2 +-
>  drivers/tty/serial/jsm/jsm_tty.c            | 2 +-
>  drivers/tty/serial/lantiq.c                 | 2 +-
>  drivers/tty/serial/lpc32xx_hs.c             | 2 +-
>  drivers/tty/serial/m32r_sio.c               | 2 +-
>  drivers/tty/serial/max3100.c                | 2 +-
>  drivers/tty/serial/men_z135_uart.c          | 2 +-
>  drivers/tty/serial/meson_uart.c             | 2 +-
>  drivers/tty/serial/mpc52xx_uart.c           | 2 +-
>  drivers/tty/serial/mpsc.c                   | 2 +-
>  drivers/tty/serial/msm_serial.c             | 2 +-
>  drivers/tty/serial/mux.c                    | 2 +-
>  drivers/tty/serial/mxs-auart.c              | 2 +-
>  drivers/tty/serial/netx-serial.c            | 2 +-
>  drivers/tty/serial/nwpserial.c              | 2 +-
>  drivers/tty/serial/omap-serial.c            | 2 +-
>  drivers/tty/serial/pch_uart.c               | 2 +-
>  drivers/tty/serial/pmac_zilog.c             | 2 +-
>  drivers/tty/serial/pnx8xxx_uart.c           | 2 +-
>  drivers/tty/serial/pxa.c                    | 2 +-
>  drivers/tty/serial/sa1100.c                 | 2 +-
>  drivers/tty/serial/samsung.c                | 2 +-
>  drivers/tty/serial/serial-tegra.c           | 2 +-
>  drivers/tty/serial/serial_ks8695.c          | 2 +-
>  drivers/tty/serial/serial_txx9.c            | 2 +-
>  drivers/tty/serial/sh-sci.c                 | 2 +-
>  drivers/tty/serial/sirfsoc_uart.c           | 2 +-
>  drivers/tty/serial/sn_console.c             | 2 +-
>  drivers/tty/serial/sprd_serial.c            | 2 +-
>  drivers/tty/serial/st-asc.c                 | 2 +-
>  drivers/tty/serial/sunhv.c                  | 2 +-
>  drivers/tty/serial/sunsab.c                 | 2 +-
>  drivers/tty/serial/sunsu.c                  | 2 +-
>  drivers/tty/serial/sunzilog.c               | 2 +-
>  drivers/tty/serial/timbuart.c               | 2 +-
>  drivers/tty/serial/uartlite.c               | 2 +-
>  drivers/tty/serial/ucc_uart.c               | 2 +-
>  drivers/tty/serial/vr41xx_siu.c             | 2 +-
>  drivers/tty/serial/vt8500_serial.c          | 2 +-
>  drivers/tty/serial/xilinx_uartps.c          | 2 +-
>  drivers/tty/serial/zs.c                     | 2 +-
>  61 files changed, 62 insertions(+), 62 deletions(-)
> 

<snip>

> --- a/drivers/tty/serial/efm32-uart.c
> +++ b/drivers/tty/serial/efm32-uart.c
> @@ -487,7 +487,7 @@ static int efm32_uart_verify_port(struct uart_port *port,
>  	return ret;
>  }
>  
> -static struct uart_ops efm32_uart_pops = {
> +static const struct uart_ops efm32_uart_pops = {
>  	.tx_empty = efm32_uart_tx_empty,
>  	.set_mctrl = efm32_uart_set_mctrl,
>  	.get_mctrl = efm32_uart_get_mctrl,
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 08ce76f..738b5c4 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 const struct uart_ops lpuart_pops = {

Something went wrong in this driver, const is twice...

Probably because we have two struct uart_ops in one driver?

>  	.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 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/icom.c b/drivers/tty/serial/icom.c
> index 45fc323..3915443 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1287,7 +1287,7 @@ static void icom_config_port(struct uart_port
> *port, int flags)
>  	port->type = PORT_ICOM;
>  }
>  

<snip>

--
Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Agner <stefan@agner.ch>
To: Joe Perches <joe@perches.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	linux-ia64@vger.kernel.org, kernel@stlinux.com,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Timur Tabi <timur@tabi.org>,
	linux-kernel@vger.kernel.org, Pat Gefre <pfg@sgi.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Daniel Walker <dwalker@fifo99.com>,
	sparclinux@vger.kernel.org, Peter Korsgaard <jacmet@sunsite.dk>,
	Sonic Zhang <sonic.zhang@analog.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org,
	Tobias Klauser <tklauser@distanz.ch>,
	Stephen Warren <swarren@wwwdotorg.org>,
	linux-arm-msm@vger.kernel.org,
	adi-buildroot-devel@lists.sourceforge.net,
	Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>,
	linux
Subject: Re: [PATCH] tty: serial: Add const to struct uart_ops declarations
Date: Sat, 04 Apr 2015 22:04:29 +0000	[thread overview]
Message-ID: <a938a0e86638588e5ccff85771fa3b95@agner.ch> (raw)
In-Reply-To: <1428169665.2775.53.camel@perches.com>

Hi Joe,

See comment below...

On 2015-04-04 19:47, Joe Perches wrote:
> These structs can be const, so make them const.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 
> Done with:
> sed -r -i -e 's/\bstruct\s+uart_ops\s+(\w+)\s*=\s*/const struct
> uart_ops \1 = /g' drivers/tty/serial/*.c
> 
> Compiled x86 only, not cross-compiled.  Untested.
> 
>  drivers/tty/serial/21285.c                  | 2 +-
>  drivers/tty/serial/altera_jtaguart.c        | 2 +-
>  drivers/tty/serial/altera_uart.c            | 2 +-
>  drivers/tty/serial/amba-pl010.c             | 2 +-
>  drivers/tty/serial/amba-pl011.c             | 2 +-
>  drivers/tty/serial/apbuart.c                | 2 +-
>  drivers/tty/serial/ar933x_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/bfin_sport_uart.c        | 2 +-
>  drivers/tty/serial/bfin_uart.c              | 2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
>  drivers/tty/serial/dz.c                     | 2 +-
>  drivers/tty/serial/efm32-uart.c             | 2 +-
>  drivers/tty/serial/fsl_lpuart.c             | 4 ++--
>  drivers/tty/serial/icom.c                   | 2 +-
>  drivers/tty/serial/imx.c                    | 2 +-
>  drivers/tty/serial/ioc3_serial.c            | 2 +-
>  drivers/tty/serial/ioc4_serial.c            | 2 +-
>  drivers/tty/serial/ip22zilog.c              | 2 +-
>  drivers/tty/serial/jsm/jsm_tty.c            | 2 +-
>  drivers/tty/serial/lantiq.c                 | 2 +-
>  drivers/tty/serial/lpc32xx_hs.c             | 2 +-
>  drivers/tty/serial/m32r_sio.c               | 2 +-
>  drivers/tty/serial/max3100.c                | 2 +-
>  drivers/tty/serial/men_z135_uart.c          | 2 +-
>  drivers/tty/serial/meson_uart.c             | 2 +-
>  drivers/tty/serial/mpc52xx_uart.c           | 2 +-
>  drivers/tty/serial/mpsc.c                   | 2 +-
>  drivers/tty/serial/msm_serial.c             | 2 +-
>  drivers/tty/serial/mux.c                    | 2 +-
>  drivers/tty/serial/mxs-auart.c              | 2 +-
>  drivers/tty/serial/netx-serial.c            | 2 +-
>  drivers/tty/serial/nwpserial.c              | 2 +-
>  drivers/tty/serial/omap-serial.c            | 2 +-
>  drivers/tty/serial/pch_uart.c               | 2 +-
>  drivers/tty/serial/pmac_zilog.c             | 2 +-
>  drivers/tty/serial/pnx8xxx_uart.c           | 2 +-
>  drivers/tty/serial/pxa.c                    | 2 +-
>  drivers/tty/serial/sa1100.c                 | 2 +-
>  drivers/tty/serial/samsung.c                | 2 +-
>  drivers/tty/serial/serial-tegra.c           | 2 +-
>  drivers/tty/serial/serial_ks8695.c          | 2 +-
>  drivers/tty/serial/serial_txx9.c            | 2 +-
>  drivers/tty/serial/sh-sci.c                 | 2 +-
>  drivers/tty/serial/sirfsoc_uart.c           | 2 +-
>  drivers/tty/serial/sn_console.c             | 2 +-
>  drivers/tty/serial/sprd_serial.c            | 2 +-
>  drivers/tty/serial/st-asc.c                 | 2 +-
>  drivers/tty/serial/sunhv.c                  | 2 +-
>  drivers/tty/serial/sunsab.c                 | 2 +-
>  drivers/tty/serial/sunsu.c                  | 2 +-
>  drivers/tty/serial/sunzilog.c               | 2 +-
>  drivers/tty/serial/timbuart.c               | 2 +-
>  drivers/tty/serial/uartlite.c               | 2 +-
>  drivers/tty/serial/ucc_uart.c               | 2 +-
>  drivers/tty/serial/vr41xx_siu.c             | 2 +-
>  drivers/tty/serial/vt8500_serial.c          | 2 +-
>  drivers/tty/serial/xilinx_uartps.c          | 2 +-
>  drivers/tty/serial/zs.c                     | 2 +-
>  61 files changed, 62 insertions(+), 62 deletions(-)
> 

<snip>

> --- a/drivers/tty/serial/efm32-uart.c
> +++ b/drivers/tty/serial/efm32-uart.c
> @@ -487,7 +487,7 @@ static int efm32_uart_verify_port(struct uart_port *port,
>  	return ret;
>  }
>  
> -static struct uart_ops efm32_uart_pops = {
> +static const struct uart_ops efm32_uart_pops = {
>  	.tx_empty = efm32_uart_tx_empty,
>  	.set_mctrl = efm32_uart_set_mctrl,
>  	.get_mctrl = efm32_uart_get_mctrl,
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 08ce76f..738b5c4 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 const struct uart_ops lpuart_pops = {

Something went wrong in this driver, const is twice...

Probably because we have two struct uart_ops in one driver?

>  	.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 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/icom.c b/drivers/tty/serial/icom.c
> index 45fc323..3915443 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1287,7 +1287,7 @@ static void icom_config_port(struct uart_port
> *port, int flags)
>  	port->type = PORT_ICOM;
>  }
>  

<snip>

--
Stefan

  reply	other threads:[~2015-04-04 22:04 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-04 17:47 [PATCH] tty: serial: Add const to struct uart_ops declarations Joe Perches
2015-04-04 17:47 ` Joe Perches
2015-04-04 17:47 ` Joe Perches
2015-04-04 17:47 ` Joe Perches
2015-04-04 17:47 ` Joe Perches
2015-04-04 17:47 ` Joe Perches
2015-04-04 22:04 ` Stefan Agner [this message]
2015-04-04 22:04   ` Stefan Agner
2015-04-04 22:04   ` Stefan Agner
2015-04-04 22:04   ` Stefan Agner
2015-04-04 22:04   ` Stefan Agner
2015-04-04 22:04   ` Stefan Agner
2015-04-05 18:24   ` [PATCH V2] " Joe Perches
2015-04-05 18:24     ` Joe Perches
2015-04-05 18:24     ` Joe Perches
2015-04-05 18:24     ` Joe Perches
2015-04-05 18:24     ` Joe Perches
2015-04-05 18:24     ` Joe Perches
2015-04-05 22:23     ` Maciej W. Rozycki
2015-04-05 22:23       ` Maciej W. Rozycki
2015-04-05 22:23       ` Maciej W. Rozycki
2015-04-05 22:23       ` Maciej W. Rozycki
2015-04-05 22:23       ` Maciej W. Rozycki
2015-04-05 22:23       ` Maciej W. Rozycki
     [not found]     ` <1428258294.2775.69.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2015-04-05 23:09       ` Stefan Agner
2015-04-05 23:09         ` Stefan Agner
2015-04-05 23:09         ` Stefan Agner
2015-04-05 23:09         ` Stefan Agner
2015-04-05 23:09         ` Stefan Agner
2015-04-05 23:09         ` Stefan Agner
2015-04-06  0:16         ` Joe Perches
2015-04-06  0:16           ` Joe Perches
2015-04-06  0:16           ` Joe Perches
2015-04-06  0:16           ` Joe Perches
2015-04-06  0:16           ` Joe Perches
2015-04-06  0:16           ` Joe Perches
2015-04-06  1:36     ` Sören Brinkmann
2015-04-06  1:36       ` Sören Brinkmann
2015-04-06  1:36       ` Sören Brinkmann
2015-04-06  1:36       ` Sören Brinkmann
2015-04-06  1:36       ` Sören Brinkmann
2015-04-06  1:36       ` Sören Brinkmann
2015-04-07  7:14     ` Patrice Chotard
2015-04-07  7:14       ` Patrice Chotard
2015-04-07  7:14       ` Patrice Chotard
2015-04-07  7:14       ` Patrice Chotard
2015-04-07  7:14       ` Patrice Chotard
2015-04-07  7:14       ` Patrice Chotard
2015-04-07  7:49     ` Tobias Klauser
2015-04-07  7:49       ` Tobias Klauser
2015-04-07  7:49       ` Tobias Klauser
2015-04-07  7:49       ` Tobias Klauser
2015-04-07  7:49       ` Tobias Klauser
2015-04-07  7:49       ` Tobias Klauser
2015-04-07 12:46     ` Vineet Gupta
2015-04-07 12:46       ` Vineet Gupta
2015-04-07 12:46       ` Vineet Gupta
2015-04-07 12:46       ` Vineet Gupta
2015-04-07 12:46       ` Vineet Gupta
2015-04-07 12:46       ` Vineet Gupta
2015-04-09  9:48     ` Thierry Reding
2015-04-09  9:48       ` Thierry Reding
2015-04-09  9:48       ` Thierry Reding
2015-04-09  9:48       ` Thierry Reding
2015-04-09  9:48       ` Thierry Reding
2015-04-09  9:48       ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a938a0e86638588e5ccff85771fa3b95@agner.ch \
    --to=stefan@agner.ch \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=dwalker@fifo99.com \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacmet@sunsite.dk \
    --cc=joe@perches.com \
    --cc=jslaby@suse.cz \
    --cc=kernel@stlinux.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=macro@linux-mips.org \
    --cc=michal.simek@xilinx.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=pfg@sgi.com \
    --cc=sonic.zhang@analog.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=timur@tabi.org \
    --cc=tklauser@distanz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.