[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202312260601.aT9SYjjo-lkp@intel.com>
Date: Tue, 26 Dec 2023 06:29:55 +0800
From: kernel test robot <lkp@...el.com>
To: Lino Sanfilippo <l.sanfilippo@...bus.com>, gregkh@...uxfoundation.org,
jirislaby@...nel.org, ilpo.jarvinen@...ux.intel.com
Cc: oe-kbuild-all@...ts.linux.dev, u.kleine-koenig@...gutronix.de,
shawnguo@...nel.org, s.hauer@...gutronix.de,
mcoquelin.stm32@...il.com, alexandre.torgue@...s.st.com,
cniedermaier@...electronics.com, hugo@...ovil.com,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
LinoSanfilippo@....de, lukas@...ner.de, p.rosenberger@...bus.com,
Lino Sanfilippo <l.sanfilippo@...bus.com>, stable@...r.kernel.org
Subject: Re: [PATCH v6 6/7] serial: omap: do not override settings for RS485
support
Hi Lino,
kernel test robot noticed the following build errors:
[auto build test ERROR on ceb6a6f023fd3e8b07761ed900352ef574010bcb]
url: https://github.com/intel-lab-lkp/linux/commits/Lino-Sanfilippo/serial-Do-not-hold-the-port-lock-when-setting-rx-during-tx-GPIO/20231225-193833
base: ceb6a6f023fd3e8b07761ed900352ef574010bcb
patch link: https://lore.kernel.org/r/20231225113524.8800-7-l.sanfilippo%40kunbus.com
patch subject: [PATCH v6 6/7] serial: omap: do not override settings for RS485 support
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20231226/202312260601.aT9SYjjo-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231226/202312260601.aT9SYjjo-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312260601.aT9SYjjo-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/tty/serial/omap-serial.c: In function 'serial_omap_probe_rs485':
>> drivers/tty/serial/omap-serial.c:1501:36: error: 'serial_omap_rs485_supported' undeclared (first use in this function); did you mean 'serial_omap_request_port'?
1501 | up->port.rs485_supported = serial_omap_rs485_supported;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| serial_omap_request_port
drivers/tty/serial/omap-serial.c:1501:36: note: each undeclared identifier is reported only once for each function it appears in
drivers/tty/serial/omap-serial.c: At top level:
>> drivers/tty/serial/omap-serial.c:1537:34: warning: 'serial_omap_rs485_supported' defined but not used [-Wunused-const-variable=]
1537 | static const struct serial_rs485 serial_omap_rs485_supported = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +1501 drivers/tty/serial/omap-serial.c
1485
1486 static int serial_omap_probe_rs485(struct uart_omap_port *up,
1487 struct device *dev)
1488 {
1489 struct serial_rs485 *rs485conf = &up->port.rs485;
1490 struct device_node *np = dev->of_node;
1491 enum gpiod_flags gflags;
1492 int ret;
1493
1494 rs485conf->flags = 0;
1495 up->rts_gpiod = NULL;
1496
1497 if (!np)
1498 return 0;
1499
1500 up->port.rs485_config = serial_omap_config_rs485;
> 1501 up->port.rs485_supported = serial_omap_rs485_supported;
1502
1503 ret = uart_get_rs485_mode(&up->port);
1504 if (ret)
1505 return ret;
1506
1507 if (of_property_read_bool(np, "rs485-rts-active-high")) {
1508 rs485conf->flags |= SER_RS485_RTS_ON_SEND;
1509 rs485conf->flags &= ~SER_RS485_RTS_AFTER_SEND;
1510 } else {
1511 rs485conf->flags &= ~SER_RS485_RTS_ON_SEND;
1512 rs485conf->flags |= SER_RS485_RTS_AFTER_SEND;
1513 }
1514
1515 /* check for tx enable gpio */
1516 gflags = rs485conf->flags & SER_RS485_RTS_AFTER_SEND ?
1517 GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
1518 up->rts_gpiod = devm_gpiod_get_optional(dev, "rts", gflags);
1519 if (IS_ERR(up->rts_gpiod)) {
1520 ret = PTR_ERR(up->rts_gpiod);
1521 if (ret == -EPROBE_DEFER)
1522 return ret;
1523
1524 up->rts_gpiod = NULL;
1525 up->port.rs485_supported = (const struct serial_rs485) { };
1526 if (rs485conf->flags & SER_RS485_ENABLED) {
1527 dev_err(dev, "disabling RS-485 (rts-gpio missing in device tree)\n");
1528 memset(rs485conf, 0, sizeof(*rs485conf));
1529 }
1530 } else {
1531 gpiod_set_consumer_name(up->rts_gpiod, "omap-serial");
1532 }
1533
1534 return 0;
1535 }
1536
> 1537 static const struct serial_rs485 serial_omap_rs485_supported = {
1538 .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND |
1539 SER_RS485_RX_DURING_TX,
1540 .delay_rts_before_send = 1,
1541 .delay_rts_after_send = 1,
1542 };
1543
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists