* Re: [PATCH] tty/serial: at91: Use atmel_port consistently
[not found] <1452817319-9309-1-git-send-email-kyle.roeschley@ni.com>
@ 2016-01-25 17:29 ` Nicolas Ferre
2016-01-26 11:01 ` Nicolas Ferre
2016-01-26 11:04 ` [PATCH v2] serial: atmel: " Nicolas Ferre
2016-01-26 11:34 ` [PATCH v3] " Nicolas Ferre
2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Ferre @ 2016-01-25 17:29 UTC (permalink / raw)
To: Kyle Roeschley, gregkh; +Cc: linux-arm-kernel, linux-serial, jslaby
Le 15/01/2016 01:21, Kyle Roeschley a écrit :
> From: Jaeden Amero <jaeden.amero@ni.com>
>
> In all functions other than atmel_serial_probe_fifos,
> atmel_serial_probe, and atmel_console_init, the name "port" is used to
> refer to an instance of struct uart_port. In many of these functions,
> "atmel_port" is used to refer to an instance of struct atmel_uart_port.
>
> We make the use of the name "port" consistent by making
> atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init
> use "atmel_port" to refer to an instance of struct atmel_uart_port
> instead of the previous name of "port".
>
> Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
> Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
> Acked-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
I agree with this as this rename is useful and prevents confusion.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks, bye.
> ---
> drivers/tty/serial/atmel_serial.c | 81 ++++++++++++++++++++-------------------
> 1 file changed, 41 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 1c0884d..a809119 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2478,13 +2478,13 @@ static int __init atmel_console_init(void)
> struct atmel_uart_data *pdata =
> dev_get_platdata(&atmel_default_console_device->dev);
> int id = pdata->num;
> - struct atmel_uart_port *port = &atmel_ports[id];
> + struct atmel_uart_port *atmel_port = &atmel_ports[id];
>
> - port->backup_imr = 0;
> - port->uart.line = id;
> + atmel_port->backup_imr = 0;
> + atmel_port->uart.line = id;
>
> add_preferred_console(ATMEL_DEVICENAME, id, NULL);
> - ret = atmel_init_port(port, atmel_default_console_device);
> + ret = atmel_init_port(atmel_port, atmel_default_console_device);
> if (ret)
> return ret;
> register_console(&atmel_console);
> @@ -2599,23 +2599,23 @@ static int atmel_serial_resume(struct platform_device *pdev)
> #define atmel_serial_resume NULL
> #endif
>
> -static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
> +static void atmel_serial_probe_fifos(struct atmel_uart_port *atmel_port,
> struct platform_device *pdev)
> {
> - port->fifo_size = 0;
> - port->rts_low = 0;
> - port->rts_high = 0;
> + atmel_port->fifo_size = 0;
> + atmel_port->rts_low = 0;
> + atmel_port->rts_high = 0;
>
> if (of_property_read_u32(pdev->dev.of_node,
> "atmel,fifo-size",
> - &port->fifo_size))
> + &atmel_port->fifo_size))
> return;
>
> - if (!port->fifo_size)
> + if (!atmel_port->fifo_size)
> return;
>
> - if (port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
> - port->fifo_size = 0;
> + if (atmel_port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
> + atmel_port->fifo_size = 0;
> dev_err(&pdev->dev, "Invalid FIFO size\n");
> return;
> }
> @@ -2628,22 +2628,22 @@ static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
> * Threshold to a reasonably high value respecting this 16 data
> * empirical rule when possible.
> */
> - port->rts_high = max_t(int, port->fifo_size >> 1,
> - port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
> - port->rts_low = max_t(int, port->fifo_size >> 2,
> - port->fifo_size - ATMEL_RTS_LOW_OFFSET);
> + atmel_port->rts_high = max_t(int, atmel_port->fifo_size >> 1,
> + atmel_port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
> + atmel_port->rts_low = max_t(int, atmel_port->fifo_size >> 2,
> + atmel_port->fifo_size - ATMEL_RTS_LOW_OFFSET);
>
> dev_info(&pdev->dev, "Using FIFO (%u data)\n",
> - port->fifo_size);
> + atmel_port->fifo_size);
> dev_dbg(&pdev->dev, "RTS High Threshold : %2u data\n",
> - port->rts_high);
> + atmel_port->rts_high);
> dev_dbg(&pdev->dev, "RTS Low Threshold : %2u data\n",
> - port->rts_low);
> + atmel_port->rts_low);
> }
>
> static int atmel_serial_probe(struct platform_device *pdev)
> {
> - struct atmel_uart_port *port;
> + struct atmel_uart_port *atmel_port;
> struct device_node *np = pdev->dev.of_node;
> struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev);
> void *data;
> @@ -2674,14 +2674,14 @@ static int atmel_serial_probe(struct platform_device *pdev)
> goto err;
> }
>
> - port = &atmel_ports[ret];
> - port->backup_imr = 0;
> - port->uart.line = ret;
> - atmel_serial_probe_fifos(port, pdev);
> + ateml_port = &atmel_ports[ret];
> + atmel_port->backup_imr = 0;
> + atmel_port->uart.line = ret;
> + atmel_serial_probe_fifos(atmel_port, pdev);
>
> - spin_lock_init(&port->lock_suspended);
> + spin_lock_init(&atmel_port->lock_suspended);
>
> - ret = atmel_init_port(port, pdev);
> + ret = atmel_init_port(atmel_port, pdev);
> if (ret)
> goto err_clear_bit;
>
> @@ -2691,34 +2691,34 @@ static int atmel_serial_probe(struct platform_device *pdev)
> goto err_clear_bit;
> }
>
> - if (!atmel_use_pdc_rx(&port->uart)) {
> + if (!atmel_use_pdc_rx(&atmel_port->uart)) {
> ret = -ENOMEM;
> data = kmalloc(sizeof(struct atmel_uart_char)
> * ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
> if (!data)
> goto err_alloc_ring;
> - port->rx_ring.buf = data;
> + atmel_port->rx_ring.buf = data;
> }
>
> - rs485_enabled = port->uart.rs485.flags & SER_RS485_ENABLED;
> + rs485_enabled = atmel_port->uart.rs485.flags & SER_RS485_ENABLED;
>
> - ret = uart_add_one_port(&atmel_uart, &port->uart);
> + ret = uart_add_one_port(&atmel_uart, &atmel_port->uart);
> if (ret)
> goto err_add_port;
>
> #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
> - if (atmel_is_console_port(&port->uart)
> + if (atmel_is_console_port(&atmel_port->uart)
> && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
> /*
> * The serial core enabled the clock for us, so undo
> * the clk_prepare_enable() in atmel_console_setup()
> */
> - clk_disable_unprepare(port->clk);
> + clk_disable_unprepare(atmel_port->clk);
> }
> #endif
>
> device_init_wakeup(&pdev->dev, 1);
> - platform_set_drvdata(pdev, port);
> + platform_set_drvdata(pdev, atmel_port);
>
> /*
> * The peripheral clock has been disabled by atmel_init_port():
> @@ -2727,9 +2727,10 @@ static int atmel_serial_probe(struct platform_device *pdev)
> clk_prepare_enable(port->clk);
>
> if (rs485_enabled) {
> - atmel_uart_writel(&port->uart, ATMEL_US_MR,
> + atmel_uart_writel(&atmel_port->uart, ATMEL_US_MR,
> ATMEL_US_USMODE_NORMAL);
> - atmel_uart_writel(&port->uart, ATMEL_US_CR, ATMEL_US_RTSEN);
> + atmel_uart_writel(&atmel_port->uart, ATMEL_US_CR,
> + ATMEL_US_RTSEN);
> }
>
> /*
> @@ -2746,12 +2747,12 @@ static int atmel_serial_probe(struct platform_device *pdev)
> return 0;
>
> err_add_port:
> - kfree(port->rx_ring.buf);
> - port->rx_ring.buf = NULL;
> + kfree(atmel_port->rx_ring.buf);
> + atmel_port->rx_ring.buf = NULL;
> err_alloc_ring:
> - if (!atmel_is_console_port(&port->uart)) {
> - clk_put(port->clk);
> - port->clk = NULL;
> + if (!atmel_is_console_port(&atmel_port->uart)) {
> + clk_put(atmel_port->clk);
> + atmel_port->clk = NULL;
> }
> err_clear_bit:
> clear_bit(port->uart.line, atmel_ports_in_use);
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty/serial: at91: Use atmel_port consistently
2016-01-25 17:29 ` [PATCH] tty/serial: at91: Use atmel_port consistently Nicolas Ferre
@ 2016-01-26 11:01 ` Nicolas Ferre
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2016-01-26 11:01 UTC (permalink / raw)
To: Kyle Roeschley, gregkh; +Cc: linux-serial, linux-arm-kernel, jslaby
Le 25/01/2016 18:29, Nicolas Ferre a écrit :
> Le 15/01/2016 01:21, Kyle Roeschley a écrit :
>> From: Jaeden Amero <jaeden.amero@ni.com>
>>
>> In all functions other than atmel_serial_probe_fifos,
>> atmel_serial_probe, and atmel_console_init, the name "port" is used to
>> refer to an instance of struct uart_port. In many of these functions,
>> "atmel_port" is used to refer to an instance of struct atmel_uart_port.
>>
>> We make the use of the name "port" consistent by making
>> atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init
>> use "atmel_port" to refer to an instance of struct atmel_uart_port
>> instead of the previous name of "port".
>>
>> Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
>> Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
>> Acked-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
>
> I agree with this as this rename is useful and prevents confusion.
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>
> Thanks, bye.
>
>> ---
>> drivers/tty/serial/atmel_serial.c | 81 ++++++++++++++++++++-------------------
>> 1 file changed, 41 insertions(+), 40 deletions(-)
>>
>> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
>> index 1c0884d..a809119 100644
>> --- a/drivers/tty/serial/atmel_serial.c
>> +++ b/drivers/tty/serial/atmel_serial.c
>> @@ -2478,13 +2478,13 @@ static int __init atmel_console_init(void)
>> struct atmel_uart_data *pdata =
>> dev_get_platdata(&atmel_default_console_device->dev);
>> int id = pdata->num;
>> - struct atmel_uart_port *port = &atmel_ports[id];
>> + struct atmel_uart_port *atmel_port = &atmel_ports[id];
>>
>> - port->backup_imr = 0;
>> - port->uart.line = id;
>> + atmel_port->backup_imr = 0;
>> + atmel_port->uart.line = id;
>>
>> add_preferred_console(ATMEL_DEVICENAME, id, NULL);
>> - ret = atmel_init_port(port, atmel_default_console_device);
>> + ret = atmel_init_port(atmel_port, atmel_default_console_device);
>> if (ret)
>> return ret;
>> register_console(&atmel_console);
>> @@ -2599,23 +2599,23 @@ static int atmel_serial_resume(struct platform_device *pdev)
>> #define atmel_serial_resume NULL
>> #endif
>>
>> -static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
>> +static void atmel_serial_probe_fifos(struct atmel_uart_port *atmel_port,
>> struct platform_device *pdev)
>> {
>> - port->fifo_size = 0;
>> - port->rts_low = 0;
>> - port->rts_high = 0;
>> + atmel_port->fifo_size = 0;
>> + atmel_port->rts_low = 0;
>> + atmel_port->rts_high = 0;
>>
>> if (of_property_read_u32(pdev->dev.of_node,
>> "atmel,fifo-size",
>> - &port->fifo_size))
>> + &atmel_port->fifo_size))
>> return;
>>
>> - if (!port->fifo_size)
>> + if (!atmel_port->fifo_size)
>> return;
>>
>> - if (port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
>> - port->fifo_size = 0;
>> + if (atmel_port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
>> + atmel_port->fifo_size = 0;
>> dev_err(&pdev->dev, "Invalid FIFO size\n");
>> return;
>> }
>> @@ -2628,22 +2628,22 @@ static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
>> * Threshold to a reasonably high value respecting this 16 data
>> * empirical rule when possible.
>> */
>> - port->rts_high = max_t(int, port->fifo_size >> 1,
>> - port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
>> - port->rts_low = max_t(int, port->fifo_size >> 2,
>> - port->fifo_size - ATMEL_RTS_LOW_OFFSET);
>> + atmel_port->rts_high = max_t(int, atmel_port->fifo_size >> 1,
>> + atmel_port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
>> + atmel_port->rts_low = max_t(int, atmel_port->fifo_size >> 2,
>> + atmel_port->fifo_size - ATMEL_RTS_LOW_OFFSET);
>>
>> dev_info(&pdev->dev, "Using FIFO (%u data)\n",
>> - port->fifo_size);
>> + atmel_port->fifo_size);
>> dev_dbg(&pdev->dev, "RTS High Threshold : %2u data\n",
>> - port->rts_high);
>> + atmel_port->rts_high);
>> dev_dbg(&pdev->dev, "RTS Low Threshold : %2u data\n",
>> - port->rts_low);
>> + atmel_port->rts_low);
>> }
>>
>> static int atmel_serial_probe(struct platform_device *pdev)
>> {
>> - struct atmel_uart_port *port;
>> + struct atmel_uart_port *atmel_port;
>> struct device_node *np = pdev->dev.of_node;
>> struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev);
>> void *data;
>> @@ -2674,14 +2674,14 @@ static int atmel_serial_probe(struct platform_device *pdev)
>> goto err;
>> }
>>
>> - port = &atmel_ports[ret];
>> - port->backup_imr = 0;
>> - port->uart.line = ret;
>> - atmel_serial_probe_fifos(port, pdev);
>> + ateml_port = &atmel_ports[ret];
Actually, there's a typo here ^ : s/ateml/atmel/
I re-send a v2 patch right now.
Bye,
>> + atmel_port->backup_imr = 0;
>> + atmel_port->uart.line = ret;
>> + atmel_serial_probe_fifos(atmel_port, pdev);
>>
>> - spin_lock_init(&port->lock_suspended);
>> + spin_lock_init(&atmel_port->lock_suspended);
>>
>> - ret = atmel_init_port(port, pdev);
>> + ret = atmel_init_port(atmel_port, pdev);
>> if (ret)
>> goto err_clear_bit;
>>
>> @@ -2691,34 +2691,34 @@ static int atmel_serial_probe(struct platform_device *pdev)
>> goto err_clear_bit;
>> }
>>
>> - if (!atmel_use_pdc_rx(&port->uart)) {
>> + if (!atmel_use_pdc_rx(&atmel_port->uart)) {
>> ret = -ENOMEM;
>> data = kmalloc(sizeof(struct atmel_uart_char)
>> * ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
>> if (!data)
>> goto err_alloc_ring;
>> - port->rx_ring.buf = data;
>> + atmel_port->rx_ring.buf = data;
>> }
>>
>> - rs485_enabled = port->uart.rs485.flags & SER_RS485_ENABLED;
>> + rs485_enabled = atmel_port->uart.rs485.flags & SER_RS485_ENABLED;
>>
>> - ret = uart_add_one_port(&atmel_uart, &port->uart);
>> + ret = uart_add_one_port(&atmel_uart, &atmel_port->uart);
>> if (ret)
>> goto err_add_port;
>>
>> #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
>> - if (atmel_is_console_port(&port->uart)
>> + if (atmel_is_console_port(&atmel_port->uart)
>> && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
>> /*
>> * The serial core enabled the clock for us, so undo
>> * the clk_prepare_enable() in atmel_console_setup()
>> */
>> - clk_disable_unprepare(port->clk);
>> + clk_disable_unprepare(atmel_port->clk);
>> }
>> #endif
>>
>> device_init_wakeup(&pdev->dev, 1);
>> - platform_set_drvdata(pdev, port);
>> + platform_set_drvdata(pdev, atmel_port);
>>
>> /*
>> * The peripheral clock has been disabled by atmel_init_port():
>> @@ -2727,9 +2727,10 @@ static int atmel_serial_probe(struct platform_device *pdev)
>> clk_prepare_enable(port->clk);
>>
>> if (rs485_enabled) {
>> - atmel_uart_writel(&port->uart, ATMEL_US_MR,
>> + atmel_uart_writel(&atmel_port->uart, ATMEL_US_MR,
>> ATMEL_US_USMODE_NORMAL);
>> - atmel_uart_writel(&port->uart, ATMEL_US_CR, ATMEL_US_RTSEN);
>> + atmel_uart_writel(&atmel_port->uart, ATMEL_US_CR,
>> + ATMEL_US_RTSEN);
>> }
>>
>> /*
>> @@ -2746,12 +2747,12 @@ static int atmel_serial_probe(struct platform_device *pdev)
>> return 0;
>>
>> err_add_port:
>> - kfree(port->rx_ring.buf);
>> - port->rx_ring.buf = NULL;
>> + kfree(atmel_port->rx_ring.buf);
>> + atmel_port->rx_ring.buf = NULL;
>> err_alloc_ring:
>> - if (!atmel_is_console_port(&port->uart)) {
>> - clk_put(port->clk);
>> - port->clk = NULL;
>> + if (!atmel_is_console_port(&atmel_port->uart)) {
>> + clk_put(atmel_port->clk);
>> + atmel_port->clk = NULL;
>> }
>> err_clear_bit:
>> clear_bit(port->uart.line, atmel_ports_in_use);
>>
>
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] serial: atmel: Use atmel_port consistently
[not found] <1452817319-9309-1-git-send-email-kyle.roeschley@ni.com>
2016-01-25 17:29 ` [PATCH] tty/serial: at91: Use atmel_port consistently Nicolas Ferre
@ 2016-01-26 11:04 ` Nicolas Ferre
2016-01-26 11:17 ` Nicolas Ferre
2016-01-26 11:51 ` kbuild test robot
2016-01-26 11:34 ` [PATCH v3] " Nicolas Ferre
2 siblings, 2 replies; 6+ messages in thread
From: Nicolas Ferre @ 2016-01-26 11:04 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-arm-kernel
Cc: linux-kernel, linux-serial, jslaby, kyle.roeschley, Jaeden Amero
From: Jaeden Amero <jaeden.amero@ni.com>
In all functions other than atmel_serial_probe_fifos,
atmel_serial_probe, and atmel_console_init, the name "port" is used to
refer to an instance of struct uart_port. In many of these functions,
"atmel_port" is used to refer to an instance of struct atmel_uart_port.
We make the use of the name "port" consistent by making
atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init
use "atmel_port" to refer to an instance of struct atmel_uart_port
instead of the previous name of "port".
Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
Acked-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
v2: - fix typo in variable
drivers/tty/serial/atmel_serial.c | 81 ++++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 40 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 1c0884d8ef32..555111955b75 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2478,13 +2478,13 @@ static int __init atmel_console_init(void)
struct atmel_uart_data *pdata =
dev_get_platdata(&atmel_default_console_device->dev);
int id = pdata->num;
- struct atmel_uart_port *port = &atmel_ports[id];
+ struct atmel_uart_port *atmel_port = &atmel_ports[id];
- port->backup_imr = 0;
- port->uart.line = id;
+ atmel_port->backup_imr = 0;
+ atmel_port->uart.line = id;
add_preferred_console(ATMEL_DEVICENAME, id, NULL);
- ret = atmel_init_port(port, atmel_default_console_device);
+ ret = atmel_init_port(atmel_port, atmel_default_console_device);
if (ret)
return ret;
register_console(&atmel_console);
@@ -2599,23 +2599,23 @@ static int atmel_serial_resume(struct platform_device *pdev)
#define atmel_serial_resume NULL
#endif
-static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
+static void atmel_serial_probe_fifos(struct atmel_uart_port *atmel_port,
struct platform_device *pdev)
{
- port->fifo_size = 0;
- port->rts_low = 0;
- port->rts_high = 0;
+ atmel_port->fifo_size = 0;
+ atmel_port->rts_low = 0;
+ atmel_port->rts_high = 0;
if (of_property_read_u32(pdev->dev.of_node,
"atmel,fifo-size",
- &port->fifo_size))
+ &atmel_port->fifo_size))
return;
- if (!port->fifo_size)
+ if (!atmel_port->fifo_size)
return;
- if (port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
- port->fifo_size = 0;
+ if (atmel_port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
+ atmel_port->fifo_size = 0;
dev_err(&pdev->dev, "Invalid FIFO size\n");
return;
}
@@ -2628,22 +2628,22 @@ static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
* Threshold to a reasonably high value respecting this 16 data
* empirical rule when possible.
*/
- port->rts_high = max_t(int, port->fifo_size >> 1,
- port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
- port->rts_low = max_t(int, port->fifo_size >> 2,
- port->fifo_size - ATMEL_RTS_LOW_OFFSET);
+ atmel_port->rts_high = max_t(int, atmel_port->fifo_size >> 1,
+ atmel_port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
+ atmel_port->rts_low = max_t(int, atmel_port->fifo_size >> 2,
+ atmel_port->fifo_size - ATMEL_RTS_LOW_OFFSET);
dev_info(&pdev->dev, "Using FIFO (%u data)\n",
- port->fifo_size);
+ atmel_port->fifo_size);
dev_dbg(&pdev->dev, "RTS High Threshold : %2u data\n",
- port->rts_high);
+ atmel_port->rts_high);
dev_dbg(&pdev->dev, "RTS Low Threshold : %2u data\n",
- port->rts_low);
+ atmel_port->rts_low);
}
static int atmel_serial_probe(struct platform_device *pdev)
{
- struct atmel_uart_port *port;
+ struct atmel_uart_port *atmel_port;
struct device_node *np = pdev->dev.of_node;
struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev);
void *data;
@@ -2674,14 +2674,14 @@ static int atmel_serial_probe(struct platform_device *pdev)
goto err;
}
- port = &atmel_ports[ret];
- port->backup_imr = 0;
- port->uart.line = ret;
- atmel_serial_probe_fifos(port, pdev);
+ atmel_port = &atmel_ports[ret];
+ atmel_port->backup_imr = 0;
+ atmel_port->uart.line = ret;
+ atmel_serial_probe_fifos(atmel_port, pdev);
- spin_lock_init(&port->lock_suspended);
+ spin_lock_init(&atmel_port->lock_suspended);
- ret = atmel_init_port(port, pdev);
+ ret = atmel_init_port(atmel_port, pdev);
if (ret)
goto err_clear_bit;
@@ -2691,34 +2691,34 @@ static int atmel_serial_probe(struct platform_device *pdev)
goto err_clear_bit;
}
- if (!atmel_use_pdc_rx(&port->uart)) {
+ if (!atmel_use_pdc_rx(&atmel_port->uart)) {
ret = -ENOMEM;
data = kmalloc(sizeof(struct atmel_uart_char)
* ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
if (!data)
goto err_alloc_ring;
- port->rx_ring.buf = data;
+ atmel_port->rx_ring.buf = data;
}
- rs485_enabled = port->uart.rs485.flags & SER_RS485_ENABLED;
+ rs485_enabled = atmel_port->uart.rs485.flags & SER_RS485_ENABLED;
- ret = uart_add_one_port(&atmel_uart, &port->uart);
+ ret = uart_add_one_port(&atmel_uart, &atmel_port->uart);
if (ret)
goto err_add_port;
#ifdef CONFIG_SERIAL_ATMEL_CONSOLE
- if (atmel_is_console_port(&port->uart)
+ if (atmel_is_console_port(&atmel_port->uart)
&& ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
/*
* The serial core enabled the clock for us, so undo
* the clk_prepare_enable() in atmel_console_setup()
*/
- clk_disable_unprepare(port->clk);
+ clk_disable_unprepare(atmel_port->clk);
}
#endif
device_init_wakeup(&pdev->dev, 1);
- platform_set_drvdata(pdev, port);
+ platform_set_drvdata(pdev, atmel_port);
/*
* The peripheral clock has been disabled by atmel_init_port():
@@ -2727,9 +2727,10 @@ static int atmel_serial_probe(struct platform_device *pdev)
clk_prepare_enable(port->clk);
if (rs485_enabled) {
- atmel_uart_writel(&port->uart, ATMEL_US_MR,
+ atmel_uart_writel(&atmel_port->uart, ATMEL_US_MR,
ATMEL_US_USMODE_NORMAL);
- atmel_uart_writel(&port->uart, ATMEL_US_CR, ATMEL_US_RTSEN);
+ atmel_uart_writel(&atmel_port->uart, ATMEL_US_CR,
+ ATMEL_US_RTSEN);
}
/*
@@ -2746,12 +2747,12 @@ static int atmel_serial_probe(struct platform_device *pdev)
return 0;
err_add_port:
- kfree(port->rx_ring.buf);
- port->rx_ring.buf = NULL;
+ kfree(atmel_port->rx_ring.buf);
+ atmel_port->rx_ring.buf = NULL;
err_alloc_ring:
- if (!atmel_is_console_port(&port->uart)) {
- clk_put(port->clk);
- port->clk = NULL;
+ if (!atmel_is_console_port(&atmel_port->uart)) {
+ clk_put(atmel_port->clk);
+ atmel_port->clk = NULL;
}
err_clear_bit:
clear_bit(port->uart.line, atmel_ports_in_use);
--
2.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] serial: atmel: Use atmel_port consistently
2016-01-26 11:04 ` [PATCH v2] serial: atmel: " Nicolas Ferre
@ 2016-01-26 11:17 ` Nicolas Ferre
2016-01-26 11:51 ` kbuild test robot
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2016-01-26 11:17 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-arm-kernel
Cc: Jaeden Amero, kyle.roeschley, linux-kernel, linux-serial, jslaby
Le 26/01/2016 12:04, Nicolas Ferre a écrit :
> From: Jaeden Amero <jaeden.amero@ni.com>
>
> In all functions other than atmel_serial_probe_fifos,
> atmel_serial_probe, and atmel_console_init, the name "port" is used to
> refer to an instance of struct uart_port. In many of these functions,
> "atmel_port" is used to refer to an instance of struct atmel_uart_port.
>
> We make the use of the name "port" consistent by making
> atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init
> use "atmel_port" to refer to an instance of struct atmel_uart_port
> instead of the previous name of "port".
>
> Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
> Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
> Acked-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> v2: - fix typo in variable
Okay, let's face it: this patch is outdated.
So this v2 still fails to compile. Before hiding in a deep hole, I
recompile this driver, test it and send a v3. Here again, sorry for the
noise :-(
Bye,
> drivers/tty/serial/atmel_serial.c | 81 ++++++++++++++++++++-------------------
> 1 file changed, 41 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 1c0884d8ef32..555111955b75 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2478,13 +2478,13 @@ static int __init atmel_console_init(void)
> struct atmel_uart_data *pdata =
> dev_get_platdata(&atmel_default_console_device->dev);
> int id = pdata->num;
> - struct atmel_uart_port *port = &atmel_ports[id];
> + struct atmel_uart_port *atmel_port = &atmel_ports[id];
>
> - port->backup_imr = 0;
> - port->uart.line = id;
> + atmel_port->backup_imr = 0;
> + atmel_port->uart.line = id;
>
> add_preferred_console(ATMEL_DEVICENAME, id, NULL);
> - ret = atmel_init_port(port, atmel_default_console_device);
> + ret = atmel_init_port(atmel_port, atmel_default_console_device);
> if (ret)
> return ret;
> register_console(&atmel_console);
> @@ -2599,23 +2599,23 @@ static int atmel_serial_resume(struct platform_device *pdev)
> #define atmel_serial_resume NULL
> #endif
>
> -static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
> +static void atmel_serial_probe_fifos(struct atmel_uart_port *atmel_port,
> struct platform_device *pdev)
> {
> - port->fifo_size = 0;
> - port->rts_low = 0;
> - port->rts_high = 0;
> + atmel_port->fifo_size = 0;
> + atmel_port->rts_low = 0;
> + atmel_port->rts_high = 0;
>
> if (of_property_read_u32(pdev->dev.of_node,
> "atmel,fifo-size",
> - &port->fifo_size))
> + &atmel_port->fifo_size))
> return;
>
> - if (!port->fifo_size)
> + if (!atmel_port->fifo_size)
> return;
>
> - if (port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
> - port->fifo_size = 0;
> + if (atmel_port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
> + atmel_port->fifo_size = 0;
> dev_err(&pdev->dev, "Invalid FIFO size\n");
> return;
> }
> @@ -2628,22 +2628,22 @@ static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
> * Threshold to a reasonably high value respecting this 16 data
> * empirical rule when possible.
> */
> - port->rts_high = max_t(int, port->fifo_size >> 1,
> - port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
> - port->rts_low = max_t(int, port->fifo_size >> 2,
> - port->fifo_size - ATMEL_RTS_LOW_OFFSET);
> + atmel_port->rts_high = max_t(int, atmel_port->fifo_size >> 1,
> + atmel_port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
> + atmel_port->rts_low = max_t(int, atmel_port->fifo_size >> 2,
> + atmel_port->fifo_size - ATMEL_RTS_LOW_OFFSET);
>
> dev_info(&pdev->dev, "Using FIFO (%u data)\n",
> - port->fifo_size);
> + atmel_port->fifo_size);
> dev_dbg(&pdev->dev, "RTS High Threshold : %2u data\n",
> - port->rts_high);
> + atmel_port->rts_high);
> dev_dbg(&pdev->dev, "RTS Low Threshold : %2u data\n",
> - port->rts_low);
> + atmel_port->rts_low);
> }
>
> static int atmel_serial_probe(struct platform_device *pdev)
> {
> - struct atmel_uart_port *port;
> + struct atmel_uart_port *atmel_port;
> struct device_node *np = pdev->dev.of_node;
> struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev);
> void *data;
> @@ -2674,14 +2674,14 @@ static int atmel_serial_probe(struct platform_device *pdev)
> goto err;
> }
>
> - port = &atmel_ports[ret];
> - port->backup_imr = 0;
> - port->uart.line = ret;
> - atmel_serial_probe_fifos(port, pdev);
> + atmel_port = &atmel_ports[ret];
> + atmel_port->backup_imr = 0;
> + atmel_port->uart.line = ret;
> + atmel_serial_probe_fifos(atmel_port, pdev);
>
> - spin_lock_init(&port->lock_suspended);
> + spin_lock_init(&atmel_port->lock_suspended);
>
> - ret = atmel_init_port(port, pdev);
> + ret = atmel_init_port(atmel_port, pdev);
> if (ret)
> goto err_clear_bit;
>
> @@ -2691,34 +2691,34 @@ static int atmel_serial_probe(struct platform_device *pdev)
> goto err_clear_bit;
> }
>
> - if (!atmel_use_pdc_rx(&port->uart)) {
> + if (!atmel_use_pdc_rx(&atmel_port->uart)) {
> ret = -ENOMEM;
> data = kmalloc(sizeof(struct atmel_uart_char)
> * ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
> if (!data)
> goto err_alloc_ring;
> - port->rx_ring.buf = data;
> + atmel_port->rx_ring.buf = data;
> }
>
> - rs485_enabled = port->uart.rs485.flags & SER_RS485_ENABLED;
> + rs485_enabled = atmel_port->uart.rs485.flags & SER_RS485_ENABLED;
>
> - ret = uart_add_one_port(&atmel_uart, &port->uart);
> + ret = uart_add_one_port(&atmel_uart, &atmel_port->uart);
> if (ret)
> goto err_add_port;
>
> #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
> - if (atmel_is_console_port(&port->uart)
> + if (atmel_is_console_port(&atmel_port->uart)
> && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
> /*
> * The serial core enabled the clock for us, so undo
> * the clk_prepare_enable() in atmel_console_setup()
> */
> - clk_disable_unprepare(port->clk);
> + clk_disable_unprepare(atmel_port->clk);
> }
> #endif
>
> device_init_wakeup(&pdev->dev, 1);
> - platform_set_drvdata(pdev, port);
> + platform_set_drvdata(pdev, atmel_port);
>
> /*
> * The peripheral clock has been disabled by atmel_init_port():
> @@ -2727,9 +2727,10 @@ static int atmel_serial_probe(struct platform_device *pdev)
> clk_prepare_enable(port->clk);
>
> if (rs485_enabled) {
> - atmel_uart_writel(&port->uart, ATMEL_US_MR,
> + atmel_uart_writel(&atmel_port->uart, ATMEL_US_MR,
> ATMEL_US_USMODE_NORMAL);
> - atmel_uart_writel(&port->uart, ATMEL_US_CR, ATMEL_US_RTSEN);
> + atmel_uart_writel(&atmel_port->uart, ATMEL_US_CR,
> + ATMEL_US_RTSEN);
> }
>
> /*
> @@ -2746,12 +2747,12 @@ static int atmel_serial_probe(struct platform_device *pdev)
> return 0;
>
> err_add_port:
> - kfree(port->rx_ring.buf);
> - port->rx_ring.buf = NULL;
> + kfree(atmel_port->rx_ring.buf);
> + atmel_port->rx_ring.buf = NULL;
> err_alloc_ring:
> - if (!atmel_is_console_port(&port->uart)) {
> - clk_put(port->clk);
> - port->clk = NULL;
> + if (!atmel_is_console_port(&atmel_port->uart)) {
> + clk_put(atmel_port->clk);
> + atmel_port->clk = NULL;
> }
> err_clear_bit:
> clear_bit(port->uart.line, atmel_ports_in_use);
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3] serial: atmel: Use atmel_port consistently
[not found] <1452817319-9309-1-git-send-email-kyle.roeschley@ni.com>
2016-01-25 17:29 ` [PATCH] tty/serial: at91: Use atmel_port consistently Nicolas Ferre
2016-01-26 11:04 ` [PATCH v2] serial: atmel: " Nicolas Ferre
@ 2016-01-26 11:34 ` Nicolas Ferre
2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2016-01-26 11:34 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-arm-kernel
Cc: linux-kernel, linux-serial, jslaby, kyle.roeschley, jaeden.amero,
Nicolas Ferre
From: Jaeden Amero <jaeden.amero@ni.com>
In all functions other than atmel_serial_probe_fifos,
atmel_serial_probe, and atmel_console_init, the name "port" is used to
refer to an instance of struct uart_port. In many of these functions,
"atmel_port" is used to refer to an instance of struct atmel_uart_port.
We make the use of the name "port" consistent by making
atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init
use "atmel_port" to refer to an instance of struct atmel_uart_port
instead of the previous name of "port".
Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
Acked-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
[nicolas.ferre@atmel.com: fix typo in variable, adapt to newer kernel]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
v2: - fix typo in variable
v3: - fix variable that was not changed in atmel_serial_probe() function
and adapt to newer driver revision
drivers/tty/serial/atmel_serial.c | 95 ++++++++++++++++++++-------------------
1 file changed, 48 insertions(+), 47 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 1c0884d8ef32..55ddd74fd4bb 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2478,13 +2478,13 @@ static int __init atmel_console_init(void)
struct atmel_uart_data *pdata =
dev_get_platdata(&atmel_default_console_device->dev);
int id = pdata->num;
- struct atmel_uart_port *port = &atmel_ports[id];
+ struct atmel_uart_port *atmel_port = &atmel_ports[id];
- port->backup_imr = 0;
- port->uart.line = id;
+ atmel_port->backup_imr = 0;
+ atmel_port->uart.line = id;
add_preferred_console(ATMEL_DEVICENAME, id, NULL);
- ret = atmel_init_port(port, atmel_default_console_device);
+ ret = atmel_init_port(atmel_port, atmel_default_console_device);
if (ret)
return ret;
register_console(&atmel_console);
@@ -2599,23 +2599,23 @@ static int atmel_serial_resume(struct platform_device *pdev)
#define atmel_serial_resume NULL
#endif
-static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
+static void atmel_serial_probe_fifos(struct atmel_uart_port *atmel_port,
struct platform_device *pdev)
{
- port->fifo_size = 0;
- port->rts_low = 0;
- port->rts_high = 0;
+ atmel_port->fifo_size = 0;
+ atmel_port->rts_low = 0;
+ atmel_port->rts_high = 0;
if (of_property_read_u32(pdev->dev.of_node,
"atmel,fifo-size",
- &port->fifo_size))
+ &atmel_port->fifo_size))
return;
- if (!port->fifo_size)
+ if (!atmel_port->fifo_size)
return;
- if (port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
- port->fifo_size = 0;
+ if (atmel_port->fifo_size < ATMEL_MIN_FIFO_SIZE) {
+ atmel_port->fifo_size = 0;
dev_err(&pdev->dev, "Invalid FIFO size\n");
return;
}
@@ -2628,22 +2628,22 @@ static void atmel_serial_probe_fifos(struct atmel_uart_port *port,
* Threshold to a reasonably high value respecting this 16 data
* empirical rule when possible.
*/
- port->rts_high = max_t(int, port->fifo_size >> 1,
- port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
- port->rts_low = max_t(int, port->fifo_size >> 2,
- port->fifo_size - ATMEL_RTS_LOW_OFFSET);
+ atmel_port->rts_high = max_t(int, atmel_port->fifo_size >> 1,
+ atmel_port->fifo_size - ATMEL_RTS_HIGH_OFFSET);
+ atmel_port->rts_low = max_t(int, atmel_port->fifo_size >> 2,
+ atmel_port->fifo_size - ATMEL_RTS_LOW_OFFSET);
dev_info(&pdev->dev, "Using FIFO (%u data)\n",
- port->fifo_size);
+ atmel_port->fifo_size);
dev_dbg(&pdev->dev, "RTS High Threshold : %2u data\n",
- port->rts_high);
+ atmel_port->rts_high);
dev_dbg(&pdev->dev, "RTS Low Threshold : %2u data\n",
- port->rts_low);
+ atmel_port->rts_low);
}
static int atmel_serial_probe(struct platform_device *pdev)
{
- struct atmel_uart_port *port;
+ struct atmel_uart_port *atmel_port;
struct device_node *np = pdev->dev.of_node;
struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev);
void *data;
@@ -2674,87 +2674,88 @@ static int atmel_serial_probe(struct platform_device *pdev)
goto err;
}
- port = &atmel_ports[ret];
- port->backup_imr = 0;
- port->uart.line = ret;
- atmel_serial_probe_fifos(port, pdev);
+ atmel_port = &atmel_ports[ret];
+ atmel_port->backup_imr = 0;
+ atmel_port->uart.line = ret;
+ atmel_serial_probe_fifos(atmel_port, pdev);
- spin_lock_init(&port->lock_suspended);
+ spin_lock_init(&atmel_port->lock_suspended);
- ret = atmel_init_port(port, pdev);
+ ret = atmel_init_port(atmel_port, pdev);
if (ret)
goto err_clear_bit;
- port->gpios = mctrl_gpio_init(&port->uart, 0);
- if (IS_ERR(port->gpios)) {
- ret = PTR_ERR(port->gpios);
+ atmel_port->gpios = mctrl_gpio_init(&atmel_port->uart, 0);
+ if (IS_ERR(atmel_port->gpios)) {
+ ret = PTR_ERR(atmel_port->gpios);
goto err_clear_bit;
}
- if (!atmel_use_pdc_rx(&port->uart)) {
+ if (!atmel_use_pdc_rx(&atmel_port->uart)) {
ret = -ENOMEM;
data = kmalloc(sizeof(struct atmel_uart_char)
* ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
if (!data)
goto err_alloc_ring;
- port->rx_ring.buf = data;
+ atmel_port->rx_ring.buf = data;
}
- rs485_enabled = port->uart.rs485.flags & SER_RS485_ENABLED;
+ rs485_enabled = atmel_port->uart.rs485.flags & SER_RS485_ENABLED;
- ret = uart_add_one_port(&atmel_uart, &port->uart);
+ ret = uart_add_one_port(&atmel_uart, &atmel_port->uart);
if (ret)
goto err_add_port;
#ifdef CONFIG_SERIAL_ATMEL_CONSOLE
- if (atmel_is_console_port(&port->uart)
+ if (atmel_is_console_port(&atmel_port->uart)
&& ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
/*
* The serial core enabled the clock for us, so undo
* the clk_prepare_enable() in atmel_console_setup()
*/
- clk_disable_unprepare(port->clk);
+ clk_disable_unprepare(atmel_port->clk);
}
#endif
device_init_wakeup(&pdev->dev, 1);
- platform_set_drvdata(pdev, port);
+ platform_set_drvdata(pdev, atmel_port);
/*
* The peripheral clock has been disabled by atmel_init_port():
* enable it before accessing I/O registers
*/
- clk_prepare_enable(port->clk);
+ clk_prepare_enable(atmel_port->clk);
if (rs485_enabled) {
- atmel_uart_writel(&port->uart, ATMEL_US_MR,
+ atmel_uart_writel(&atmel_port->uart, ATMEL_US_MR,
ATMEL_US_USMODE_NORMAL);
- atmel_uart_writel(&port->uart, ATMEL_US_CR, ATMEL_US_RTSEN);
+ atmel_uart_writel(&atmel_port->uart, ATMEL_US_CR,
+ ATMEL_US_RTSEN);
}
/*
* Get port name of usart or uart
*/
- atmel_get_ip_name(&port->uart);
+ atmel_get_ip_name(&atmel_port->uart);
/*
* The peripheral clock can now safely be disabled till the port
* is used
*/
- clk_disable_unprepare(port->clk);
+ clk_disable_unprepare(atmel_port->clk);
return 0;
err_add_port:
- kfree(port->rx_ring.buf);
- port->rx_ring.buf = NULL;
+ kfree(atmel_port->rx_ring.buf);
+ atmel_port->rx_ring.buf = NULL;
err_alloc_ring:
- if (!atmel_is_console_port(&port->uart)) {
- clk_put(port->clk);
- port->clk = NULL;
+ if (!atmel_is_console_port(&atmel_port->uart)) {
+ clk_put(atmel_port->clk);
+ atmel_port->clk = NULL;
}
err_clear_bit:
- clear_bit(port->uart.line, atmel_ports_in_use);
+ clear_bit(atmel_port->uart.line, atmel_ports_in_use);
err:
return ret;
}
--
2.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] serial: atmel: Use atmel_port consistently
2016-01-26 11:04 ` [PATCH v2] serial: atmel: " Nicolas Ferre
2016-01-26 11:17 ` Nicolas Ferre
@ 2016-01-26 11:51 ` kbuild test robot
1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2016-01-26 11:51 UTC (permalink / raw)
To: Nicolas Ferre
Cc: kbuild-all, Greg Kroah-Hartman, linux-arm-kernel, linux-kernel,
linux-serial, jslaby, kyle.roeschley, Jaeden Amero
[-- Attachment #1: Type: text/plain, Size: 2646 bytes --]
Hi Jaeden,
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on v4.5-rc1 next-20160125]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Nicolas-Ferre/serial-atmel-Use-atmel_port-consistently/20160126-190554
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: xtensa-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa
All errors (new ones prefixed by >>):
drivers/tty/serial/atmel_serial.c: In function 'atmel_serial_probe':
>> drivers/tty/serial/atmel_serial.c:2688:2: error: 'port' undeclared (first use in this function)
port->gpios = mctrl_gpio_init(&port->uart, 0);
^
drivers/tty/serial/atmel_serial.c:2688:2: note: each undeclared identifier is reported only once for each function it appears in
vim +/port +2688 drivers/tty/serial/atmel_serial.c
f1d867e0 drivers/tty/serial/atmel_serial.c Jaeden Amero 2016-01-26 2682 spin_lock_init(&atmel_port->lock_suspended);
2c7af5ba drivers/tty/serial/atmel_serial.c Boris BREZILLON 2015-03-02 2683
f1d867e0 drivers/tty/serial/atmel_serial.c Jaeden Amero 2016-01-26 2684 ret = atmel_init_port(atmel_port, pdev);
91f8c2d8 drivers/tty/serial/atmel_serial.c Boris BREZILLON 2013-06-19 2685 if (ret)
6fbb9bdf drivers/tty/serial/atmel_serial.c Cyrille Pitchen 2014-12-09 2686 goto err_clear_bit;
afefc415 drivers/serial/at91_serial.c Andrew Victor 2006-06-19 2687
18dfef9c drivers/tty/serial/atmel_serial.c Uwe Kleine-König 2015-10-18 @2688 port->gpios = mctrl_gpio_init(&port->uart, 0);
18dfef9c drivers/tty/serial/atmel_serial.c Uwe Kleine-König 2015-10-18 2689 if (IS_ERR(port->gpios)) {
18dfef9c drivers/tty/serial/atmel_serial.c Uwe Kleine-König 2015-10-18 2690 ret = PTR_ERR(port->gpios);
18dfef9c drivers/tty/serial/atmel_serial.c Uwe Kleine-König 2015-10-18 2691 goto err_clear_bit;
:::::: The code at line 2688 was first introduced by commit
:::::: 18dfef9c7f87b75bbb0fb66a634f7c13a45b9f8d serial: atmel: convert to irq handling provided mctrl-gpio
:::::: TO: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 44066 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-26 11:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1452817319-9309-1-git-send-email-kyle.roeschley@ni.com>
2016-01-25 17:29 ` [PATCH] tty/serial: at91: Use atmel_port consistently Nicolas Ferre
2016-01-26 11:01 ` Nicolas Ferre
2016-01-26 11:04 ` [PATCH v2] serial: atmel: " Nicolas Ferre
2016-01-26 11:17 ` Nicolas Ferre
2016-01-26 11:51 ` kbuild test robot
2016-01-26 11:34 ` [PATCH v3] " Nicolas Ferre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).